Interactive guide for running Rocketpool client on Ubuntu OS

A guide to set hybrid configuration (native mode) for Rocketpool client. This configuration allows to run Rocketpool validators simultaneously with other type of validators (solo, StakeWise and so on.)

Disclaimer

This guide is for informational purposes only. The author nor website owner does not guarantee accuracy of the information in this guide and is not responsible for any damages or losses incurred by following the guide.

Rocketpool service

Rocketpool allows multiple ways of installation, see the documentation. Within this guide, there is used a native type of installation that operates rocketpool clients above standard consensus and execution client you know from Solo Staking guide. It's a type of open implementation within which Rocketpool can be configured simultaneously with other clients (solo validators, stakewise validators, and so on). In other words, this implementation allows to get the most out of staking opportunities within a single staking machine.

Prerequisites for this guide

  1. Installed and synced Execution and Consensus client

    Install Execution and Consensus Client

Rocketpool client(s) and file(s) (hybrid configuration, native mode)

Rocketpool implementation
├── Service Users
│   ├──  
│   └──  
├── clients
│   ├── /usr/local/bin/rocketpool-cli (rocketpool client)
│   └── /usr/local/bin/rocketpool-daemon (rocketpool daemond client)
├── data & companion scripts
│   ├── /srv/rocketpool (rocketpool service data)
│   │   ├── data (rocketpool data)
│   │   ├── node-log.sh (rp-node.service log script)
│   │   ├── restart-vc.sh (companion script)
│   │   ├── stop-validator.sh (companion script)
│   │   ├── user-settings.yml (rocketpool configuration)
│   │   └── watchtower-log.sh (rp-watchtower.service log script)
│   └── /rocketpool-validator (rocketpool validator data)
└── services
    ├── /etc/systemd/system/rp-node.service 
    ├── /etc/systemd/system/rp-watchtower.service 
    └── /etc/systemd/system/.service 

