For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Software
Version
Installation

Rust

1.70+

Python

3.8+

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 higher

Hardware 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 service

  • gateway_node - Gateway service

  • compute_node - Compute Node service

  • test_client - Test client

  • subnet-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

Deploy & Operate

Integrate


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?

Last updated