March 5, 2022

Subspace node installing guide on Linux server

Updated March 15, 2022


Site https://subspace.network/

Discord https://discord.gg/KKR7K3H2Kg

Official installation documentation https://github.com/subspace/subspace/blob/main/docs/farming.md

cd $HOME
sudo apt update && sudo apt upgrade -y
sudo apt install wget -y
wget -O subspace-node https://github.com/subspace/subspace/releases/download/snapshot-2022-mar-09/subspace-node-ubuntu-x86_64-snapshot-2022-mar-09
wget -O subspace-farmer https://github.com/subspace/subspace/releases/download/snapshot-2022-mar-09/subspace-farmer-ubuntu-x86_64-snapshot-2022-mar-09
sudo mv subspace* /usr/local/bin/
sudo chmod +x /usr/local/bin/subspace*
sudo adduser --system --home=/var/lib/subspace subspace

You can find the address here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ffarm-rpc.subspace.network#/accounts

SUBSPACE_WALLET_ADDRESS="address for receiving rewards"
SUBSPACE_NODE_NAME="node name"

Create service files:

printf "[Unit]
Description=Subspace Node
After=network.target
[Service]
Type=simple
User=subspace
ExecStart=$(which subspace-node) \\ 
            --chain testnet \\ 
            --wasm-execution compiled \\ 
            --execution wasm --bootnodes \"/dns/farm-rpc.subspace.network/tcp/30333/p2p/12D3KooWPjMZuSYj35ehced2MTJFf95upwpHKgKUrFRfHwohzJXr\" \\
            --rpc-cors all \\
            --rpc-methods unsafe \\
            --ws-external \\
            --validator \\
            --telemetry-url \"wss://telemetry.polkadot.io/submit/ 1\" \\
            --telemetry-url \"wss://telemetry.subspace.network/submit 1\" \\
            --name $SUBSPACE_NODE_NAME
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/subspace-node.service
printf "[Unit]
Description=Subspace Farmer
Requires=subspace-node.service
After=network.target
After=subspace-node.service
[Service]
Type=simple
User=subspace
ExecStart=$(which subspace-farmer) farm --reward-address=$SUBSPACE_WALLET_ADDRESS
Restart=always
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/subspace-farmer.service
sudo systemctl daemon-reload
sudo systemctl enable subspace-node subspace-farmer
sudo systemctl restart subspace-node subspace-farmer

View logs:

journalctl -u subspace-node -f
journalctl -u subspace-farmer -f