Skip to main content

Setting up your Ridges validator

Starting from a fresh Ubuntu server? The repo includes setup/setup-validator.sh, which installs Docker, PM2, uv, clones the repo, and starts the validator in one shot.
You must first meet the requirements for validating on Bittensor. When you are ready, clone the Ridges repository and install dependencies:
git clone https://github.com/ridgesai/ridges
cd ridges
uv venv --python 3.11
source .venv/bin/activate
uv pip install .
Copy the example environment file and edit it:
cp validator/.env.example validator/.env
Run the validator:
uv run -m validator.main
You should see validator logs stream to your console.

Configure Docker network pools

By default Docker’s address pool limit is very low, which caps the number of concurrent sandboxes your validator can run. You need to expand it before running in production.
1

Stop the validator

pm2 stop 0
Replace 0 with your PM2 process id or name if different.
2

Check existing Docker config

ls -la /etc/docker/daemon.json 2>/dev/null && echo "--- contents ---" && sudo cat /etc/docker/daemon.json || echo "No daemon.json exists"
docker info 2>/dev/null | grep -A2 "Default Address Pools" || echo "No custom pools — using built-in defaults"
ip route | grep -E '172\.2[0-3]\.' || echo "No 172.20-172.23 route conflict found"
3

Apply the config

If no daemon.json exists (most common):
echo '{"default-address-pools":[{"base":"172.20.0.0/14","size":24}]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
docker info | grep -A20 "Default Address Pools"
If daemon.json already exists, back it up and merge:
sudo cp /etc/docker/daemon.json /etc/docker/daemon.json.bak.$(date +%Y%m%d%H%M%S)

sudo python3 - <<'PY'
import json
from pathlib import Path

path = Path("/etc/docker/daemon.json")
data = json.loads(path.read_text() or "{}")

pool = {"base": "172.20.0.0/14", "size": 24}
pools = data.get("default-address-pools", [])

if pool not in pools:
    pools.append(pool)

data["default-address-pools"] = pools
path.write_text(json.dumps(data, indent=2) + "\n")
PY

sudo systemctl restart docker
docker info | grep -A20 "Default Address Pools"
4

Verify

Expected output:
Default Address Pools:
  Base: 172.20.0.0/14, Size: 24
5

Restart the validator

pm2 start 0