Skip to main content
The 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

path
Config directory containing network configuration. If not specified and no genesis exists, a new one is auto-generated in ~/.sui/sui_config/
boolean
Create new genesis each run without persisting state. Only use when you want to start from scratch every time
string
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 values
url
Start 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
string
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 values
string
Start 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 values
u16
default:"9000"
Port to start the Fullnode RPC server on
u64
Set the epoch duration in milliseconds. Can only be used with --force-regenesis or when no genesis exists. Default: 60000ms (1 minute) with --force-regenesis
path
Directory to dump executed checkpoints as files. Incompatible with --no-full-node. Defaults to temporary directory if --with-indexer is set
boolean
Start the network without a fullnode
usize
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:
With --force-regenesis, all state is lost when the network stops. Use only for testing.

3. Custom Config Directory

Use a specific network configuration:

Starting Services

Faucet

Start with a local faucet:
Faucet endpoints:
Default faucet amount: 200 SUI (200,000,000,000 MIST)

Indexer

Start with an indexer:
Indexer requires PostgreSQL. The local database option automatically manages a temporary PostgreSQL instance.

GraphQL Server

Start with GraphQL API:
GraphQL endpoint: 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:
Endpoint: http://127.0.0.1:9124

Full Stack Local Development

Start all services for complete local development:
This provides:

Network Configuration

Default Setup

When sui start runs without existing genesis:
  • Validators: 4 validators (or --committee-size value)
  • 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:
Without a fullnode, you cannot:
  • Submit transactions via RPC
  • Query chain state
  • Run indexer or GraphQL

Data Ingestion

Capture checkpoint data to files:
Checkpoint files are written to the specified directory for analysis or replay.

Protocol Config Overrides

Override protocol parameters for local testing:
Protocol config must match across all nodes. Changing these values outside local networks is dangerous and may break the network.

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
Monitor logs for:

Stopping the Network

Gracefully stop the network:
Force kill (not recommended):

Port Usage

Default ports used by sui start: Ensure these ports are available before starting.

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

Use watchexec or similar tools:

Performance Tuning

For faster local testing:
For production-like testing:

See Also