# Automated Setup for dVPN Node

## Step 1: Follow all these commands

To make the setup process simple, Qubetics provides an automated script that installs and configures a dVPN node with minimal manual steps. The script handles dependencies, firewall rules, and WireGuard setup for you.

It is a Linux script that provides a very easy way to spawn a Qubetics dVPN node via the command line.&#x20;

{% hint style="info" %}
**GitHub Repo:** [**https://github.com/Qubetics/dvpn-node-script**](https://github.com/Qubetics/dvpn-node-script)

#### NOTE: This script has been tested and run on Ubuntu 22.04/24.04 under the root user

This script registers the node into the Qubetics network. While registering, a balance of We recommend having minimum **10K TICS** in your node account and also ensure to have additional TICS to cover the txn fee. The **10K TICS** deposit funds go directly to the community pool. This is not a user wallet or a provider wallet, but a community pool (module account). If these funds need to be withdrawn, it can only be done through governance.
{% endhint %}

{% hint style="warning" %}
**Note:** The remote\_url parameter should always point to the node’s public IPv4 address instead of a domain name. Using a domain (for example <https://dvpinn.pw:18133>) can cause issues because the dVPN network relies on the actual IP address to determine the node’s geographic location, verify registration, and enable peer-to-peer connectivity. When a domain is used, the system cannot accurately fetch or verify the real IP, which affects node visibility and routing performance. Additionally, DNS resolution adds an extra dependency layer that can fail or delay connections if the domain is misconfigured, cached incorrectly, or points to a different IP. Since peers in the Qubetics network connect directly via IP for handshake and routing, using a domain name may lead to failed connections. Therefore, it is always recommended to bind the remote\_url directly with the public IPv4 address (for example, https\://:18133) to ensure accurate registration, stable peer connectivity, and reliable network discovery.
{% endhint %}

### Prerequisites

* A Linux VPS (Ubuntu 22.04/24.04 recommended) OR a Linux Ubuntu machine running on a residential ISP.
* Minimum specs:
  * 2vCPU
  * 2 GB RAM
  * 10 GB Disk
* Stable Internet Connection
* Operating System: Linux (preferably Ubuntu)
* Root or sudo privileges.

### Setup Steps

If you are running on a Cloud Server (AWS, Google Cloud, Azure, etc.)\
Most cloud providers give you an Ubuntu instance where you already have root access. In this case, you can directly clone the repository and follow the steps mentioned in the [README](https://github.com/Qubetics/dvpn-node-script).

{% hint style="info" %}
**Note: Make sure to allow ports 51280 and 18133 on the instance.**

**Port 51280 is used for WireGuard, and port 18133 is used for the node API.**
{% endhint %}

If you are running on your own machine with a Residential ISP (home internet) or inside VMware/VirtualBox\
You might not be logged in as `root` by default. First, switch to root using the command below:

```bash
sudo su
```

After that, clone the repository and continue with the steps from the README.

**Clone the repository**\
\
`git clone https://github.com/Qubetics/dvpn-node-script.git`

`cd dvpn-node-script`

```
.
├── .gitignore
├── README.md
├── install-go.sh
├── setup_wireguard.sh
└── start-node.sh

install-go.sh          Install Go toolchain
setup_wireguard.sh     Setup WireGuard VPN interface
start-node.sh          Main node manager & service control script
```

Follow the Readme file <https://github.com/Qubetics/dvpn-node-script/blob/main/README.md>

Node operators should run in sequence:

&#x20;1\)   `git clone https://github.com/Qubetics/dvpn-node-script.git`

2\)   `cd dvpn-node-script/`

3\)    `./install-go.sh`&#x20;

4\)    `source ~/.bashrc`

5\)   `source ~/.profile`

6\)    `go version`

7\)    `sudo  ./setup_wireguard.sh`

8\)  `./start-node.sh init`

{% hint style="info" %}
**Note: Before running ./start-node.sh start, ensure that TICS has been added to the wallet address that is created while init command add balance of around 10K TICS.**
{% endhint %}

9\)  `./start-node.sh start`

10\)  `./start-node.sh status`

For check logs  use `journalctl` command

```bash
journalctl -u dvpn-node.service-f
```

