Create lighthousevalidator user and set permissions.
sudouseradd--no-create-home--shell/bin/falselighthousevalidatorsudomkdir-p/var/lib/lighthouse/validatorssudochown-Rlighthousevalidator:lighthousevalidator/var/lib/lighthouse/validators# <THIS IS NEEDED SO THE VALIDATOR CAN IMPORT THE KEYSTORES>sudochmod700/var/lib/lighthouse/validators
Configure lighthousevalidator service using the command line flags.
[Unit]Description=LighthouseEthereumClient-ValidatorClientAfter=network-online.targetWants=network-online.target[Service]User=lighthousevalidatorGroup=lighthousevalidatorType=simpleRestart=alwaysRestartSec=5Environment=NETWORK=# E.g. mainnet or holeskyEnvironment=DATADIR=# Default: /var/lib/lighthouseEnvironment=GRAFFITI=# E.g. For the merge!Environment=METRICS_PORT=# Default: 5064Environment=MONITORING_ENDPOINTS=Environment=SUGGESTED_FEE_RECIPIENT=Environment=BEACON_NODES=ExecStart=/usr/local/bin/lighthousevc \--network ${NETWORK} \--datadir ${DATADIR} \--graffiti ${GRAFFITI} \--metrics \--metrics-port ${METRICS_PORT} \--monitoring-endpoint ${MONITORING_ENDPOINTS} \--enable-doppelganger-protection \--suggested-fee-recipient ${SUGGESTED_FEE_RECIPIENT} \--builder-proposals \--beacon-nodes ${BEACON_NODES}[Install]WantedBy=multi-user.target
/usr/local/bin/lighthouse vc
Starts the validator node
--network
Name of the chain Lighthouse will sync and follow
Possible values:
mainnet
prater
gnosis
kiln
ropsten
--datadir
Used to specify a custom root data directory for lighthouse keys and databases
--graffiti
Specify your custom graffiti to be included in blocks
--monitoring-endpoint
--enable-doppelganger-protection
Protects from the chance of two instances of the validator starting on the same system
Not perfect, and does have a penalty of waiting for 2-3 epochs (approx. 6.4 minutes per epoch)
It's a bit annoying to miss a few attestations, and would be very sad to miss a block, but the chance of me being a block proposer during that downtime is very low, and the benefits of not getting slashed are much greater
--metrics
Enable the Prometheus metrics HTTP server
Disabled by default
--suggested-fee-recipient
The fallback address provided to the Beacon Node if nothing suitable is found in the validator definitions or fee recipient file
Start the service and check it's working as expected.
Command Aliases
daemon-reload# Reload any changes made to the lighthousevalidator.servicelighthouse-validator-enable# Enable the lighthousevalidator.servicelighthouse-validator-start# Start the lighthousevalidator.servicelighthouse-validator-status# View the status of the lighthousevalidator.servicelighthouse-validator-log# View the lighthousevalidator.service logs
At this point, the lighthousevalidator.service is running with no keystores.
So it will just show a message saying something like No validators present which is fine.