How to Set Up a Solana Validator

ยท

This guide provides a technical walkthrough for setting up a Solana mainnet validator. It covers essential tools, configurations, and operational best practices while excluding advanced validator economics (e.g., stake attraction, subsidies).

Prerequisites: Basic Linux system administration skills (terminal commands, shell scripting, configuration files). New to Linux? Check out Linux Journey.


Terminology: What Is a Solana Validator?

The solana-validator binary within the Solana CLI performs these core functions:

Synonyms: Client (network participant), server (data provider), or node.

RPC Node: An unstaked, non-voting validator that serves network data without participating in consensus.

Validator Entity: An ecosystem participant running a staked, voting validator.


Step 1: Server Hardware Requirements

Minimum Specifications:

Options:

  1. Self-Hosted: Purchase and manage hardware.
  2. Data Center Rental: Providers like TeraSwitch offer optimized setups.
  3. Cloud Providers: Not recommended due to cost/performance issues.

Decentralization Tip: Choose locations/ASNs with fewer existing nodes to qualify for delegation programs like the Solana Foundation Delegation Program (SFDP).

Top Data Centers: Listed on validators.app.


Step 2: Install Solana CLI Locally

  1. Installation: Follow the official guide.
  2. Configure Endpoints:

    $ solana config set --url https://api.testnet.solana.com  # Testnet
    $ solana config set --url https://api.mainnet-beta.solana.com  # Mainnet
  3. Wallet Setup:

    $ solana-keygen new --outfile ~/.config/solana/id.json  
    $ solana airdrop 1 ~/.config/solana/id.json  # Testnet only  

Pro Tip: Use separate wallets for testnet/mainnet to avoid accidental transactions.


Step 3: Set Up Vote Account

Keypairs Required:

  1. Identity Keypair: Validator identifier (keep minimal SOL balance).
  2. Vote Account Keypair: Immutable vote account reference.
  3. Withdraw Keypair: Master key (store offline; consider paper/hardware wallet).

Commands:

$ solana-keygen new -o identity.json  
$ solana-keygen new -o vote.json  
$ solana-keygen new -o withdraw.json  
$ solana create-vote-account --fee-payer ~/.config/solana/id.json vote.json identity.json withdraw.json  

Optional:


Step 4: Configure Validator Server

System Setup:

  1. Ubuntu LTS: Latest stable version.
  2. Service User:

    $ sudo adduser sol  

Tuning:

Apply Solana-recommended sysctl settings for file descriptors/memory limits.

Storage:


Step 5: Install Solana CLI on Server

Recommended: Build from source. Update using:

$ solana-install update  

Optional: Install Jito Validator for MEV revenue.


Step 6: Validator Run Script

Example validator.sh for testnet:

#!/bin/bash  
solana-validator \  
 --identity identity.json \  
 --known-validator <PUBKEY> \  
 --log /home/sol/logs/solana-validator.log \  
 --accounts /home/sol/accounts \  
 --ledger /home/sol/ledger \  
 --rpc-port 8899 \  
 --entrypoint entrypoint.testnet.solana.com:8001 \  
 --expected-genesis-hash 4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY  

Verification:

$ solana catchup <VALIDATOR_PUBKEY>  

Step 7: Monitoring

  1. Solana Watchtower: Alerts for downtime/stake changes.
  2. Custom Health Checks: Poll getHealth RPC.
  3. Third-Party Tools: Datadog, Splunk, or Stakewiz.

Step 8: Delegate Stake

  1. Create Stake Account:

    $ solana create-stake-account stake_acct_1.json 1 --stake-authority stake_auth.json  
  2. Delegate:

    $ solana delegate-stake stake_acct_1.json <VALIDATOR_PUBKEY>  

Activation: Stake becomes active next epoch.


Step 9: Publish Validator Info

$ solana validator-info publish "My Validator" \  
 --website "https://myvalidator.com" \  
 --icon-url "https://myvalidator.com/icon.png" \  
 --details "High-performance Solana validator."  

FAQ

Q: How much SOL is needed to start voting?

A: ~1-2 SOL/day for voting transactions.

Q: Can I run a validator on cloud servers?

A: Possible but not cost-effective; dedicated hardware is recommended.

Q: How do I attract stake to my validator?

A: Set competitive commissions, publish metadata, and join delegation programs.

๐Ÿ‘‰ Explore advanced validator strategies


Conclusion

Your Solana validator is now operational! Join the Validator Community for updates and support.

Additional Resources: