Validator Setup Guide
Step-by-step guide to setting up a Realm validator node. This guide assumes you have hardware meeting the requirements.
Prerequisites
Before starting, ensure you have:
- Hardware meeting minimum requirements
- 100,000 RLM for staking
- Ubuntu 22.04 LTS installed
- NVIDIA GPU with CUDA support
1. Install Dependencies
bash
# Install dependencies (Ubuntu 22.04)sudo apt updatesudo apt install -y build-essential cmake git curl# Install CUDA (if not already installed)wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux.runsudo sh cuda_12.3.0_545.23.06_linux.run# Verify CUDAnvidia-sminvcc --version
2. Build Validator
bash
# Clone the repositorygit clone https://github.com/realm-exchange/chain.gitcd chain# Build with GPU supportcmake --preset=releasemake -C build/release -j$(nproc)# Verify build./build/release/realm-validator --version
3. Generate Validator Keys
bash
# Generate validator keypairrealm-validator keygen --output /etc/realm/validator.key# This creates:# - /etc/realm/validator.key (secret key - KEEP SAFE!)# - /etc/realm/validator.pub (public key)# Back up the secret key securely!# If lost, you cannot recover your validator identity# Set permissionssudo chown realm:realm /etc/realm/validator.keysudo chmod 600 /etc/realm/validator.key
Backup Your Keys!
Your validator secret key is your identity. If lost, you cannot recover your validator or access staked funds. Store multiple encrypted backups.
4. Configure Validator
Create the configuration file:
/etc/realm/validator.yamlyaml
# /etc/realm/validator.yaml# Network identityvalidator:name: "my-validator"# P2P configurationnetwork:listen_addr: "0.0.0.0:9091"external_addr: "YOUR_PUBLIC_IP:9091"seeds:- "seed1.realm.software:9091"- "seed2.realm.software:9091"- "seed3.realm.software:9091"# gRPC APIapi:listen_addr: "0.0.0.0:9090"# Storagestorage:data_dir: "/var/lib/realm"# GPUgpu:device_id: 0batch_size: 8192# Consensusconsensus:block_time_ms: 25max_block_size: 1048576
Key configuration options:
external_addr— Your public IP and portseeds— Initial peers to connect togpu.device_id— GPU to use (0 for first GPU)gpu.batch_size— Signatures per batch (8192 optimal)
5. Setup Systemd Service
/etc/systemd/system/realm-validator.serviceini
# /etc/systemd/system/realm-validator.service[Unit]Description=Realm Validator NodeAfter=network.target[Service]Type=simpleUser=realmGroup=realmExecStart=/usr/local/bin/realm-validator --config /etc/realm/validator.yamlRestart=alwaysRestartSec=5LimitNOFILE=65535# EnvironmentEnvironment="CUDA_VISIBLE_DEVICES=0"[Install]WantedBy=multi-user.target
6. Start Validator
bash
# Create user and directoriessudo useradd -r -s /bin/false realmsudo mkdir -p /var/lib/realm /etc/realmsudo chown realm:realm /var/lib/realm# Copy binary and configsudo cp build/release/realm-validator /usr/local/bin/sudo cp config/validator.yaml /etc/realm/# Install systemd servicesudo cp deploy/systemd/realm-validator.service /etc/systemd/system/sudo systemctl daemon-reload# Start validatorsudo systemctl enable realm-validatorsudo systemctl start realm-validator# Check statussudo systemctl status realm-validatorsudo journalctl -u realm-validator -f
7. Verify Operation
Check that your validator is syncing:
bash
# Check sync statuscurl http://localhost:9090/v1/chain/info# Should show:# - Block height increasing# - Connected peers > 0# - Syncing: true (initially) → false (when caught up)# Check logssudo journalctl -u realm-validator -f
8. Stake RLM
Once synced, stake RLM to activate your validator. See the Staking Guide for details.
typescript
# Using the SDKconst stake = await client.stake({amount: 100000, // 100,000 RLMvalidatorAddress: 'YOUR_VALIDATOR_ADDRESS',});
9. Setup Monitoring
We recommend setting up Prometheus + Grafana for monitoring:
- CPU/GPU utilization
- Memory usage
- Block height and sync status
- Peer connections
- Signature verification rate
Grafana Dashboard
Import our pre-built dashboard from
deploy/grafana/realm-dashboard.json.Next Steps
- Staking Guide — Stake RLM and earn rewards
- Security Guide — Protect your validator