Tutorial
Deploy your first canister on the Internet Computer in under 10 minutes.
Prerequisites
Install icp-cli and the toolchain for your canister language.
Install icp-cli
Via Homebrew (macOS):
brew install dfinity/tap/icp-cliFrom source:
git clone https://github.com/dfinity/icp-cli.gitcd icp-cli && cargo build --releaseexport PATH=$(pwd)/target/release:$PATHFor detailed installation options, see the Installation Guide.
Language Toolchains
Install the toolchain for the language you’ll use:
- Rust canisters: Rust and
rustup target add wasm32-unknown-unknown - Motoko canisters: mops and
mops toolchain init
Verify Installation
icp --versionCreate a Project
icp new my-projectSelect a template when prompted, then enter the project directory:
cd my-projectYour project contains:
icp.yaml— Project configurationsrc/— Source codeREADME.md— Project-specific instructions
Start the Local Network
icp network start -dThis starts a local Internet Computer network in the background.
Deploy
icp deployThis single command:
- Builds your source code into WebAssembly (WASM)
- Creates a canister on the local network
- Installs your WASM code
Tip: You can also run icp build separately if you want to verify compilation before deploying.
Interact with Your Canister
First, find your canister name:
icp canister listThen call a method on it (replace <canister-name> with your actual canister name):
icp canister call <canister-name> greet '("World")'You should see: ("Hello, World!")
Stop the Network
When you’re done:
icp network stopNext Steps
You’ve deployed your first canister. Now:
- Core Concepts — Understand how icp-cli works
- Local Development — Learn the day-to-day workflow