Home » Node-setups » One VPS, Multiple Nodes: The Beginner’s Guide
Home » Node-setups » One VPS, Multiple Nodes: The Beginner’s Guide
Disclaimer
The information provided in this guide is for general informational purposes only. By accessing or using this guide, you acknowledge and agree that the author and this website shall not be held responsible or liable for any errors, omissions, or outcomes resulting from the use of this material. This includes, without limitation, any direct, indirect, incidental, or consequential damages to hardware, software, data, or any other property. While reasonable efforts have been made to ensure the accuracy and reliability of the content, no warranties or guarantees are provided, either express or implied. Users assume full responsibility for the implementation of any instructions contained herein and are strongly advised to perform appropriate backups and due diligence before proceeding. For official support or the most up-to-date information, please consult the relevant project’s official documentation or support channels.
To access your VPS, you have two options
root
as the default username.Run this command:
ssh username@your_server_ip
Replace username
and your_server_ip
with your actual VPS login credentials. You’ll be prompted to enter the password to complete the login.
Example: ssh root@192.0.2.123
Why Optimize VPS Usage?
Separate VPS instances for each node may seem straightforward but can rack up expenses quickly. Imagine paying $6/month per VPS — running five nodes could cost you $360 annually! By consolidating nodes onto one VPS, you can slash hosting costs and simplify management.
Additionally, fewer servers mean fewer headaches. Managing multiple VPS instances for blockchain and DePIN nodes can become cumbersome, especially for new projects where returns may be minimal. A single, optimized VPS setup reduces complexity and operational strain.
Tools and Preparation
Screen vs. Docker: Which to Use?
Advantages of Screen:
Disadvantages of Screen:
Advantages of Docker:
Disadvantages of Docker:
For this tutorial, we’ll focus on Screen for its simplicity and cost efficiency.
What You’ll Need:
Setting Up Screen
sudo apt-get update
sudo apt-get install screen
Using Screen for Multiple Nodes
Each node gets its own session. Follow these steps:
1. Create a Screen Session:
screen -S node_name
Replace node_name
with a descriptive name.
2. Run Node Setup Commands:
./start_node_command.sh
3. Detach the Session:
Press Ctrl + A
, then D
4. List Active Sessions:
screen -ls
5. Reattach to a Session:
screen -r node_name
6. Terminate a Session:
Reattach:
screen -r node_name
Then press Ctrl + A
, K
to kill it and confirm.
Alternatively:
screen -XS [screenID] quit
An Example Setup
Let’s say you’re running two nodes:
screen -S NodeA
./start_node_command.sh
Ctrl + A, D
screen -S NodeB
./start_node_command.sh
Ctrl + A, D
Monitoring VPS Resources
htop
df -h
uptime
Testing Nodes on a Second VPS
Use a low-cost VPS (e.g., RackNerd VPS) for testing node setups. You can easily reset if needed. This helps identify compatibility issues before moving to your main server.
Wrapping Up
Using Screen to run multiple nodes on one VPS saves cost and simplifies management. Whether you’re new or optimizing an existing setup, this approach makes node operations more efficient.
💬 Got questions or tips? Drop them in the comments or join our community on DEPINspirationHUB Discord to connect, share, and learn together!