Lighthouse client Installation guide

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. See more.

Install client

  1. Find the latest stable version of Lighthouse on Github

  2. Download Lighthouse version 7.1.0 to your node

    cd ~/downloads && curl -LO https://github.com/sigp/lighthouse/releases/download/v7.1.0/lighthouse-v7.1.0-x86_64-unknown-linux-gnu.tar.gz

    Extract downloaded file

    tar xvf lighthouse-v7.1.0-x86_64-unknown-linux-gnu.tar.gz
  3. Replace old Lighthouse client for new
    sudo cp ~/downloads/lighthouse /usr/local/bin
  4. Remove downloaded files

    cd ~/downloads && rm lighthouse-v7.1.0-x86_64-unknown-linux-gnu.tar.gz && rm -r lighthouse

Configurate the service

  1. Create a user for lighthouse beacon

    :
    sudo useradd --system --no-create-home --shell /bin/false lighthousebeacon
  2. Create a directory for data

    :
    sudo mkdir -p /var/lib/lighthouse/beacon
  3. Set permission for accessing the directory

    sudo chown -R lighthousebeacon:lighthousebeacon /var/lib/lighthouse/beacon
  4. Communication ports selection

    Each service on the server needs a custom port for communication. Through ports, consensus client communicates with other peers in the network as well as other services running on the server, such as validator clients. There is an IPv4 and IPv6 variant, depending on the ISP support / preference. Each protocol version needs custom port. If you are not sure what to select, continue with default IPv4 port.

    1. Configurate public IPv4 port for P2P communication with other peers

      • :
      • Verify availability of selected port 9000
        ss -tuln | grep ':9000'

        If it returns empty response, the port 9000 is free and can be used.

      • Enable traffic on the port through UFW
        sudo ufw allow 9000
      • Disable IPv6 traffic on the port
        • List allowed ports
          sudo ufw status numbered
        • Find order number for V6, see 9000 (V6) and remove it with the following line
          sudo ufw delete <Number>
    2. QUIC IPv4 port

      • :
      • Verify availability of selected port 9001
        ss -tuln | grep ':9001'

        If it returns empty response, the port 9001 is free and can be used.

    3. Beacon API port for internal communication

      • :
      • Verify availability of selected port 5052
        ss -tuln | grep ':5052'

        If it returns empty response, the port 5052 is free and can be used.

    1. Configurate public IPv6 port for P2P communication with other peers

      • :
      • Verify availability of selected port 9090
        ss -tuln | grep ':9090'

        If it returns empty response, the port 9090 is free and can be used.

      • Enable traffic on the port through UFW
        sudo ufw allow 9090
      • Disable IPv6 traffic on the port
        • List allowed ports
          sudo ufw status numbered
        • Find order number for V6, see 9090 and remove it with the following line
          sudo ufw delete <Number>
    2. QUIC IPv6 port

      • :
      • Verify availability of selected port 9091
        ss -tuln | grep ':9091'

        If it returns empty response, the port 9091 is free and can be used.

  5. Create configuration file for Lighthouse Beacon service

    Open Lighthouse Beacon configuration file

    sudo nano /etc/systemd/system/lighthousebeacon.service

    Copy the configuration below into the file. If needed, check flags documentation.

    [Unit]
    Description=Lighthouse Consensus Client BN (Ethereum Mainnet)
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    User=lighthousebeacon
    Group=lighthousebeacon
    Type=simple
    Restart=always
    RestartSec=5
    ExecStart=/usr/local/bin/lighthouse bn \
      --network mainnet \
      --datadir /var/lib/lighthouse \
      --http \
      --execution-endpoint http://127.0.0.1:8551 \
      --execution-jwt /var/lib/jwtsecret/ethereum.hex \
    #  --target-peers 80 \
      --checkpoint-sync-url https://beaconstate.info \
      --port 9000 \
      --port6 9090 \
    #  --discovery-port 9000 \
      --quic-port 9001 \
      --quic-port6 9091 \
      --http-port 5052
    
    [Install]
    WantedBy=multi-user.target
    Notes:
    [Unit]
    Description=Lighthouse Consensus Client BN (Gnosis Network)
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    User=lighthousebeacon
    Group=lighthousebeacon
    Type=simple
    Restart=always
    RestartSec=5
    ExecStart=/usr/local/bin/lighthouse bn \
      --network gnosis \
      --datadir /var/lib/lighthouse \
    #  --subscribe-all-subnets \
      --execution-endpoint http://localhost:8551 \
      --execution-jwt /var/lib/jwtsecret/gnosis.hex \
    #  --target-peers 80 \
      --checkpoint-sync-url https://checkpoint.gnosischain.com \
      --http \
      --port 9000 \
      --port6 9090 \
    #  --discovery-port 9000 \
      --quic-port 9001 \
      --quic-port6 9091 \
      --http-port 5052
    
    [Install]
    WantedBy=multi-user.target

    Notes:

    *Note: Update execution-jwt, if you use different

    Press CTRL + X then Y then ENTER to save and exit the config file.

  6. Load changes made in config files to the system

    sudo systemctl daemon-reload

Launch the service

  • Start the service
    sudo systemctl start lighthousebeacon
  • Check the state
    systemctl status lighthousebeacon && journalctl -fu lighthousebeacon
  • Activate service to start automatically
    sudo systemctl enable lighthousebeacon
    • Open Delayed Start shell
      sudo nano /usr/local/bin/delayed-start.sh

      Configurate service start inside it

      systemctl start lighthousebeacon.service
    • Be sure, delayed-start.service service controlling delayed-start.sh is enabled for auto start with system startup
      sudo systemctl enable delayed-start.service
    1. Configurate Staking Manager util

      • Open the configuration file
        sudo nano /usr/local/etc/staking/config/clients.conf

        If the file is empty, generate it with command sudo /usr/local/bin/staking.sh init

      • Set link to proper service. It should be as follow:
        beaconServices="lighthousebeacon"

        If you place more services to the category, separate them with a space, see beaconServices="service1 service2 service3 ..."

    2. Activate service to start automatically on OS startup

      • Open Start with delay util
        sudo nano /usr/local/bin/delayed-start.sh
      • Place or uncomment a command to start the beacon client(s)
        /usr/local/bin/staking.sh start beacon
      • Verify, that a service `delayed-start.service` exists and is automatically launched on system start.
        sudo systemctl enable delayed-start.service

Any issue while running Lighthouse client?

Check Lighthouse client emergency page.

Update Lighthouse client Emergency for Lighthouse client Add Lighthouse validator Exit Lighthouse validator