CLI Reference
Complete reference for the chainlaunch command-line interface (open-source / chaindeploy build).
Pro builds add commands not listed here —
chainlaunch install(system service registration),chainlaunch nodesharing,chainlaunch encrypt, and others. See the Pro CLI reference for those.
Global Flags
--help, -h Show help
--version, -v Show version
Top-level command tree
chainlaunch
├── serve Start the ChainLaunch HTTP server
├── version Print version
├── fabric Hyperledger Fabric chaincode and node operations
├── fabricx Hyperledger Fabric-X (Arma) network operations
├── besu Hyperledger Besu network operations
├── networks Cross-platform network management (create / update / fabric / besu)
├── keys Key management (create / get)
├── backup Backup and restore (currently: restore subcommand)
├── testnet One-shot test network provisioning
└── metrics Enable/disable Prometheus metrics
Run any command with --help for the full flag list. The sections below cover the most-used commands.
serve
Start the ChainLaunch server.
chainlaunch serve [flags]
| Flag | Description | Default |
|---|---|---|
--port | HTTP server port | 8100 |
--db | SQLite database path | chainlaunch.db |
--data | Data directory for node configs and certs | ./data |
--tls-cert | TLS certificate file path | (none) |
--tls-key | TLS private key file path | (none) |
Environment variables:
CHAINLAUNCH_USER— admin username, required on first start (no default)CHAINLAUNCH_PASSWORD— admin password, required on first start (no default). Re-setting it on a later start resets that user's password.CHAINLAUNCH_FABRICX_LOCAL_DEV— set totrueon macOS/Windows Docker Desktop so Fabric-X containers can dial the hostKEY_ENCRYPTION_KEY— encryption key for keys at rest (auto-generated if not set)SESSION_ENCRYPTION_KEY— session encryption key (auto-generated if not set)ANTHROPIC_API_KEY— Claude AI integrationOPENAI_API_KEY— OpenAI integration
Without CHAINLAUNCH_USER and CHAINLAUNCH_PASSWORD on first start, the server aborts with: "No users found in database…". The deploy.sh installer sets these for you.
version
Print the ChainLaunch version.
chainlaunch version
fabricx (new in 0.4.0)
fabricx quickstart
Provision a complete N-party Fabric-X network in one shot — same flow as the web UI's Quick Start wizard.
# macOS / Windows Docker Desktop:
export CHAINLAUNCH_FABRICX_LOCAL_DEV=true
chainlaunch fabricx quickstart [flags]
| Flag | Description | Default |
|---|---|---|
--network-name | Network name | fabricx-quickstart |
--parties | Number of parties (1–10) | 4 |
--mode | single (one MSP shared) or multi (MSP per party) | single |
--single-msp | MSPID used by --mode=single | AcmeMSP |
--external-ip | External IP/host for node endpoints | platform setting |
--base-port | First port in the reserved range | (see --help) |
--slot-size | Ports reserved per party | (see --help) |
--postgres-port | Host port for the shared Postgres container | 15432 |
--channel | Channel ID (FabricX locks to arma) | arma |
--namespace | Health-check namespace name (empty to skip) | quickstart |
--namespace-timeout | Committer finality timeout for the health-check namespace | 60s |
--clean | Wipe any prior bundle with this network name first | false |
--data-path | Server --data directory; with --clean, purges fabricx bind-mounts | (none) |
--keep-going | Continue joining nodes through transient Docker errors | true |
--http-timeout | Per-HTTP-request deadline | (see --help) |
--join-retries | Retry count for transient Docker errors during join | (see --help) |
--join-retry-backoff | Delay between join retries (doubles each retry) | (see --help) |
Example — single-MSP 4-party network:
chainlaunch fabricx quickstart --network-name demo --parties 4
Example — production-shape multi-MSP, 3 parties:
chainlaunch fabricx quickstart --network-name prod --parties 3 --mode multi
See the Fabric-X Quickstart guide for what gets created and post-provisioning verification.
fabric
Fabric-specific operations for chaincode and nodes.
chainlaunch fabric <subcommand>
| Subcommand | Purpose |
|---|---|
install | Install a chaincode package on peers (Fabric chaincode lifecycle) |
query | Query a chaincode |
invoke | Invoke a chaincode |
nc | Network config helpers |
org | Organization helpers |
peer | Peer helpers |
orderer | Orderer helpers |
fabric install
Install a chaincode package on one or more peers.
chainlaunch fabric install [flags]
Use chainlaunch fabric install --help for the current flag set (path to chaincode package, target peer names, MSP context).
besu
Besu-specific operations.
chainlaunch besu <subcommand>
Run chainlaunch besu --help for available subcommands. For most users the networks besu subtree (below) is the higher-level entry point.
networks
Cross-platform network management.
chainlaunch networks <subcommand>
| Subcommand | Purpose |
|---|---|
create | Create a network (Fabric or Besu) |
update | Update a network |
fabric | Fabric-specific subcommands (join, join-all, join-orderer, join-all-orderers, list, update, create) |
besu | Besu-specific subcommands (create, list, update) |
Example — join all peers to a Fabric channel:
chainlaunch networks fabric join-all --network-id 12
keys
Key management (used for organization signing keys, TLS material, etc.).
chainlaunch keys <subcommand>
| Subcommand | Purpose |
|---|---|
create | Create a new key |
get [key-id] | Print a key's metadata |
Run chainlaunch keys create --help for the full flag set (key type, provider, organization linkage).
backup
Backup and restore operations. (0.4.0 ships only the restore subcommand at the CLI; create / schedule backups via the API or web UI.)
chainlaunch backup restore [flags]
See Restore from a Backup for the end-to-end restore flow.
testnet
One-shot test network provisioning. Wraps the network and node creation API calls into a single command.
testnet fabric
chainlaunch testnet fabric [flags]
| Flag | Description | Example |
|---|---|---|
--name | Network name | my-fabric |
--org | Comma-separated organization MSP IDs | Org1MSP,Org2MSP |
--peerOrgs | Orgs that will have peers | Org1MSP,Org2MSP |
--ordererOrgs | Orgs that will have orderers | OrdererOrg |
--channels | Channel names | mychannel |
--peerCounts | Peers per org | Org1MSP=2,Org2MSP=1 |
--ordererCounts | Orderers per org | OrdererOrg=3 |
Example:
chainlaunch testnet fabric \
--name demo \
--org "Org1MSP,Org2MSP" \
--peerOrgs "Org1MSP,Org2MSP" \
--ordererOrgs "Org1MSP" \
--channels mychannel \
--peerCounts "Org1MSP=1,Org2MSP=1" \
--ordererCounts "Org1MSP=3"
testnet besu
chainlaunch testnet besu [flags]
| Flag | Description | Default |
|---|---|---|
--name | Network name | (required) |
--nodes | Number of validator nodes | 4 |
--mode | Deployment mode | docker |
metrics
Manage the Prometheus integration.
metrics enable
Provision Prometheus and start scraping every node's /metrics endpoint.
chainlaunch metrics enable [flags]
| Flag | Description | Default |
|---|---|---|
--version | Prometheus version | v3.4.0 |
--port | Metrics port | 9091 |
metrics disable
chainlaunch metrics disable
Pro-only commands
The following commands ship in ChainLaunch Pro, not in the open-source build:
chainlaunch install— register ChainLaunch as a systemd/launchd servicechainlaunch nodesharing generate-node-invitation/accept-node-invitation/sync-external-nodes— peer-to-peer instance federationchainlaunch encrypt— re-encrypt secrets at rest after key rotation
For the open-source build, set up systemd manually as shown in the Quick Start guide.
Next Steps
- Quick Start for your first deployment
- API Reference for the REST API
- Terraform Provider for infrastructure as code
- Fabric-X Quickstart — the headline 0.4.0 feature