Hello!
In this tutorial you will learn how I run the node on Ubuntu VPS, which is involved in JoyStream network.
System requirements:
-version of 64-bit Ubuntu
2 CPU
4 Gb of RAM
50-60 Gb of free disk space
- Installing Mobaxterm
- We connect to the VPS (root)
- Download and running Node
tar -vxf joystream-node-3.3.0-fdb75f5ec-x86_64-linux-gnu.tar.gz
wget https://github.com/Joystream/joystream/releases/download/v7.5.0/joy-testnet-4.json
4. We create a service:
nano /etc/systemd/system/joystream.service
5.We paste the following content, if you do not have root, replace it, also check the paths (******-second username!!!):
[Unit]
Description=Joystream Node
After=network.target[Service]
Type=simple
User=root
WorkingDirectory=/root/
ExecStart=/root/joystream-node \
— chain joy-testnet-4.json \
— pruning archive \
— validator \
— name ******
Restart=on-failure
RestartSec=3
LimitNOFILE=8192[Install]
WantedBy=multi-user.target
7. We save:
ctrl+s > ctrl+x
8.Restart the daemon and start the node:
systemctl daemon-reload
systemctl start joystreamsystemctl enable joystream
9.View logs:
journalctl -n 100 -f -u joystream
Expect full node synchronization. The actual block is 2104246 so you should wait sync ~15–20 hours.
IMPORTANT: Read step 9. carefully. Your node needs to be fully synced, before proceeding to step 10.And after you will see synced logs like these:
10. Configure your validator keys
Open a new connection with the VPS and enter the command
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933
If your node is running, this should return:
{"jsonrpc":"2.0","result":"0xa0very0l........ong0hex0string","id":1}
This will save the session keys to your node. Make sure you don’t close the window before copying the 0xa0very0l........ong0hex0string
somewhere.
If your node is not running, is running on a different port, or curl
is not installed, it will return something like:
curl: (7) Failed to connect to localhost port 9933: Connection refused
# or
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"},"id":1}