Docs
chromia.com

Get a container for your dapp

On this page

In this section, you’ll complete the steps needed to obtain a container for your dapp.

Prerequisites

Ensure you have the following before proceeding:

  • tCHR tokens: Required to lease a container. Follow the instructions in Get test tokens (tCHR) to obtain tokens. This step includes creating a Chromia account if you don’t already have one.
  • Chromia CLI and a public-private key pair: Install Chromia CLI using the CLI installation guide, then generate a key pair specifically for the testnet container by following the steps below.

Step 1: Generate a key pair

With Chromia CLI installed, you’ll need to create a public-private key pair for your testnet container. This key pair is separate from the wallet key used to receive tCHR tokens. Run the following command and specify a key ID to keep it easily identifiable. For example:

Terminal
chr keygen --key-id="testnet_container_key"

This command will save your key pair in the .chromia folder:

  • Public key: .chromia/testnet_container_key.pubkey
  • Private key: .chromia/testnet_container_key

For more information, see the keygen documentation.

Step 2: Lease container space

With tCHR tokens in your account and your key pair ready, you can now lease a container.

  1. Visit the Chromia Testnet Vault: Go to https://vault.testnet.chromia.com/containers/ and connect your wallet.
  2. Click the Lease a container button.
  3. Select your container cluster.
  4. Enter your public key: Locate your public key at .chromia/testnet_container_key.pubkey (or the filename you specified with --key-id) and enter it when requested. You can also adjust for SCUs, storage, and duration and enable auto-renewal for the lease.
  5. Once you accept the total price for the given configuration, click Lease. Complete the leasing process by signing with your wallet when prompted. Once the process is finalized, you’ll receive a Container ID, which is essential for deploying your dapp.

Keep track of your Container ID

You’ll need your Container ID later to deploy your dapp. Feel free to note it down or retrieve it anytime by going to the Chromia Testnet Vault Container lease page and viewing your containers.