Skip to content

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):

Terminal window
brew install dfinity/tap/icp-cli

From source:

Terminal window
git clone https://github.com/dfinity/icp-cli.git
cd icp-cli && cargo build --release
export PATH=$(pwd)/target/release:$PATH

For 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

Terminal window
icp --version

Create a Project

Terminal window
icp new my-project

Select a template when prompted, then enter the project directory:

Terminal window
cd my-project

Your project contains:

  • icp.yaml — Project configuration
  • src/ — Source code
  • README.md — Project-specific instructions

Start the Local Network

Terminal window
icp network start -d

This starts a local Internet Computer network in the background.

Deploy

Terminal window
icp deploy

This single command:

  1. Builds your source code into WebAssembly (WASM)
  2. Creates a canister on the local network
  3. 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:

Terminal window
icp canister list

Then call a method on it (replace <canister-name> with your actual canister name):

Terminal window
icp canister call <canister-name> greet '("World")'

You should see: ("Hello, World!")

Stop the Network

When you’re done:

Terminal window
icp network stop

Next Steps

You’ve deployed your first canister. Now:

Browse all documentation →