Skip to main content

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]
FlagDescriptionDefault
--portHTTP server port8100
--dbSQLite database pathchainlaunch.db
--dataData directory for node configs and certs./data
--tls-certTLS certificate file path(none)
--tls-keyTLS 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 to true on macOS/Windows Docker Desktop so Fabric-X containers can dial the host
  • KEY_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 integration
  • OPENAI_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]
FlagDescriptionDefault
--network-nameNetwork namefabricx-quickstart
--partiesNumber of parties (1–10)4
--modesingle (one MSP shared) or multi (MSP per party)single
--single-mspMSPID used by --mode=singleAcmeMSP
--external-ipExternal IP/host for node endpointsplatform setting
--base-portFirst port in the reserved range(see --help)
--slot-sizePorts reserved per party(see --help)
--postgres-portHost port for the shared Postgres container15432
--channelChannel ID (FabricX locks to arma)arma
--namespaceHealth-check namespace name (empty to skip)quickstart
--namespace-timeoutCommitter finality timeout for the health-check namespace60s
--cleanWipe any prior bundle with this network name firstfalse
--data-pathServer --data directory; with --clean, purges fabricx bind-mounts(none)
--keep-goingContinue joining nodes through transient Docker errorstrue
--http-timeoutPer-HTTP-request deadline(see --help)
--join-retriesRetry count for transient Docker errors during join(see --help)
--join-retry-backoffDelay 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>
SubcommandPurpose
installInstall a chaincode package on peers (Fabric chaincode lifecycle)
queryQuery a chaincode
invokeInvoke a chaincode
ncNetwork config helpers
orgOrganization helpers
peerPeer helpers
ordererOrderer 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>
SubcommandPurpose
createCreate a network (Fabric or Besu)
updateUpdate a network
fabricFabric-specific subcommands (join, join-all, join-orderer, join-all-orderers, list, update, create)
besuBesu-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>
SubcommandPurpose
createCreate 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]
FlagDescriptionExample
--nameNetwork namemy-fabric
--orgComma-separated organization MSP IDsOrg1MSP,Org2MSP
--peerOrgsOrgs that will have peersOrg1MSP,Org2MSP
--ordererOrgsOrgs that will have orderersOrdererOrg
--channelsChannel namesmychannel
--peerCountsPeers per orgOrg1MSP=2,Org2MSP=1
--ordererCountsOrderers per orgOrdererOrg=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]
FlagDescriptionDefault
--nameNetwork name(required)
--nodesNumber of validator nodes4
--modeDeployment modedocker

metrics

Manage the Prometheus integration.

metrics enable

Provision Prometheus and start scraping every node's /metrics endpoint.

chainlaunch metrics enable [flags]
FlagDescriptionDefault
--versionPrometheus versionv3.4.0
--portMetrics port9091

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 service
  • chainlaunch nodesharing generate-node-invitation / accept-node-invitation / sync-external-nodes — peer-to-peer instance federation
  • chainlaunch 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