sui start command starts a local Sui network. It can run in two modes: persisted state (using existing genesis) or ephemeral state (regenerated each run).
Synopsis
Options
Config directory containing network configuration. If not specified and no genesis exists, a new one is auto-generated in
~/.sui/sui_config/Create new genesis each run without persisting state. Only use when you want to start from scratch every time
Start a faucet with specified host:port (e.g.,
0.0.0.0:9123). Default: 0.0.0.0:9123 if flag is provided without value. Use --with-faucet=HOST:PORT for custom valuesStart an indexer with PostgreSQL database. Three modes:
- Not specified: No indexer
--with-indexer: Temporary local database in config directory--with-indexer=<URL>: Use provided PostgreSQL database URL. Use--with-indexer=postgres://...for custom database
Start a Consistent Store at specified host:port. Default:
0.0.0.0:9124 if flag is provided. Automatically enabled when --with-graphql is set. Use --with-consistent-store=HOST:PORT for custom valuesStart a GraphQL server at specified host:port. Default:
0.0.0.0:9125 if flag is provided. Automatically enables indexer and consistent store if not already set. Use --with-graphql=HOST:PORT for custom valuesPort to start the Fullnode RPC server on
Set the epoch duration in milliseconds. Can only be used with
--force-regenesis or when no genesis exists. Default: 60000ms (1 minute) with --force-regenesisDirectory to dump executed checkpoints as files. Incompatible with
--no-full-node. Defaults to temporary directory if --with-indexer is setStart the network without a fullnode
Set number of validators in the network. Only applies when generating new genesis (with
--force-regenesis or no existing genesis)Description
By default,sui start starts a local network from the genesis blob that exists in the Sui config directory. If no genesis exists, it will generate one automatically.
The network includes:
- Validator nodes (default: 4 validators)
- Optional fullnode (default: enabled)
- Optional faucet service
- Optional indexer with PostgreSQL
- Optional GraphQL server
- Optional consistent store
Operational Modes
1. Persisted Mode (Default)
State is preserved between runs:2. Ephemeral Mode
New genesis each run, no state persistence:3. Custom Config Directory
Use a specific network configuration:Starting Services
Faucet
Start with a local faucet:Indexer
Start with an indexer:Indexer requires PostgreSQL. The local database option automatically manages a temporary PostgreSQL instance.
GraphQL Server
Start with GraphQL API:http://127.0.0.1:9125/graphql
GraphQL IDE: http://127.0.0.1:9125 (if not disabled)
Consistent Store
Start with consistent state storage:http://127.0.0.1:9124
Full Stack Local Development
Start all services for complete local development:- RPC: http://127.0.0.1:9000
- Faucet: http://127.0.0.1:9123
- GraphQL: http://127.0.0.1:9125
- Consistent Store: http://127.0.0.1:9124
- Epoch Duration: 30 seconds
Network Configuration
Default Setup
Whensui start runs without existing genesis:
- Validators: 4 validators (or
--committee-sizevalue) - Fullnode: 1 fullnode on port 9000
- Epoch Duration: 60 seconds with
--force-regenesis - Config Directory:
~/.sui/sui_config/
Custom Validators
Custom Epoch Duration
Epoch duration can only be set when generating new genesis (
--force-regenesis) or when no genesis exists.No Fullnode Mode
Run only validators without fullnode:Data Ingestion
Capture checkpoint data to files:Protocol Config Overrides
Override protocol parameters for local testing:Connecting Clients
After starting the network, configure clients to connect:Workflow Examples
Quick Testing
Persistent Development
Full Development Stack
Multi-Validator Testing
Health Monitoring
The network runs a health check loop:- Interval: Every 3 seconds
- Unhealthy threshold: 3 consecutive failures
- Auto-shutdown: On persistent health check failures
Stopping the Network
Gracefully stop the network:Port Usage
Default ports used bysui start:
| Service | Default Port | Flag |
|---|---|---|
| Fullnode RPC | 9000 | --fullnode-rpc-port |
| Faucet | 9123 | --with-faucet |
| Consistent Store | 9124 | --with-consistent-store |
| GraphQL | 9125 | --with-graphql |
| Validator 0 | 8080+ | (in network config) |
Troubleshooting
Port Already in Use
Error: Address already in use Solution:Genesis Conflict
Error: Cannot use--epoch-duration-ms with existing genesis
Solution:
PostgreSQL Issues
Error: Failed to start indexer Solution:Network Won’t Start
Error: Validators fail health checks Solution:Faucet Not Working
Error: Faucet requests fail Solution:Advanced Configuration
Using Pre-Generated Genesis
External PostgreSQL for Indexer
Development with Auto-Restart
Usewatchexec or similar tools:
Performance Tuning
For faster local testing:See Also
- sui genesis - Generate genesis configuration
- sui client - Interact with the network
- GraphQL Documentation - Query the GraphQL API