Gateway Operator
Complete guide for running a Gateway node on NCN Network.
Overview
Gateway nodes are the entry points for clients. They:
Accept inference requests from clients
Route tasks to compute nodes
Coordinate payments
Manage subnet configurations
Earnings: ~10% of each inference fee (routing fee)
Requirements
Hardware
CPU
2 cores
4 cores
RAM
4 GB
8 GB
Storage
50 GB SSD
100 GB SSD
Network
100 Mbps
1 Gbps
Software
Linux (Ubuntu 22.04 recommended)
Rust 1.70+ (for building)
Network connectivity to blockchain RPC
Capital
Subnet creation fee (varies by models)
Gas for blockchain transactions
Reserve for operational costs
Setup
1. Install Dependencies
2. Build Gateway
3. Generate Wallet
4. Configure Gateway
Create /etc/ncn/gateway.env:
5. Create Systemd Service
Create /etc/systemd/system/ncn-gateway.service:
6. Start Gateway
Create a Subnet
1. Prepare Subnet Configuration
Create subnet_config.json:
2. Estimate Fee
3. Create Subnet
Operations
Monitor Gateway
View Connected Compute Nodes
Check Subnet Status
Earnings
Fee Distribution
For each inference request:
10% goes to Gateway (you)
80% goes to Compute Node
5% goes to Validators
5% goes to Treasury
Track Earnings
Maintenance
Update Gateway
Backup Configuration
Rotate Keys
Troubleshooting
Gateway Won't Start
No Compute Nodes
Check compute nodes are running
Verify they're targeting your gateway address
Check network connectivity
Payment Issues
Verify RPC URL is correct
Check wallet has sufficient balance
Verify contract address
Security Best Practices
Secure Private Key
Use hardware wallet or HSM in production
Never commit keys to version control
Firewall
Only expose necessary ports
Use TLS for production
Monitoring
Set up alerts for anomalies
Monitor for unauthorized access
Next Steps
Monitoring - Set up monitoring
Production Deployment - Production hardening
Troubleshooting - Common issues
Last updated
