Solana Validator Setup
Optimal Hardware Requirements
- CPU: 16 cores @ 3GHz
- RAM: 128GB
- Storage: 500GB (OS) + 500GB (Accounts) + 1TB (Ledger)
Start with a fresh Ubuntu VM (Server 20.04).
Dependencies
- Create unprivileged Solana user:
- Update package information:
- Create directory structure:
- (optional: if using multiple disks) Mount accounts and ledger partitions:
- Mount disks and set ownership:
Available partitions can be listed by sudo lsblk
.
UUID of a partition can be obtained by sudo blkid /dev/<partition>
.
- (optional: if sudo version is < 1.9) Update
sudo
to >= v1.9 from source (for the RLIMIT_CORE
patch):
- Install make dependencies
- Fetch source and uncompress
- Relogin.
Tune System
- Optimize sysctl knobs:
- Increase process file descriptor count limit:
- Relogin.
Connect to Cluster
- Switch to the
solana
user:
- Install the Solana Toolkit binary:
- Set the cluster URL using Solana CLI:
- Before attaching a validator node, sanity check that the cluster is accessible by fetching the cluster version:
If everything went well, the cluster version will be returned.
Create Accounts
- Generate an identity keypair for the validator:
- Set the Solana config to use the generated keypair:
- Generate authorized withdrawer account keypair:
- Generate vote account keypair:
- Add token to account via airdrop (required for creating a vote account):
- Create vote account:
Connect Validator
- Make a script to start the validator:
- Create a service to start validator on boot:
/etc/systemd/system/validator.service
- Enable and start the service:
- Test validator connection:
A successful connection would return a list with the validator's public key and IP address.
- Set up logrotate to limit log size:
- Give appropriate permissions:
- Restart logrotate to load the new configuration:
To Do
- TPU and RPC address is 'none' on gossip, why?
- Prometheus
- Grafana
- "update" instructions