NodeSpawner is a dashboard for manage & spawn dvpn-node.
If you want to support the project consider to delegate your DVPNs to me. 💙 sentvaloper10unne9aclcdwfysj6ya5vzh7xwj3xht6jhfxn6
- Clone the repository
- Make sure to have Python gte 3.10 and the virtualenv package installed
- Install the python requirements
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
- Execute the script:
python main.py
- Create a dashboard settings
- Navigate to http://127.0.0.1:3845/servers (default one, or your custom
listen_on
andlisten_port
values) and enjoy the dashboard 🥳
- Create a system unit file
sudo nano /etc/systemd/system/dvpn-node-spawner.service
- Paste the following text
[Unit]
Description=dvpn-node-spawner
After=network-online.target
[Service]
User=<your_user> # modify this field with your user
TimeoutStartSec=2
WorkingDirectory=/path/of/dvpn-node-spawner
ExecStart=python main.py
Restart=always
RestartSec=2
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target
If you use a virtualenv replace
ExecStart=python main.py
withExecStart=/path/of/venv/bin/python main.py
- Reload the systemd
sudo systemctl daemon-reload
- Enable auto start
sudo systemctl enable dvpn-node-spawner
- Enable auto start
sudo systemctl start dvpn-node-spawner
- Clone the repository
- Build the image
docker build . -t dvpn-node-spawner
- Run the container:
docker run --name node-spawner -d \
-v $(pwd)/instance:/usr/src/app/instance \
-p 8080:3845 \
dvpn-node-spawner
$(pwd)
Could not work on Windows (cmd), please use the absolute path instead, like: /path/of/your/instance:/usr/src/app/instance
- Navigate to http://127.0.0.1:8080/servers and enjoy the dashboard 🥳
This binds port 3845 of the container to TCP port 8080 on 127.0.0.1 of the host machine.
On the first run the dashboard will ask you to setup some simple settings
- Listen on, you can leave the default for localhost binding, if you plan to access from another host set to
0.0.0.0
or use the same ip of the host machine - Liste port, you can leave the default or choose for a custom one
- BasicAuth, the prompt will ask if you want to setup a simple authentication with username and password.
You can change manually all of this settings under the settings.json file (the password is stored as sha256)
- If you have a fresh VPS I suggest to perform at least one SSH connection manually before use the dashboard in order to know the RSA key fingerprint.
- The ssh comunication can be done via password or via private-key auth (not already tested).
- We need a sudoers permission in order to execute some commands (like docker/requirements install).
- All the server info (host, username, password, port) are stored locally on a sqlite database.
- Docker
- curl, used for contact some ipinfo website and download .sh scripts
- tmux, used for handle non-deamon container / especially useful when the keywring is setup as 'file' and we need to submit a wallet password
- openssl, used for create SSL certificate that will be used to serve on https the /status page
- jq, used for parsing the output of ipinfo website
- git, used for clone the dvpn-node repo and build the image
- acl, used for give the right permission to node-folder
All the bash scripting for install the requirements are developed for Ubuntu. If you plan to install docker or the requirements with the dashboard on ArchLinux / Centos or other disto please edit all the apt reference with you os package manager like pacman or yum.
The dashboard was developed on free time and it may not be perfect;
- After some actions like start/restart stop and so on the page must be refreshed.
- The logs are not live but will be refreshed each time you click on "Node logs" tab
- Most of the default configuration are take from Trinity dVPN Guides, like
gigabyte_prices
andhourly_prices
values. The default configuration is stored on handlers/Config.py file and in case of update by dvpn-node, the file could need updates. - Configuration like udp port / tcp port / moniker are generated randomly.
- With the dashboard you can pull the latest image from official dvpn-node image. For arm64 will be pulled a un-official image.
Btw, if you have already built by your self the image, the dashboard will handle only images that ends with
dvpn-node
ordvpn-node:latest
. Images like:sentine-dvpn-node
are also valid.
In order to handle the keyring will be use the Sentinel CLI client. Based on your OS, the script will automatically download the client from sentinel-official/cli-client release v0.3.2. The client will work on /tmp folder, once the wallet is created / recovered the files will be uploaded on the server and the /tmp folder will be deleted.
- The ssh authentication via private key was not tested
- The keyring with backend as 'file' could have some issue linked to the password input. For example if you restart a container trougth the dashboard, probably the node will never start because is waiting for a input.
- Currently, if you save a node configuration, the container must be manually restarted (can be done via dashboard) - We could evaluate an auto restart.
- The firewall part is currently not managed, I found a lot of VPS/Hosting services without the ufw package or firwall rules - so, for the moment is not managed by the dasbhoard.
- My skills on frontend side are very limited, forgive me about the simple bootstrap page (btw, dark mode 🌔 and light mode 🌞 are implemented)
After a feature request I've implement a basic auth for the dashboard. The credentials can be managed:
- trought the bootstrap phase
- by editing the settings.json
- with the use of "key" icon on right-footer