Lighthouse
Last updated
Last updated
Documentation
Create a service user for the consensus service, create data directory and assign ownership.
sudo adduser --system --no-create-home --group consensus
sudo mkdir -p /var/lib/lighthouse
sudo chown -R consensus:consensus /var/lib/lighthouse
Install dependencies.
sudo apt install curl jq ccze -y
Downloading binaries is often faster and more convenient.
Building from source code can offer better compatibility and is more aligned with the spirit of FOSS (free open source software).
Create a systemd unit file to define your consensus.service
configuration.
sudo nano /etc/systemd/system/consensus.service
Paste the following configuration into the file.
[Unit]
Description=Lighthouse Consensus Layer Client service for Mainnet
Wants=network-online.target
After=network-online.target
Documentation=https://www.coincashew.com
[Service]
Type=simple
User=consensus
Group=consensus
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
TimeoutStopSec=900
ExecStart=/usr/local/bin/lighthouse bn \
--datadir /var/lib/lighthouse \
--network mainnet \
--staking \
--validator-monitor-auto \
--metrics \
--checkpoint-sync-url=https://beaconstate.info \
--port 9000 \
--quic-port 9001 \
--http-port 5052 \
--target-peers 100 \
--metrics-port 8008 \
--execution-endpoint http://127.0.0.1:8551 \
--execution-jwt /secrets/jwtsecret
[Install]
WantedBy=multi-user.target
To exit and save, press Ctrl
+ X
, then Y
, then Enter
.
Run the following to enable auto-start at boot time.
sudo systemctl daemon-reload
sudo systemctl enable consensus
Finally, start your consensus layer client and check it's status.
sudo systemctl start consensus
sudo systemctl status consensus
Press Ctrl
+ C
to exit the status.
Check your logs to confirm that the consensus client is up and syncing.
sudo journalctl -fu consensus | ccze
Press Ctrl
+ C
to exit the logs.
sudo journalctl -fu consensus | ccze
Example of Synced Lighthouse Consensus Client Logs
Feb 03 01:02:36.000 INFO New block received root: 0xb5ccb2f85d981ca9e1c0d904f967403ddf8c47532c195fe213c94a28ffaf6a2e, slot: 2138
Feb 03 01:02:42.000 INFO Synced slot: 2138, block: 0x1cb281a, epoch: 121, finalized_epoch: 120, finalized_root: 0x1dce0, exec_hash: 0x6827aeb (verified), peers: 50, service: slot_notifier
Now that your consensus client is configured and started, you have a full node.
Proceed to the next step on setting up your validator client, which turns a full node into a staking node.