Skip to main content


Usage: chr deploy [OPTIONS]

Deploy blockchain into a container

--show-brid Show blockchain rid
-s, --settings SETTINGS Alternate path for the project settings file
(default: config.yml)
--target TEXT If a specific target deploy model should be used
--blockchain TEXT Name of blockchain to deploy
--height INT Deploy configuration at a specific height
--secret PATH Path to secret file (pubkey/privkey)
-h, --help Show this message and exit

You can use the deploy command (chr deploy) to deploy your dapp to a network. Deploy command reads the deployments key in the Project Settings file. For the first deployment towards a target, the Chromia CLI prompts you with the chains config that you need to add to the Project Settings file. An example of such a prompt looks something like this:

Add the following to your project settings file
hello: x"<BlockchainRID>" #Dapp Blockchain RID

This prompt is your genesis Blockchain RID; you must save this in the config file. This is the identifier for all your following deployments to the chain.

If you already have a deployment and have not added the chain identifier in your Project Settings file, the command chr deploy overrides any previous deployment to the network. That's why it's important to save the genesis Blockchain RID prompted after the first deployment.


If you want to override the state, ignore the chain identifier.

When you deploy, you create a snapshot build in the build/ folder with a timestamp by default. You can change this in the project settings file in compile:target if you want a different target.

  • To deploy a dapp, you can run the following command when being in the working directory where the config.yml file presides:
chr deploy --target testnet --secret .secret
  • Otherwise, you can set a path for the config.yml file or specify a different Project Settings file:
chr deploy --settings config.yml --target testnet --secret .secret
  • If you have multiple chains and only want to deploy a specific one, you can write the command like this:
chr deploy --settings config.yml --target testnet --blockchain hello --secret .secret