Add Lighthouse validator

One-page interactive guide to install Lighthouse client and configurate it for running on supported chain.

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.

Lighthouse client can be used for staking on various supported chains. Client installation is always only one, used by services with an individual configuration (different service name, data path and ports in use).

Launch validator instance / validator(s)

  1. Do you want to create a new validation instance or extend exisiting instance for more validators?

    • Create a directory for validator instance data

      sudo mkdir -p /var/lib/lighthouse/vi1
    • Load keystores to /var/lib/lighthouse/vi1

      :
      sudo /usr/local/bin/lighthouse --network mainnet account validator import --reuse-password --directory $HOME/keystores/ddk_i1 --datadir /var/lib/lighthouse/vi1
      sudo /usr/local/bin/lighthouse --network gnosis account validator import --reuse-password --directory $HOME/keystores/ddk_i1 --datadir /var/lib/lighthouse/vi1
      • Insert keystores encryption password (the one used during keystores generation) on request
      • If there are keystores with different encryption password, repeat the process for each encryption password
    • Create a service user for the validator instance

      sudo useradd --system --no-create-home --shell /bin/false lighthouse-vi1
    • Set ownership of /var/lib/lighthouse/vi1 to validators-i1 user

      sudo chown -R lighthouse-vi1:lighthouse-vi1 /var/lib/lighthouse/vi1
    • Create configuration service file for lighthouse-vi1 service

      1. Open the configuration file

        sudo nano /etc/systemd/system/lighthouse-vi1.service
      2. Copy the configuration below into the file.

        [Unit]
        Description=Lighthouse Validator Instance (Mainnet)
        Wants=network-online.target
        After=network-online.target
        [Service]
        User=lighthouse-vi1
        Group=lighthouse-vi1
        Type=simple
        Restart=always
        RestartSec=5
        ExecStart=/usr/local/bin/lighthouse vc \
          --network mainnet \
          --datadir /var/lib/lighthouse/vi1 \
          --suggested-fee-recipient 0xXXXXXXXXXXXXXXXX \
          --beacon-nodes http://localhost:5052 \
          --graffiti "Nethermind+Lighthouse"
        [Install]
        WantedBy=multi-user.target
        [Unit]
        Description=Lighthouse Validator Instance (Gnosis Network)
        Wants=network-online.target
        After=network-online.target
        [Service]
        User=lighthouse-vi1
        Group=lighthouse-vi1
        Type=simple
        Restart=always
        RestartSec=5
        ExecStart=/usr/local/bin/lighthouse vc \
          --network gnosis \
          --datadir /var/lib/lighthouse/vi1 \
          --suggested-fee-recipient 0xXXXXXXXXXXXXXXXX \
          --beacon-nodes http://localhost:5052 \
          --graffiti "Nethermind+Lighthouse"
        [Install]
        WantedBy=multi-user.target
      3. Press CTRL + X then Y then ENTER to save and exit the config file.
    • Other configurations

      Nothing to do. You are ok.
      • Extend Staking manager clients.conf

        Insert lighthouse-vi1 into clients.conf file that is used by Staking Manager.
        sudo nano /usr/local/etc/staking/config/clients.conf
    • Stop running validator instance lighthouse-vi1

      sudo systemctl stop lighthouse-vi1
    • Extend /var/lib/lighthouse/vi1 for new keystores

      sudo /usr/local/bin/lighthouse --network mainnet account validator import --reuse-password --directory $HOME/keystores/ddk_i1 --datadir /var/lib/lighthouse/vi1
      sudo /usr/local/bin/lighthouse --network gnosis account validator import --reuse-password --directory $HOME/keystores/ddk_i1 --datadir /var/lib/lighthouse/vi1
      • You will be requested to insert keystores encryption password (the one used during keystores generation)
      • If there are keystores with different encryption password, repeat the process for each encryption password
      • Already existing keystores in the directory will be skipped
  2. Load processed changes to the system

    sudo systemctl daemon-reload
  3. Start the validator instance

    sudo systemctl start lighthouse-vi1
  4. Check the running validator instance

    systemctl status lighthouse-vi1
    journalctl -fu lighthouse-vi1
  5. Activate service to start automatically on OS startup

    $ sudo systemctl enable lighthouse-vi1