Installation
Set up everything you need to build and deploy canisters on the Internet Computer.
What you’ll install:
| Tool | Purpose |
|---|---|
| icp-cli | Core CLI for building and deploying canisters |
| ic-wasm | Optimizes WebAssembly for the Internet Computer |
| Language toolchain | Motoko compiler (via mops) or Rust compiler |
Windows users: Local networks require Docker Desktop, and Motoko requires WSL. For the full experience, install both and run commands inside WSL. Rust-only projects deploying to mainnet can run natively on Windows.
Linux users: The pre-compiled binary requires system libraries that may be missing on minimal installs. If installation fails or
icpwon’t start, install these dependencies:Terminal window # Ubuntu/Debiansudo apt-get install -y libdbus-1-3 libssl3 ca-certificates# Fedora/RHELsudo dnf install -y dbus-libs openssl ca-certificates
Quick Install via npm (Recommended)
Required: Node.js (LTS) — needed for npm and for building frontend canisters.
1. Install the core tools:
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm2. Install your language toolchain:
Motoko:
npm install -g ic-mopsRust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shrustup target add wasm32-unknown-unknown3. Verify installation:
icp --versionic-wasm --versionAlternative Installation Methods
If you prefer not to use npm, or need platform-specific options, see the sections below.
icp-cli
Homebrew (macOS/Linux):
brew install icp-cliShell Script (macOS/Linux/WSL):
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.sh | shShell Script (Windows):
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.ps1 | iex"ic-wasm
ic-wasm is a WebAssembly post-processing tool that optimizes canisters for the Internet Computer. It provides:
- Optimization: ~10% cycle reduction for Motoko, ~4% for Rust
- Size reduction: ~16% smaller binaries for both languages
- Metadata: Embed Candid interfaces and version information
- Shrinking: Remove unused code and debug symbols
When is it needed?
- Required if using official templates (motoko, rust, hello-world) — all backend templates use recipes that depend on ic-wasm
- Required if using official recipes (
@dfinity/motoko,@dfinity/rust) — these recipes inject required metadata using ic-wasm - Not required if building canisters with custom script steps that don’t invoke ic-wasm
Installation:
Homebrew (macOS/Linux):
brew install ic-wasmShell Script (macOS/Linux):
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/ic-wasm/releases/latest/download/ic-wasm-installer.sh | shShell Script (Windows):
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/ic-wasm/releases/latest/download/ic-wasm-installer.ps1 | iex"Learn more: ic-wasm repository
Language Toolchains
Motoko:
curl -fsSL cli.mops.one/install.sh | shNote: Requires Node.js and a package manager (npm, pnpm, or bun). The shell script installs the latest Mops version stored onchain on ICP.
Rust:
Install from rustup.rs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shrustup target add wasm32-unknown-unknownTroubleshooting
“command not found: icp” (after curl install)
The binary isn’t in your PATH. Add this to your shell config (~/.bashrc, ~/.zshrc, etc.):
export PATH="$HOME/.cargo/bin:$PATH"Then restart your shell or run source ~/.bashrc (or ~/.zshrc).
“Cannot connect to Docker” (Windows)
On Windows, Docker Desktop must be running before starting a local network. Ensure:
- Docker Desktop is installed and running
- For manual
dockerdsetup with WSL2, see the containerized networks guide
Network launcher download fails
The network launcher downloads automatically on first use. If it fails:
- Check your internet connection
- Try again (transient failures are possible)
- Download manually from icp-cli-network-launcher releases and set
ICP_CLI_NETWORK_LAUNCHER_PATH
Next Steps
- Quickstart — Deploy a full-stack app in under 5 minutes
- Tutorial — Understand each step in detail
- Local Development — Day-to-day workflow