Lux Docs

lux network

Manage local and remote networks

The network command manages the lifecycle of local Lux networks used for development and testing. It controls node processes and runtime state via the Netrunner gRPC server.

Commands

# Start a local network
lux network start --mainnet    # 5 validators, port 9630
lux network start --testnet    # 5 validators, port 9640
lux network start --devnet     # 5 validators, port 9650
lux network start --dev        # 1 node, port 8545

# Stop the running network
lux network stop
lux network stop --snapshot-name my-backup

# Check network status and endpoints
lux network status

# Clean all runtime data (preserves chain configs)
lux network clean

# Manage snapshots
lux network snapshot save <name>
lux network snapshot restore <name>
lux network snapshot list

Network Types

TypeNetwork IDC-Chain IDBase PortValidators
--mainnet19636996305
--testnet29636896405
--devnet39637096505
--dev1337133785451

Typical Workflow

# Start a development network
lux network start --testnet

# Deploy a chain
lux chain create mychain --evm-chain-id=12345
lux chain deploy mychain --testnet

# Work with the chain...

# Save state and stop
lux network stop --snapshot-name checkpoint1

# Resume later
lux network start --testnet --snapshot-name checkpoint1

Port Allocation

Each 5-validator network uses 5 HTTP ports (base, +2, +4, +6, +8):

NodeMainnet HTTPTestnet HTTP
node-096309640
node-196329642
node-296349644
node-396369646
node-496389648

On this page