Managing Localnet
Control your local XYZ Chain withxyz localnet commands.
Start Localnet
Output
Output
Options
| Flag | Description | Default |
|---|---|---|
--background | Run in background | false |
--reset | Clear existing data first | false |
Run in Background
~/.xyz-localnet/node.log.
Fresh Start
Clear existing data and start fresh:Check Status
Output (Running)
Output (Running)
Output (Stopped)
Output (Stopped)
Stop Localnet
Output
Output
Options
| Flag | Description | Default |
|---|---|---|
--clean | Also remove all data | false |
Stop and Clean
Remove all data when stopping:View Logs
When running in background:Lifecycle
Common Workflows
Development Session
Quick Reset
Check Health
Environment Integration
With Scripts
With Make
With Docker Compose
If you prefer Docker:Troubleshooting
Start fails with 'port in use'
Start fails with 'port in use'
Another process is using required ports:
Start fails with 'permission denied'
Start fails with 'permission denied'
Check data directory permissions:
Node crashes immediately
Node crashes immediately
Check logs for errors:Often fixed by resetting:
Status shows running but can't connect
Status shows running but can't connect
The node process may be stuck:
Advanced Configuration
Custom Genesis
To customize genesis parameters:Custom Ports
Edit~/.xyz-localnet/config/config.toml:
~/.xyz-localnet/config/app.toml: