Getting Started
This guide walks you through installing darkreach, running your first prime search, joining the network, and viewing results in the dashboard.
Prerequisites
- Rust 1.75 or later — rustup.rs
- GMP (GNU Multiple Precision Arithmetic Library)
macOS
brew install gmpLinux (Debian/Ubuntu)
sudo apt install build-essential libgmp-dev m4Build
git clone https://github.com/darkreach-ai/darkreach.git
cd darkreach
cargo build --releaseThe binary will be at ./target/release/darkreach.
Run Your First Search
Try a quick factorial prime search to verify everything works:
./target/release/darkreach factorial --start 1 --end 100You should see output on stderr as candidates are sieved, filtered, and tested, with any primes logged to the console.
More search examples
# Proth primes k·2^n+1
./target/release/darkreach kbn --k 3 --base 2 --min-n 1 --max-n 1000
# Palindromic primes in base 10
./target/release/darkreach palindromic --base 10 --min-digits 1 --max-digits 9
# Twin primes
./target/release/darkreach twin --k 3 --base 2 --min-n 1 --max-n 10000
# Sophie Germain primes
./target/release/darkreach sophie-germain --k 3 --base 2 --min-n 1 --max-n 10000
# Primorial primes
./target/release/darkreach primorial --start 1000 --end 50000Connect to a Database
To persist discoveries and see them in the dashboard, provide a PostgreSQL connection:
export DATABASE_URL="postgres://user:pass@localhost/darkreach"
./target/release/darkreach factorial --start 1000 --end 5000Results will be stored in the primes table and visible in the dashboard.
Join the Network
Instead of running standalone searches, you can join the distributed network to contribute compute to coordinated campaigns:
# Connect to the coordinator and start working
./target/release/darkreach work \
--coordinator https://api.darkreach.aiYour node will automatically:
- Register with the coordinator
- Claim work blocks from active searches
- Run the sieve → test → prove pipeline
- Report results and heartbeat every 10 seconds
See the Network & Operators guide for setting up operator accounts and multi-node deployments.
Checkpointing
Searches automatically checkpoint progress every 60 seconds with atomic writes and SHA-256 integrity verification. If a search is interrupted, it resumes from the last valid checkpoint:
# Checkpoint is saved to darkreach.checkpoint by default
# Use --checkpoint to specify a custom path
./target/release/darkreach --checkpoint my-search.checkpoint \
kbn --k 3 --base 2 --min-n 100000 --max-n 500000Launch the Dashboard
The coordinator can serve the dashboard directly:
# Start the coordinator with dashboard
./target/release/darkreach dashboard \
--database-url postgres://user:pass@localhost/darkreach \
--port 7001
# Open http://localhost:7001 in your browserOr use the hosted dashboard at app.darkreach.ai.
Next Steps
- Learn about the system architecture
- Explore all 12 prime forms
- Understand verification and certificates
- See how the AI engine optimizes searches
- Set up projects for coordinated campaigns
- Deploy a coordinator or worker
- Contribute to the project