Getting started with free cycles
Overview
To deploy a canisters onto the ICP mainnet, you must have cycles. Cycles are used to pay for the resources that a canister uses.
This guide explains how to use the cycles faucet to acquire 10T free cycles that can be used to deploy your dapps on the mainnet.
Prerequisites
- Install the Internet Computer SDK.
Step 1: Get a coupon.
First, you will need to navigate to https://faucet.dfinity.org. You will need to put in a request for cycles on the DFINITY dev official Discord server. You can click on the REQUEST CYCLES button on the faucet page to join the Discord server.
Step 2: Once inside the Discord server, navigate into the #cycles-faucet
channel.
Step 3: In this channel, execute the following slash command:
/request
Step 4: After you send this message, you are prompted to fill out a survey.
Step 5: Once completed, our team will review your submission. If accepted, the faucet bot will send you a private message with a coupon code.
Please ensure that your Discord settings are set to allow direct messages from other users. If you do not have this setting enabled, you will not receive a direct message from the faucet bot.
Step 6: Head back to the https://faucet.dfinity.org webpage.
Now, click NEXT STEP to continue.
Step 7: Redeem the coupon.
Now that you have a coupon code, enter your coupon code within the faucet UI.
Click NEXT STEP to continue.
Step 8: Setup the IC SDK.
Next, confirm your computer has dfx
installed. Run this command to check the version of dfx
on your computer:
dfx --version
If your dfx
version is below 0.12.0, please run this command:
dfx upgrade
Click NEXT STEP to continue.
Step 9: Create a new identity to claim your cycles.
To create a new identity, use the command:
dfx identity new MyNewIdentity
Your identity's seed phrase will be returned. Be sure to save this in a secure location.
Then, set this identity to be used by default:
dfx identity use MyNewIdentity
Step 10: Now, claim your cycles.
This workflow utilizes the cycles ledger feature. If you'd like to use the cycles wallet instead, view the cycles wallet documentation.
To use the cycles ledger, you will need dfx
version 0.19.0, and you will need to set the following environmental variable:
DFX_CYCLES_LEDGER_SUPPORT_ENABLE=1
You will need to claim your free cycles by running this command:
dfx cycles --network ic redeem-faucet-coupon <your-coupon-code>
Click NEXT STEP to continue.
Step 11: Verify your balance
The last step is to verify the coupon was redeemed correctly by checking your balance using the dfx cycles --network ic balance
command:
Conclusion
Now you are ready to deploy a canister on the mainnet!
Resources
To further explore cycle management please see the following articles: