Prerequisites

Before you start, make sure you have the following:

Step 1: Server Preparation

  1. Update the System: Make sure your system is up to date.

    sudo apt update && sudo apt upgrade -y
    
    
  2. Install Dependencies: Install necessary packages for the node setup.

    sudo apt install -y curl git build-essential
    
    
  3. 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
    
    

Step 2: Install Stroom Node Software

  1. Clone the Repository: Clone the Stroom repository from GitHub.

    git clone <https://github.com/stroom-project/stroom-node.git>
    cd stroom-node
    
    
  2. Build the Node: Compile the node software.

    make build
    
    
  3. Initialize the Node: Initialize your node with a moniker (name).

    ./stroomd init <your_node_name> --chain-id stroom-mainnet
    
    
  4. 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"
    
    

Step 3: Start the Node

  1. Start the Stroom Node: Start your node to begin syncing with the network.

    ./stroomd start
    
    
  2. Check Node Sync Status: Ensure your node is syncing properly.

    ./stroomd status
    
    
  3. 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
    
    

Step 4: Become a Validator

  1. 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>
    
    
  2. Confirm Validator Status: Check if your validator is active.

    ./stroomd query staking validator $(./stroomd tendermint show-validator)