Install Geth & Lighthouse services - Ajay1559/rocketpool-on-arm GitHub Wiki

To run Rocket Pool "Native Mode" we need to run all the services ourselves just like as if we were a solo staker ;)

Execution Client => Geth

  1. sudo useradd -r -s /sbin/nologin execution-chain
  2. sudo mkdir -p /home/execution-chain/.geth
  3. sudo chown -R execution-chain:execution-chain /home/execution-chain/
  4. sudo vi /etc/ethereum/execution-chain.conf
   ARGS="--datadir /home/execution-chain/.geth \
   --mainnet \
   --metrics \
   --metrics.expensive \
   --pprof \
   --http \
   --authrpc.jwtsecret=/etc/ethereum/jwtsecret"
  1. sudo vi /usr/lib/systemd/system/execution-chain.service
   [Unit]
   Description=Ethereum geth client daemon by The Ethereum Foundation
   After=network.target

   [Service]
   EnvironmentFile=/etc/ethereum/execution-chain.conf
   ExecStart=/usr/bin/geth $ARGS
   Restart=always
   User=execution-chain
   KillSignal=SIGTERM
   TimeoutStopSec=600

   [Install]
   WantedBy=multi-user.target
  1. sudo systemctl daemon-reload
  2. If the service is not already running and enabled on startup: sudo systemctl enable --now execution-chain
  3. To watch the logs: sudo journalctl -u execution-chain -b -f

Consensus Client => Lighthouse

  1. sudo useradd -r -s /sbin/nologin consensus-chain
  2. sudo mkdir -p /home/consensus-chain/.lighthouse
  3. sudo chown -R consensus-chain:consensus-chain /home/consensus-chain/
  4. sudo vi /etc/ethereum/consensus-chain.conf
   ARGS="beacon \
   --network mainnet \
   --datadir /home/consensus-chain/.lighthouse \
   --http \
   --metrics \
   --execution-endpoint http://127.0.0.1:8551 \
   --execution-jwt /etc/ethereum/jwtsecret \
   --builder http://127.0.0.1:18550 \
   --checkpoint-sync-url https://beaconstate.ethstaker.cc \
   --prune-payloads false"

Note: --eth1 has been removed as it is deprecated in recent versions of Lighthouse.

Note: If your beacon node database becomes corrupted, you can force a fresh checkpoint sync with: lighthouse bn --purge-db --checkpoint-sync-url=https://beaconstate.ethstaker.cc Stop the service first, run this one-off command, wait for the checkpoint to load, then Ctrl+C and restart the service normally.

  1. sudo vi /usr/lib/systemd/system/consensus-chain.service
   [Unit]
   Description=Lighthouse Beacon chain daemon
   After=network.target

   [Service]
   EnvironmentFile=/etc/ethereum/consensus-chain.conf
   ExecStart=/usr/bin/lighthouse $ARGS
   Restart=always
   User=consensus-chain
   KillSignal=SIGTERM
   TimeoutStopSec=600

   [Install]
   WantedBy=multi-user.target
  1. sudo systemctl daemon-reload
  2. If the service is not already running and enabled on startup: sudo systemctl enable --now consensus-chain
  3. To watch the logs: sudo journalctl -u consensus-chain -b -f

Validator Client => Lighthouse

Some of these things will not work until Rocket Pool home folders & wallet are set up.

  1. sudo useradd -r -s /sbin/nologin validator
  2. sudo mkdir -p /home/validator/.ethereum
  3. sudo chown -R validator:validator /home/validator
  4. sudo vi /etc/ethereum/validator@rocketpool
   ARGS="validator \
   --network mainnet \
   --datadir /home/rocketpool/data/validators/lighthouse \
   --graffiti \"Hello World!\" \
   --init-slashing-protection \
   --enable-doppelganger-protection"
  • Note: fee-recipient is in a separate conf file
  • This is set up to support running multiple validators if needed
  1. sudo vi /lib/systemd/system/[email protected]
   [Unit]
   Description=Lighthouse Validator %I
   After=network.target

   [Service]
   EnvironmentFile=/etc/ethereum/validator@%i
   EnvironmentFile=/home/%i/data/validators/rp-fee-recipient-env.txt
   ExecStart=/usr/bin/lighthouse $ARGS --suggested-fee-recipient ${FEE_RECIPIENT}
   Restart=always
   User=validator

   [Install]
   WantedBy=multi-user.target
  1. sudo systemctl daemon-reload
  2. If the service is not already running and enabled on startup: sudo systemctl enable --now validator@rocketpool
  3. To watch the logs: sudo journalctl -u validator@rocketpool -b -f

Monitoring (Prometheus + Grafana)

Both Geth and Lighthouse already expose metrics with the flags above. Default metrics ports:

Service Port
Geth metrics 6060
Lighthouse beacon metrics 5054
Lighthouse validator metrics 5064
Prometheus 9090
Grafana 3000

Install monitoring stack

sudo apt-get update && sudo apt-get install -y prometheus prometheus-node-exporter

# Add Grafana repo
sudo mkdir -p /etc/apt/keyrings
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt-get update && sudo apt-get install -y grafana

sudo systemctl enable --now prometheus prometheus-node-exporter grafana-server

Prometheus config /etc/prometheus/prometheus.yml

Add these jobs under scrape_configs:

  - job_name: 'geth'
    scrape_interval: 15s
    scrape_timeout: 10s
    metrics_path: /debug/metrics/prometheus
    static_configs:
      - targets: ['localhost:6060']

  - job_name: 'lighthouse_beacon'
    static_configs:
      - targets: ['localhost:5054']

  - job_name: 'lighthouse_validator'
    static_configs:
      - targets: ['localhost:5064']

Grafana dashboard IDs to import

Dashboard ID
Node exporter (system) 1860
Geth 18463
Lighthouse beacon JSON