Deploy your dapp to Testnet
On this page
Take the Hello World dapp from the getting-started tutorial onto the public Testnet: get test tokens, lease a container, deploy, then call your dapp over the network.
chr and PostgreSQL, with no tokens needed. Steps 5–7 put the same project on Testnet.You need: the project from step 3 of the tutorial (a running local node is not needed), a Web3 wallet such as MetaMask, about 15 minutes. Run every command from the project folder.
What was checked for r30 (3 Nov 2026)
- Every command and flag on this page exists in
chr 0.34.3(--helpof keygen, deployment create/update/info, tx, query). - A
testnetdeployment with only acontaineris accepted: chr fills in the Testnet node URL and directory-chain id itself. - The Faucet, the Vault containers page and the Testnet status endpoint answer; the directory-chain id below matches what the Testnet node reports.
- Not run: the deployment itself, which needs a leased container and tCHR. Outputs on this page that come from a deploy are marked.
Get tCHR2 min
Connect your wallet on the Chromia Testnet Faucet and request tCHR. You pay for the container lease with it.
Create a container key1 min
Run 3 Nov 2026
This key owns your container and signs the deployment.
chr keygen --key-id testnet_container_keychr saves three files in ~/.chromia/: testnet_container_key, testnet_container_key.pubkey and testnet_container_key_mnemonic. Print the public key again at any time with:
chr keygen --get-pubkey=testnet_container_keyLease a container5 min
Vault screens not walked in this test
Open Containers in the Testnet Vault, connect the same wallet, and lease a container. Paste the pubkey from step 2 when the Vault asks for the container owner. Copy the Container ID it gives you.
Configure chromia.yml2 min
Config accepted by chr 0.34.3
Give the blockchain a name nobody else has used (the tutorial’s my_rell_dapp is taken by everyone who followed it), then add the testnet deployment with your Container ID:
blockchains:
hello_alice_42: # pick your own unique name (was my_rell_dapp)
module: main
compile:
rellVersion: 0.16.6
database:
schema: schema_my_rell_dapp
test:
modules:
- test
deployments:
testnet:
container: <container_id> # from the VaultNaming the deployment testnet is what lets chr fill in the node URL and directory-chain id. Any other name needs url and brid as well; see deployment configuration.
Per the official guide, Testnet rejects code identical to a dapp already deployed (not tested here). If you kept the tutorial code as is, add a line such as a comment to src/main.rell so your build is unique.
Deploy3 min
Not run: needs a leased container
chr deployment create --network testnet --key-id testnet_container_keychr builds the dapp, asks you to confirm (add -y to skip the prompt), and prints the new Blockchain RID and the transaction id of the deployment.
If it says the deployment is pending, check the transaction on the Testnet directory chain, replacing {tx_rid} with the id chr printed:
curl "https://node0.testnet.chromia.com/tx/6F1B061C633A992BF195850BF5AA1B6F887AEE01BB3F51251C230930FB792A92/{tx_rid}/status"{"status":"confirmed"} means it went through. "unknown" means the node hasn’t seen that id (check you copied it whole).
Save the Blockchain RID1 min
Add the RID under chains so later commands know which chain is yours:
deployments:
testnet:
container: <container_id>
chains:
hello_alice_42: x"<blockchain_rid>" # from the deploy outputCheck it:
chr deployment info --network testnetCall your dapp on Testnet1 min
Not run: needs a deployed chain
chr tx --network testnet --blockchain hello_alice_42 set_name Deployer --await
chr query --network testnet --blockchain hello_alice_42 hello_worldExpected answer: "Hello Deployer!"
Ship an update
Change your Rell code, then:
chr deployment update --network testnet --key-id testnet_container_key--verify-only checks the new configuration without sending it.
Troubleshooting
- “No blockchains configured for deployment ‘testnet’” from
deployment infoorupdate: step 6 is missing; add thechainsentry. (Seen in this test.) - The deployment is rejected as a duplicate (from the official guide, not reproduced here): your code matches a chain already on Testnet; change something in
src/main.rell(step 4). - Not enough tCHR / no container: go back to steps 1 and 3; the deploy fails without a lease.