Getting Started
This guide will help you get NCN Network v2 running on your local machine in about 15 minutes.
Prerequisites
Before you begin, ensure you have the following installed:
Required Software
Verify Installation
# Check Rust version
rustc --version
# Expected: rustc 1.70.0 or higher
# Check Python version
python3 --version
# Expected: Python 3.8 or higher
# Check Git version
git --version
# Expected: git version 2.0 or higherHardware Requirements
For local development:
CPU: 4+ cores recommended
RAM: 8 GB minimum, 16 GB recommended
Storage: 10 GB free space
Installation
Step 1: Clone the Repository
Step 2: Build All Components
This will create the following binaries in target/release/ (or target/debug/):
p2p_registry_node- P2P Registry servicegateway_node- Gateway servicecompute_node- Compute Node servicetest_client- Test clientsubnet-cli- Subnet management CLI
Step 3: Set Up Python Environment (Optional)
If you want to run model inference:
Running the Network
You'll need 4 terminal windows to run all components:
Terminal 1: P2P Registry
The P2P Registry is the coordination service for the network.
Expected output:
Terminal 2: Gateway Node
The Gateway routes inference requests and manages payments.
Expected output:
Terminal 3: Compute Node
The Compute Node executes AI models.
Expected output:
Terminal 4: Test Client
Run a test inference request:
Expected output:
Quick Start with Docker
For a faster setup, use Docker Compose:
This starts:
P2P Registry on port 50050
Gateway on ports 50051 (gRPC), 8080 (HTTP), 9000 (WebSocket)
Compute Node connected to Gateway
See Docker Deployment Guide for more details.
Verify Everything is Working
Check Service Health
Submit a Test Request via HTTP
Directory Structure
After building, your directory should look like:
What's Next?
Now that you have NCN Network running locally, explore these topics:
Understand the System
Key Concepts - Learn the terminology
System Architecture - How it all fits together
Payment Flow - How payments work
Deploy & Operate
Docker Deployment - Production-ready containers
Gateway Operator Guide - Run a gateway
Compute Operator Guide - Provide compute
Integrate
gRPC Client Guide - Build a client
HTTP API Reference - REST API docs
Payment Integration - Add payments
Troubleshooting
Common Issues
Build Fails with "linker not found"
Install build essentials:
"Connection refused" to P2P Registry
Ensure the P2P Registry is running and check the address:
Compute Node fails to connect to Gateway
Verify the Gateway address matches:
For more help, see the Troubleshooting Guide.
Need Help?
FAQ - Frequently asked questions
Troubleshooting - Common issues and solutions
GitHub Issues - Report bugs or request features
Last updated
