> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/pipe-network.md).

# Pipe Network

#### DevNet CDN PoP Node Setup Guide

**1. Register for Notifications**

* Fill out the **registration form** to be notified when the binary is released.

**2. After the Binary is Released**

**a) Prepare the Server**

Update your system and install necessary packages:

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install curl ufw -y
```

**b) Create Directories and Download Binary**

* Create the directory:

  ```bash
  sudo mkdir -p /opt/dcdn
  ```
* Download the node binary:

  ```bash
  sudo curl -L "<URL_BINARY>" -o /opt/dcdn/dcdnd
  ```
* Download the management tool:

  ```bash
  sudo curl -L "<URL_PIPE_TOOL>" -o /opt/dcdn/pipe-tool
  ```
* Grant execute permissions to the files:

  ```bash
  sudo chmod +x /opt/dcdn/dcdnd
  sudo chmod +x /opt/dcdn/pipe-tool
  ```

**3. Log In and Create Tokens**

**a) Log In to Create Access Token**

Run the following command to log in:

```bash
/opt/dcdn/pipe-tool login --node-registry-url="https://rpc.pipedev.network"
```

* After a successful login, the `credentials.json` file will be created at `~/.permissionless`.

**b) Create the Registration Token**

Run the command to create the Registration Token:

```bash
/opt/dcdn/pipe-tool generate-registration-token --node-registry-url="https://rpc.pipedev.network"
```

* The `registration_token.json` file will be saved at `~/.permissionless`.

**4. Configure the System Service (systemd)**

**a) Create the Service File**

Create the service file at `/etc/systemd/system/dcdnd.service`:

```bash
sudo cat > /etc/systemd/system/dcdnd.service << 'EOF'
[Unit]
Description=DCDN Node Service
After=network.target
Wants=network-online.target

[Service]
ExecStart=/opt/dcdn/dcdnd \
    --grpc-server-url=0.0.0.0:8002 \
    --http-server-url=0.0.0.0:8003 \
    --node-registry-url="https://rpc.pipedev.network" \
    --cache-max-capacity-mb=1024 \
    --credentials-dir=/root/.permissionless \
    --allow-origin=*

Restart=always
RestartSec=5
LimitNOFILE=65536
LimitNPROC=4096
WorkingDirectory=/opt/dcdn

[Install]
WantedBy=multi-user.target
EOF
```

**b) Open Necessary Ports**

Open the required ports:

```bash
sudo ufw allow 8002/tcp
sudo ufw allow 8003/tcp
sudo ufw reload
```

**c) Start the Service**

* Reload and enable the service:

  ```bash
  sudo systemctl daemon-reload
  sudo systemctl enable dcdnd
  sudo systemctl start dcdnd
  ```

**5. Manage Wallet**

**a) Create a New Wallet**

Run the following command to create a new wallet:

```bash
/opt/dcdn/pipe-tool generate-wallet --node-registry-url="https://rpc.pipedev.network"
```

* Backup the secret key and recovery phrase (12 words).

**b) Link an Existing Wallet**

Link the wallet using the public key:

```bash
/opt/dcdn/pipe-tool link-wallet --node-registry-url="https://rpc.pipedev.network" --public-key="<PUBLIC_KEY>"
```

**6. Manage the Service**

**View Logs**

To view the logs of the service:

```bash
sudo journalctl -f -u dcdnd.service
```

**Restart the Service**

To restart the service:

```bash
sudo systemctl restart dcdnd
```

**Check the Service Status**

To check the service status:

```bash
sudo systemctl status dcdnd
```