Install Rocketpool service

  1. Create a Rocketpool service user

    • Create a rocketpool service User

      $ sudo useradd --system --no-create-home --shell /bin/false rocketpool
    • Add server user into rocketpool group

      sudo usermod -aG rocketpool myserveruser
  2. Create directories for Rocketpool client's data

    • Root folder

      sudo mkdir -p /srv/rocketpool
    • Validators data directory with proper permissions

      sudo mkdir -p /srv/rocketpool/data/validators && sudo chmod 775 /srv/rocketpool/data/validators
    • Reward trees Data directory

      sudo mkdir /srv/rocketpool/data/rewards-trees
    • Custom keys Data directory

      sudo mkdir /srv/rocketpool/data/custom-keys
  3. Download Rocketpool clients

    Rocketpool clients should be downloaded from the official Rocketpool Github.

    • Download latest Rocketool client (linux-amd64 version)

      wget https://github.com/rocket-pool/smartnode-install/releases/latest/download/rocketpool-cli-linux-amd64 -O ~/downloads/rocketpool
    • Download latest Rocketool daemon client (linux-amd64 version)

      wget https://github.com/rocket-pool/smartnode-install/releases/latest/download/rocketpool-daemon-linux-amd64 -O ~/downloads/rocketpoold
  4. Copy clients to targeted locations

    sudo cp rocketpool /usr/local/bin && sudo cp rocketpoold /usr/local/bin
  5. Set clients permissions

    • sudo chown rocketpool:rocketpool /usr/local/bin/rocketpool
    • sudo chown rocketpool:rocketpool /usr/local/bin/rocketpoold
    • sudo chmod +x /usr/local/bin/rocketpool
    • sudo chmod u+sx,g+sx,o-rwx /usr/local/bin/rocketpoold
  6. Remove downloaded clients files

    rm ~/downloads/rocketpool && rm ~/downloads/rocketpoold
  7. Configurate Rocketpool Node service

    • Define rp-node.service service

      sudo nano /etc/systemd/system/rp-node.service

      Copy the configuration below into the rp-node.service service file

      [Unit]
      Description=rp-node
      After=network.target
      
      [Service]
      Type=simple
      User=rocketpool
      Restart=always
      RestartSec=5
      ExecStart=/usr/local/bin/rocketpoold --settings /srv/rocketpool/user-settings.yml node
      
      [Install]
      WantedBy=multi-user.target

      Save and Exit the file by pressing ctrl+x, then y.

    • Define log script for rp-node.service

      • Open node-log.sh log file
        sudo nano /srv/rocketpool/node-log.sh

        Copy the code below into the file

        #!/bin/bash
        journalctl -u rp-node -b -f

        Save and Exit the file by pressing ctrl+x, then y.

      • Set running permission for node-log.sh
        sudo chmod +x /srv/rocketpool/node-log.sh

        Note: Log can be watched with sudo /srv/rocketpool/node-log.sh command

  8. Configurate Rocketpool Watchtower service

    • Define rp-watchtower.service

      sudo nano /etc/systemd/system/rp-watchtower.service

      Copy the configuration below into the rp-watchtower.service service file

      [Unit]
      Description=rp-node
      After=network.target
      
      [Service]
      Type=simple
      User=rocketpool
      Restart=always
      RestartSec=5
      ExecStart=/usr/local/bin/rocketpoold --settings /srv/rocketpool/user-settings.yml watchtower
      
      [Install]
      WantedBy=multi-user.target

      Save and Exit the file by pressing ctrl+x, then y.

    • Define log script for rp-watchtower.service

      • Open watchtower-log.sh log file
        sudo nano /srv/rocketpool/watchtower-log.sh

        Copy the code below into the file

        #!/bin/bash
        journalctl -u rp-watchtower -b -f

        Save and Exit the file by pressing ctrl+x, then y.

      • Set running permission for node-log.sh
        sudo chmod +x /srv/rocketpool/watchtower-log.sh

        Note: Log can be watched with sudo /srv/rocketpool/watchtower-log.sh command

  9. Configurate a validator service for validators controlled by Rocketpool

    Validator service controlled by Rocketpol is same as Solo validator, only with Rocketpool data placed in its config file.

    :

    :

    • Create a new rocketpool validator user

      $ sudo useradd --system --no-create-home --shell /bin/false rocketpool-validator
    • Add validator user into rocketpool user group

      sudo usermod -aG rocketpool rocketpool-validator
    • Create a directory for the validator data

      sudo mkdir /var/lib/ethereum/prysm/rocketpool-validator
    • Set permissions for the directory

      sudo chown -R rocketpool-validator:rocketpool-validator /var/lib/ethereum/prysm/rocketpool-validator
    • Define rocketpool-validator.service file

      sudo nano /etc/systemd/system/rocketpool-validator.service

      Copy the configuration below into the prysmvalidator-rp.service service file

      [Unit]
      Description=Prysm Consensus Client Rocketpool (Mainnet)
      Wants=network-online.target
      After=network-online.target
      [Service]
      User=prysmvalidator-rp
      Group=prysmvalidator-rp
      Type=simple
      Restart=always
      RestartSec=5
      EnvironmentFile=/srv/rocketpool/data/validators/rp-fee-recipient-env.txt
      ExecStart=/usr/local/bin/validator \
        --datadir=/var/lib/prysm/validator-rp \
        --wallet-dir=/srv/rocketpool/data/validators/prysm-non-hd \
        --wallet-password-file=/srv/rocketpool/data/validators/prysm-non-hd/direct/accounts/secret \
        --graffiti="" \
        --suggested-fee-recipient ${FEE_RECIPIENT} \
        --enable-builder \
        --accept-terms-of-use
      [Install]
      WantedBy=multi-user.target

      Save and Exit the file by pressing ctrl+x, then y.

    • Create additional directories

      • sudo mkdir -p /srv/rocketpool/data/validators/prysm-non-hd/direct/accounts
      • sudo chown -R rocketpool:rocketpool /srv/rocketpool/data/validators/prysm-non-hd
      • sudo chmod -R 775 /srv/rocketpool/data/validators/prysm-non-hd
    A validator can be exited with following command:
    lighthouse --network "$chain" account validator exit --keystore /path/to/keystore --password-file "$HOME/exit/keystore-password.txt" --beacon-node http://localhost:5052
    Where:
    • --network is mainnet for Ethereum chain and gnosis for Gnosis chain
    • --keystore is a path to the keystore file of specific validator
    • --password-file is a file with exit passowrd placed in
    • --beacon-node is a beaconnode url

    Example request can look as below:

    /usr/local/bin/lighthouse --network mainnet account validator exit --keystore /var/lib/lighthouse/vi1/validators/keystore... --beacon-node http://localhost:5052
    /usr/local/bin/lighthouse --network gnosis account validator exit --keystore /var/lib/lighthouse/vi1/validators/keystore... --beacon-node http://localhost:5052

    For confirmation, place exit phrase Exit my validator

    Follow instructions from Exit Lighthouse validators on Github.
    1. Install a script for bulk exit
    2. Create ~/exit/keystore-password.txt file with keystores password. It's the passowrd selected during validator keys generation. The passowrd can be also found at validator_definitions.yml file, see
      sudo nano /var/lib/lighthouse-validatorInstance/validator_definitions.yml
    3. Perform the exit all validators in selected instance request
      /usr/local/bin/lighthouse_exit_validators.sh mainnet /var/lib/ethereum/lighthouse/vi1/validators http://localhost:5052
      /usr/local/bin/lighthouse_exit_validators.sh gnosis /var/lib/gnosis/lighthouse/vi1/validators http://localhost:5052
      • Replace chain for ethereum / gnosis
      • Replace /var/lib/gnosis/lighthouse/vi1/validators/ for a path to your instance keystores
    4. Remove the password from ~/exit/keystore-password.txt

    See more at official documentation, if needed.

    Bulk exit of all validators under the instance (within a directory)

    1. Go to a directory with Lodestar client
      /usr/local/bin
    2. Perform the exit request for validator keystores in certain directory
      ./lodestar validator voluntary-exit --network mainnet --yes --dataDir /var/lib/ethereum/lodestar/vi1
      ./lodestar validator voluntary-exit --network gnosis --yes --dataDir /var/lib/ethereum/lodestar/vi1

    Exit Validator(s) guide in progress.

    Official documentation at https://docs.teku.consensys.io/reference/cli/subcommands/voluntary-exit

    teku voluntary-exit --validator-keys=/var/lib/teku-vi1/keystores_i1:/var/lib/teku-vi1/keystores_i1
  10. Define alias for Rocketpool access

    • Open ~/.profile file
      sudo nano ~/.profile
    • Place the code below at the end of the file
      alias rocketpool="rocketpool -d /usr/local/bin/rocketpoold -c /srv/rocketpool"
      Save and Exit the file by pressing ctrl+x, then y.
    • Process the change
      source ~/.profile
  11. Configure Rocketpool companion scripts

    Companion scripts allows Rocketpool client to process certain operations automatically, if necessary.

    • Restarting validator instance

      • Download the companion script
        sudo wget https://github.com/rocket-pool/smartnode-install/raw/release/install/scripts/restart-vc.sh -O /srv/rocketpool/restart-vc.sh
      • Modify the downloaded file for your validator service

        Open the file

        sudo nano /srv/rocketpool/stop-validator.sh

        Replace #sudo systemctl restart lighthouse-validator at the last line for:

        sudo systemctl restart rocketpool-validator

        Do not forget remove # at the start. Save and Exit the file by pressing ctrl+x, then y.

      • Allow execution
        sudo chmod +x /srv/rocketpool/restart-vc.sh
    • Stoping validator instance

      • Download the companion script
        sudo wget https://github.com/rocket-pool/smartnode-install/raw/release/install/scripts/stop-validator.sh -O /srv/rocketpool/stop-validator.sh
      • Modify the downloaded file for your validator service

        Open the file

        sudo nano /srv/rocketpool/stop-validator.sh

        Replace #sudo systemctl stop lighthouse-validator at the last line for:

        sudo systemctl stop rocketpool-validator

        Do not forget remove # at the start. Save and Exit the file by pressing ctrl+x, then y.

      • Allow execution
        sudo chmod +x /srv/rocketpool/stop-validator.sh

    Set up passwordless access

    • Request sudo visudo -f /etc/sudoers.d/rocketpool to open the configuration file

      Place the code below into the file

      Cmnd_Alias RP_RESTART = /usr/bin/systemctl restart rocketpool-validator
      Cmnd_Alias RP_STOP = /usr/bin/systemctl stop rocketpool-validator
      rocketpool    ALL=(ALL) NOPASSWD: RP_RESTART, RP_STOP
  12. Configurate Rocketpool native mode

    • Launch service configuration tool

      rocketpool service config

      And follow the documentation

    • Reload Daemon

      sudo systemctl daemon-reload
    • Start the services

      sudo systemctl enable rp-node rp-watchtower
    • Set automatic launch on system startup

      sudo systemctl start rp-node rp-watchtower
  13. Generate rocketpool wallet

    NOTE: It's recommended to access the device locally to generate the seed

    • Enable access to the directory for server user

      sudo chown -R myserveruser:myserveruser /srv/rocketpool/data
    • Unlink the server to the internet
    • Generate the wallet

      rocketpool wallet init
      and go through the process of generating the seed and wallet
    • Reboot PC

      $sudo reboot
    • Connect the server back to the internet
    • Now you can safely connect over SSH again
    • Check wallet status

      rocketpool wallet status
      and copy address for an option to paste it in next step
    • Retrun permision back to rocketpool user

      sudo chown -R rocketpool:rocketpool /srv/rocketpool/data
    • Set temporary permissions

      • $sudo usermod -aG rocketpool myserveruser
      • $sudo usermod -aG myserveruser rocketpool
      • $cd /srv/rocketpool/data/
      • $sudo chmod g+r password (temporary, it will be returned back to sudo chmod 600 password later)
      • $sudo chmod g+r wallet (temporary, it will be returned back to sudo chmod 600 wallet later)
  14. Set UMASK, if needed

    By default, your system will typically come with a umask configuration that will strip the +w bit from the group permissions whenever the node daemon creates a new folder. This is problematic for several consensus clients, because they will actually write things such as lock files or other metadata into the directories that the Smartnode creates when it generates new validator keys during a minipool deposit.

    To combat this and ensure your VC works correctly, please relax your umask settings. For example, instead of 0022, you should consider setting it to 0002 for the rp user.

    Guide: https://www.howtogeek.com/812961/umask-linux/

  15. Choosing Distributor / Smoothing pool option

    • $rocketpool node status - check fee distributor's address
    • $rocketpool node initialize-fee-distributor - fee distributor initialization
    • $rocketpool node distribute-fees - request fees distribution
    • $rocketpool node join-smoothing-pool
    • $rocketpool node leave-smoothing-pool
    • $rocketpool node claim-rewards
  16. Reload daemon

    sudo systemctl daemon-reload
  17. Launch Rocketpool services

    • sudo systemctl start rp-node rp-watchtower rocketpool-validator
    • Check Rocketpool services

      systemctl status rp-node rp-watchtower rocketpool-validator

      The VC will fail to start until you make a new Rocket Pool minipool (described later in the guides) because these files won't be created until that time, but the Beacon Node will be able to sync properly.

    • Monitor services

      journalctl -f -u rp-node -u rp-watchtower
      journalctl -f -u rocketpool-validator
  18. Prepare Rocketpool node

    guides/node/prepare-node
    • $rocketpool node status
    • $rocketpool node register
    • Whitelist HW wallet for RPL staking: $rocketpool node add-address-to-stake-rpl-whitelist <wallet>
    • Setting Withdrawal wallet: $rocketpool node set-withdrawal-address <wallet>https://stake.rocketpool.net/withdrawal/
    • Setting your Voting Delegate Address: $rocketpool node set-voting-delegate <wallet>
  19. Create a rocketpool validator

    guides/node/create-validator
  20. Monitor

    • $rocketpool node status
    • $journalctl -fu rp-node.service
    • $journalctl -fu rp-watchtower.service
    • $journalctl -fu prysmvalidator-rp
  21. Remove option to read wallet and password files for the group

    • $cd /srv/rocketpool/data/
    • $sudo chmod 600 password
    • $sudo chmod 600 wallet

