These commands are taken directly from the official Streamr documentation. This set of commands is specifically used for Streamr nodes on a VPS running Ubuntu 18.04 or 20.04. You can use any VPS service, but in this example (as shown in the video) I am using the cost-effective solution from Racknerd.
Install Docker on your VPS
curl -sSL https://get.docker.com/ | sh
sudo sh get-docker.sh
Setup your Streamr Node
Step 1. Create a directory.
Step 2. Configure your node
docker run -it -v $(cd ~/.streamrDocker; pwd):/root/.streamr streamr/broker-node:latest bin/config-wizard
You can accept all the default options provided with the above command. Remember, when you are provided with a private key, record it and keep it in a safe place. Do not share it with anyone. This gives complete access and control to the node and tokens.
Start your Streamr Node
Assuming you did the default setup with the same ports and folders, copy and paste the below command to start your Streamr Node.
docker run -it -p 7170:7170 -p 7171:7171 -p 1883:1883 -v $(cd ~/.streamrDocker; pwd):/root/.streamr streamr/broker-node:latest
Restarting Streamr Node using Docker
If you are having issues with your node, and need to shut it down and restart it, here are the commands.
First, this will list all running containers. You need to find the Container ID. If the Streamr node is the only item running, it will be the only one in the list
docker container ls
Highlight and copy the Container ID and paste it at the end of the below command, and run it.
sudo docker restart [container_id]
Want your node to restart if there’s an outage automatically? Run this
docker update --restart unless-stopped $(docker ps -q)
Video: Setup a Streamr Node on VPS – The Complete Guide
Looking to start a Presearch node? If you are running a VPS, you may also want to run a Presearch node and maximize your profitability. Here is the Presearch installation script to run and get started.