Before you start, make sure you have the following:
Update the System: Make sure your system is up to date.
sudo apt update && sudo apt upgrade -y
Install Dependencies: Install necessary packages for the node setup.
sudo apt install -y curl git build-essential
Set up a Firewall: Configure your firewall to allow essential ports.
sudo ufw allow ssh
sudo ufw allow 26656/tcp # Stroom P2P
sudo ufw allow 26657/tcp # RPC
sudo ufw enable
Clone the Repository: Clone the Stroom repository from GitHub.
git clone <https://github.com/stroom-project/stroom-node.git>
cd stroom-node
Build the Node: Compile the node software.
make build
Initialize the Node: Initialize your node with a moniker (name).
./stroomd init <your_node_name> --chain-id stroom-mainnet
Download Genesis and Configuration Files: Get the latest genesis file and update the configuration.
curl -O <https://raw.githubusercontent.com/stroom-project/stroom-config/main/genesis.json>
mv genesis.json ~/.stroomd/config/genesis.json
Edit ~/.stroomd/config/config.toml and set persistent_peers to connect with other nodes:
nano ~/.stroomd/config/config.toml
Find the persistent_peers section and add the seed nodes:
persistent_peers = "node1@ip:port,node2@ip:port"
Start the Stroom Node: Start your node to begin syncing with the network.
./stroomd start
Check Node Sync Status: Ensure your node is syncing properly.
./stroomd status
Set Up Auto-Restart: To ensure your node restarts automatically after a reboot, set up a systemd service.
sudo nano /etc/systemd/system/stroomd.service
Add the following content:
[Unit]
Description=Stroom Node
After=network-online.target
[Service]
User=<your_username>
ExecStart=/home/<your_username>/stroom-node/stroomd start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl enable stroomd
sudo systemctl start stroomd
Create a Validator: Once your node is fully synced, create your validator using your staking tokens.
./stroomd tx staking create-validator \\\\
--amount <amount_of_tokens> \\\\
--pubkey $(./stroomd tendermint show-validator) \\\\
--moniker "<your_node_name>" \\\\
--chain-id stroom-mainnet \\\\
--commission-rate "0.10" \\\\
--commission-max-rate "0.20" \\\\
--commission-max-change-rate "0.01" \\\\
--min-self-delegation "1" \\\\
--from <your_wallet_name>
Confirm Validator Status: Check if your validator is active.
./stroomd query staking validator $(./stroomd tendermint show-validator)