Update Rocketpool service

  • Check version of running Rocketpool client

    $ rocketpool -v
  1. Download Rocketpool clients

    Rocketpool clients should be downloaded from the official Rocketpool Github.

    • Download latest Rocketool client (linux-amd64 version)

      wget https://github.com/rocket-pool/smartnode-install/releases/latest/download/rocketpool-cli-linux-amd64 -O ~/downloads/rocketpool
    • Download latest Rocketool daemon client (linux-amd64 version)

      wget https://github.com/rocket-pool/smartnode-install/releases/latest/download/rocketpool-daemon-linux-amd64 -O ~/downloads/rocketpoold
  2. Stop Rocketpool services

    • If preferred, you can wait for a moment after published attestation(s)
      journalctl -fu rocketpool-validator
    • Stop Rocketpool services

      sudo systemctl stop rp-node rp-watchtower rocketpool-validator
    • Check state

      systemctl status rp-node rp-watchtower rocketpool-validator
  3. Copy clients to targeted locations

    sudo cp rocketpool /usr/local/bin && sudo cp rocketpoold /usr/local/bin
  4. Set clients permissions

    • sudo chown rocketpool:rocketpool /usr/local/bin/rocketpool
    • sudo chown rocketpool:rocketpool /usr/local/bin/rocketpoold
    • sudo chmod +x /usr/local/bin/rocketpool
    • sudo chmod u+sx,g+sx,o-rwx /usr/local/bin/rocketpoold
  5. Start Rocketpool services

    sudo systemctl start rp-node rp-watchtower rocketpool-validator
  6. Check state of running

    systemctl status rp-node rp-watchtower rocketpool-validator

    Monitor logs

    • journalctl -fu rp-node.service
    • journalctl -fu rp-watchtower.service
    • journalctl -fu rocketpool-validator
  7. Remove downloaded clients files

    rm ~/downloads/rocketpool && rm ~/downloads/rocketpoold

Other commands

  • Check Rocketpool version

    $rocketpool -v - check rocketpool client version

  • Check Rocketpool health

    rocketpool node status
  • Claim rewards:

    • Beacon chain: rocketpool minipool distribute-balance
    • Tx Fees: rocketpool node distribute-fees
    • RPL: rocketpool node claim-rewards
  • Add another validator

    rocketpool node deposit