Skip to main content
Sui supports multiple networks for different stages of development and production deployment.

Available Networks

Localnet

Purpose: Local development and testing RPC: http://127.0.0.1:9000 Use case: Fast iteration without network delays

Devnet

Purpose: Development and experimentation RPC: https://fullnode.devnet.sui.io:443 Use case: Testing with a live network, frequent resets Faucet: Available for free test tokens

Testnet

Purpose: Pre-production testing RPC: https://fullnode.testnet.sui.io:443 Use case: Final testing before mainnet, more stable than devnet Faucet: Available for free test tokens

Mainnet

Purpose: Production deployment RPC: https://fullnode.mainnet.sui.io:443 Use case: Real value transactions Faucet: None (use real SUI)

Connecting with CLI

View active environment

List all environments

Add new environment

Switch environment

Connecting with Rust SDK

From crates/sui-sdk/examples/sui_client.rs:

Connecting with TypeScript SDK

Getting Test Tokens

Using CLI

Using TypeScript

Using Rust

From crates/sui-sdk/examples/utils.rs:

Network Configuration

Environment variables

Configuration file

Edit ~/.sui/sui_config/client.yaml:

Custom RPC Endpoints

Running your own node

Using third-party providers

Health Checks

Check node status

TypeScript health check

Rust health check

Network Selection Strategy

Development workflow

  1. Localnet: Initial development and unit testing
  2. Devnet: Integration testing
  3. Testnet: Pre-production testing
  4. Mainnet: Production deployment

Best practices

Troubleshooting

Connection timeout

Rate limiting

Public RPC endpoints may have rate limits. Consider:
  • Using your own node
  • Implementing request caching
  • Adding retry logic with backoff

Network selection

Always verify which network you’re connected to:

Next Steps