This is a complete guide to enable a configure use the Sentinel dVPN OpenVPN Node on Linux with docker and share unused bandwidth to the Sentinel Network.
Here are the steps involved in getting a Sentinel dVPN OpenVPN Node up and running:
- Install docker
- Build/pull the Sentinel dVPN docker image
- Configure Node
Below are the instructions on installing docker:
-
Install required dependencies to get docker installation script from get.docker.com
sudo apt install -y curl
curl -fsSL get.docker.com -o /tmp/get-docker.sh
-
Run the downloaded script to setup & install docker
sudo sh /tmp/get-docker.sh
-
Add current user to the docker group to give required access
sudo usermod -aG docker $USER
You can set up and run VPN node in two ways:
- Quick Run - download docker image from Docker Hub
- DIY - build your own docker image from the Sentinel code repository
-
Navigate to the User's home directory
cd ~
-
Create a new folder to pull the docker image and run it
mkdir -p $HOME/.sentinel
-
Pull the official Sentinel docker image from Docker Hub & configure the node
sudo docker run -it --privileged --mount type=bind,source=$HOME/.sentinel,target=/root/.sentinel -p 3000:3000 -p 1194:1194/udp sentinelofficial/sentinel-vpn-node
Do-it-Yourself setup by building your own docker image
-
Navigate to the root folder or anywhere that you want to set up the project and download code from the repository
cd ~
-
Clone the Sentinel repository
git clone https://github.com/sentinel-official/sentinel.git
-
Navigate to the folder with code to build the docker image
cd ~/sentinel/vpn-node-docker
-
Build the docker image
sudo docker build --file Dockerfile.prod --tag sentinel-vpn-node --force-rm --no-cache .
-
Navigate to the folder where the docker container was set up. In our case, it is the User's home directory.
mkdir -p $HOME/.sentinel
-
Run the image and configure the node
sudo docker run -it --privileged --mount type=bind,source=$HOME/.sentinel,target=/root/.sentinel -p 3000:3000 -p 1194:1194/udp sentinel-vpn-node
-
Stop the running docker container
sudo docker stop $(sudo docker ps -aq -f ancestor=sentinelofficial/sentinel-vpn-node)
-
Remove the older version of docker container
sudo docker rm -f $(sudo docker ps -aq -f ancestor=sentinelofficial/sentinel-vpn-node)
-
Remove the older version of docker image
sudo docker rmi -f $(sudo docker images -aq -f reference=sentinelofficial/sentinel-vpn-node)
-
Set the token value to an EMPTY STRING in the config file
Config file location: $HOME/.sentinel/config.data
Example: {"token": "", "enc_method": "AES-256-CBC", "account_addr": "0x656b756e6c6335302e676c343572357232786970", "price_per_gb": 125.0}
After completing the above steps please follow the instructions on Method #1 to get the node up and running again.
-
list a running Sentinel dVPN Node:
sudo docker ps
-
list both, running and stopped Sentinel dVPN Nodes:
sudo docker ps -a
-
stop a particular Sentinel Node:
- run
sudo docker ps
and copy the Container ID. - run
sudo docker stop ContainerID
- run
-
remove a particular Sentinel dVPN Node:
sudo docker rm ContainerID_OR_ContainerName
-
remove node using the force option
-f
:sudo docker rm -f ContainerID_OR_ContainerName
-
remove all stopped Sentinel dVPN Nodes:
sudo docker rm $(sudo docker ps -a -q)
-
stop all the running dVPN Nodes and remove them:
sudo docker stop $(sudo docker ps -a -q) && sudo docker rm $(sudo docker ps -a -q)