Here is an example we tested on one of the cloud servers.\
\
1\) Open a root terminal.

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2Fv7l5ZUVfLiUsquue9C7p%2Funknown.png?alt=media&#x26;token=613bd8a2-171b-4337-9a17-f80c2b67d123" alt=""><figcaption></figcaption></figure>

2\) Clone the repo: `git clone https://github.com/Qubetics/dvpn-node-script.git` .

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FtbTliF4G0dOVwHX1vgMe%2Funknown.png?alt=media&#x26;token=4dde9797-b15f-4563-a189-b35b84f60cc4" alt=""><figcaption></figcaption></figure>

3\) Go to the `cd dvpn-node-script` directory.

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FyUAMpNd7zcovELlznlGI%2Funknown.png?alt=media&#x26;token=09d8d266-1400-4558-9562-d61017da4e8c" alt=""><figcaption></figcaption></figure>

4\) First we run **./install-go.sh** to install Go.

5\) After installing Go, run `source ~/.bashrc` and `source ~/.profile`.

6\) Then run `sudo ./setup_wireguard.sh` to install WireGuard.

7\) Help command showing which commands are available inside the file.

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FnxwDSA9hfIO6Hm6eQgSL%2Funknown.png?alt=media&#x26;token=f9e24e43-2b55-4174-ac92-160b665de5b2" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note: Before running ./start-node.sh init, ensure that both WireGuard and Go are installed on your machine.**
{% endhint %}

8\) After installing WireGuard, we ran  `./start-node.sh init`.&#x20;

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FhaRqyFQHYF2dBtGTtaiF%2Funknown.png?alt=media&#x26;token=784514f0-9e18-4c6d-8cb5-5ac3cb022c2d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FaAzHjIx0Z5k0N1KRWq8x%2Funknown.png?alt=media&#x26;token=874eb289-4a3a-4456-a89d-70e4d5b7cc78" alt=""><figcaption></figcaption></figure>

9\) After the command completes successfully, copy the displayed key, as it is associated with your node.

{% hint style="info" %}
**Note: Before running ./start-node.sh start, ensure that TICS has been added to this wallet address around 10K TICS.**
{% endhint %}

10\) After adding TICS, run `./start-node.sh start`. Once it starts successfully, wait for 30 seconds to allow the node to initialize, and then save the **node address**. This node address will be used later.

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2F7DZ5YO1zVX9j85phzyKN%2Funknown.png?alt=media&#x26;token=9c92728d-16a1-4b2c-96bb-31f12cdafdf0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FPIDpDo2ApBumYl1DKiwn%2Funknown.png?alt=media&#x26;token=2aefda67-0687-43c8-88a6-ad5b8dc4193c" alt=""><figcaption></figcaption></figure>

11\) To check the node status, run `./start-node.sh status`.<br>

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2FPwsEAWuy1u1m13WvWimr%2Funknown.png?alt=media&#x26;token=e5f8bfca-450d-412f-9bc4-4094217feee0" alt=""><figcaption></figcaption></figure>

12\) To print the logs, run `journalctl -u dvpn-node.service -f`             &#x20;

<figure><img src="https://2711441218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F36u23gOZEZc21qS2BbPV%2Fuploads%2Fmc6Q0OBUd2m4IzV1j1ij%2Funknown.png?alt=media&#x26;token=13a26512-130a-4b72-a4f6-79ec72ce605f" alt=""><figcaption></figcaption></figure>

{% hint style="info" icon="memo-pad" %}
&#x20;So if your node goes offline due to any of the reason and your IP ban or node inactive, you can do the following things out there

* Get the new server with the new IP
* Repeat the same process on of setting up the node
* Restore the the same wallet address from the seed phrase, make sure not to do the **./start-node.sh init** again.
* Update **remote\_addrs** with your new ip in **\~/.qubetics-dvpnx/config.toml** with your new IP, then run ./start-node.sh start.
  {% endhint %}

## Step 2: After running the above commands, register your node.&#x20;

<https://ticsdvpn.com/>

[Follow these Registration Process Steps to register your node](https://qubetics.gitbook.io/qubetics-docs/getting-started/node-operator/how-to-become-a-node-operator)
