Last updated
Last updated
Edge nodes are the backbone of the peer-to-peer messaging framework, tasked with forwarding and temporarily storing messages for clients who aren't online. Operating on a fully decentralized architecture, these nodes ensure complete user privacy by not retaining any personal data, such as message history or contacts. In this guide, we'll walk you through the process of setting up your own SendingNetwork (SDN) Edge Node. Once set up, your node will seamlessly integrate into the SDN network, ready to relay messages.
Before diving into the setup process, let's make sure your system meets the necessary requirements to run a edge node efficiently. Here's what you'll need:
Hardware:
CPU: An x86-64 CPU (AMD or Intel) is required. While a dual-core processor is the minimum, we recommend a quad-core or higher for the best performance.
Memory: At least 8GB of RAM.
Storage: A minimum of 100GB of free space. SSDs are preferred over HDDs for faster data access and better performance.
Software:
Operating System: A stable version of Linux. We recommend Ubuntu 20.04 LTS.
Network:
A static public IP address is needed to facilitate incoming connections.
Always-on 100 Mbps internet with a minimum 100 GB monthly data plan.
You may request a static public IP address through your Internet Service Provider or opt to deploy your node on a Virtual Private Server (VPS) equipped with a static public IP. Many VPS service providers can accommodate this need. For details about setting up the VPS, see .
With these system requirements in check, you'll be well-prepared to start the deployment of your SDN Edge Node.
If utilizing a VPS, it's essential to open ports 9085, 15858, 9702, 2112 in your VPS platform's firewall to guarantee node connectivity to the network. While our installation script will manage firewall configurations within Linux, you must also manually ensure these ports are accessible on your VPS platform.
Use our provided installation script to quickly launch the service with just a few commands. This script simplifies the setup process for the relay service by automating numerous configuration and installation steps. Actions performed by the script include:
Install prerequisites: Installs essential tools including net-tools
, telnet
, and wget
.
Configure firewall ports: Automatically opens necessary ports (9085
, 15858
, 9702
, 2112
) and verifies their configuration.
Install docker: Detects the OS and installs Docker.
Setup docker compose: Downloads and customizes docker-compose.yaml
with the local public IP and wallet address for multi-container Docker applications.
Launch relay service: Deploys and starts the relay service using Docker Compose based on the modified configuration.
Service and firewall verification: Checks the relay service's status and firewall port accessibility, reporting success or failure.
Depending on your system, use the following command to download and install the deployment script:
Run the following command to execute the script, replacing WALLET_ADDRESS at the end with your whitelisted wallet address to ensure successful node deployment and avoid missing out on SXP:
Please do NOT run the script with sudo
directly as it will impact the node daemon process. Instead, you can run it under a common user account, or by using sudo su
or the root account.
The command might take a few minutes to complete, displaying progress on installing prerequisites, Docker configuration, database setup, and node deployment along the way. If you see the following output, the service has started successfully:
If the firewall fails to open, use the following command structure to double check the failed port:
For example, to check port 15858:
If the output below appears, it indicates an issue with your firewall setup.
Input the following command:
This command filters the processes related to your edgenode service, excluding any monitoring or irrelevant grep processes.
Expected Output:
If the service is running properly, you should see output similar to the following:
This output indicates that your relay service is currently running, detailing the process's parameters and configuration. If you do not see any output, it means that your relay service might not be running correctly, and you may need to troubleshoot further or restart the service.
To display your node ID, use the following command:
To safely stop your node and associated services, execute the commands below in your terminal. These commands will identify and stop the Docker containers for both the Edge node and its related PostgreSQL database.
Execute the following command to stop the Edge node container:
Use this command to stop the PostgreSQL container:
If you are stopping the node permanently, please remove any previously applied node-related firewall policies from your machine.
To restart your Edge node, follow these steps:
Download the latest installation script: In the original directory, obtain the latest script and run it.
Maintain the original directory: If you run the node from a new directory other than the original one, it will create a new node ID. Points will be accrued with this new ID, but previous points will remain valid under the original node ID.
There are several reasons why you might encounter this error:
Non-whitelisted Wallet Address:
Log Message:
Solution: Ensure you are using the correct whitelisted wallet address that you submitted in the Discord channel. If you are Alpha-1 testnet runner, please use the same wallet address as before.
Restricted Area Deployment:
Log Message:
Solution: Mining is not supported in mainland China. Please make sure you are deploying the node from a supported location.
Multiple Active Nodes:
Log Message:
Solution: Only one active node is allowed at a time per wallet address. If you run a second node in a new location while the original one is still active, you will see this error. To run a new node in another location (such as a different directory or machine), follow these steps:
Wait for 10 minutes.
Start the new node in the desired location.
This will create a new node ID, and points will be accrued with this new ID. Previous points will remain valid under the original node ID.
There are several reasons why you might encounter this error.
Mistakenly running the script with sudo
:
Log Message:
Solution:
Please do NOT run the installation script with sudo
as it will impact the node daemon process. Instead, you can run it under a common user account, or by using sudo su
or the root account.
For Linux, run the script with the following command:
Firewall Configuration issue:
Log Message:
Solution:
This error indicates that the ports on your machine are closed or that the VPS provider's firewall is blocking traffic (if applicable). It's possible for the machine's ports to be open, but the VPS provider's firewall might still restrict traffic. This issue could affect the four ports required for the relay service: 9085, 15858, 9702, and 2112.
Verify Port Status:
Run the following command to check if the port is open:
Firewall Configuration:
For firewall configuration across various VPS providers, see .
Should you encounter any issues or have questions, refer to the section at the end of this tutorial or seek support from the SendingNetwork . Check our docs for common questions.
Please ensure you have applied the firewall policy allowing traffic for ports 9085, 15858, 9702, and 2112 to your machine if you are using a VPS. You may refer to the firewall configuration example in our .
After finishing the installation, interact with our auto-reply bot on the SendingMe app to check your node's stats. SendingMe is an all-in-one web3 instant messaging app built on top of SendingNetwork. Refer to for instructions on utilizing the bot to monitor your node's performance.
Should you encounter any issues or have questions, don't hesitate to seek support from the SendingNetwork .
Stop the current node according to the .
Ensure that your firewall is configured to allow traffic for the ports. For a reference on configuring your firewall, please see the firewall configuration section in .