Quickstart
Deploy a fullstack app to a local Internet Computer network in under 10 minutes.
Prerequisites
Section titled “Prerequisites”- Node.js LTS (v22+)
Windows users: You also need WSL and Docker Desktop. Run all commands inside WSL.
Install the tools
Section titled “Install the tools”npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasmThis installs:
- icp-cli: builds and deploys canisters on the Internet Computer
- ic-wasm: optimizes WebAssembly modules for onchain deployment
For Motoko projects, also install the Motoko package manager:
npm install -g ic-mopsVerify everything is installed:
icp --versionic-wasm --versionAlternative methods: Homebrew, shell scripts, and other options are also available.
Create a project
Section titled “Create a project”icp new my-project --subfolder hello-world \ --define backend_type=motoko \ --define frontend_type=react \ --define network_type=Default && cd my-projectThis creates a fullstack project from the hello-world template with a Motoko backend and React frontend. The --define flags skip interactive prompts. Without them, icp new asks you to choose a template, language, and network type.
Prefer Rust? Use
--define backend_type=rustinstead. You’ll need Rust installed with the WASM target:rustup target add wasm32-unknown-unknown.
Backend only? Use a language-specific template instead:
--subfolder rustor--subfolder motoko. These templates have no frontend.
Your new project contains:
| Path | Description |
|---|---|
icp.yaml | Project configuration: lists your canisters |
backend/ | Motoko source code with a greet function |
frontend/ | React app that calls the backend |
Start a local network
Section titled “Start a local network”icp network start -dThis starts a local Internet Computer replica in the background. The local network comes pre-funded. You can deploy immediately without setting up a wallet or acquiring cycles.
Deploy
Section titled “Deploy”icp deployThis single command builds your Motoko code into WebAssembly, compiles the React frontend, creates canisters on the local network, and installs your code. When it finishes, you’ll see output like:
Deployed canisters: backend (Candid UI): http://...localhost:8000/?id=... frontend: http://...localhost:8000Open the frontend URL in your browser to see your app running. The Candid UI URL opens a web interface where you can test backend methods directly. Try calling greet with your name.
Call your canister
Section titled “Call your canister”You can also interact with your backend from the terminal:
icp canister call backend greet '("World")'Output: ("Hello, World!")
The argument '("World")' uses Candid syntax (the interface description language for the Internet Computer). The outer single quotes are shell quoting; the Candid value itself is ("World"). You can also omit the argument and icp canister call will prompt you interactively.
Stop the network
Section titled “Stop the network”When you’re done developing:
icp network stopWhat’s happening under the hood
Section titled “What’s happening under the hood”The hello-world template deploys two canisters that run on the Internet Computer:
-
Backend canister: Your Motoko code compiled to WebAssembly. It exposes a
greetfunction through a Candid interface, making it callable from any client. -
Frontend canister: An asset canister that serves your React app. It automatically provides the backend’s canister ID to your frontend code via a cookie, so the two canisters can communicate without manual configuration.
The icp.yaml file ties everything together:
canisters: - backend - frontendEach canister name maps to a directory containing its own canister.yaml with build configuration (recipe, source files, etc.). icp-cli handles the rest: compiling, optimizing, deploying, and wiring up canister-to-canister discovery.
Next steps
Section titled “Next steps”- Project structure: understand how icp-cli projects are organized
- Choose your path: pick a development path based on what you want to build
- Concepts: Canisters: learn what canisters are and how they work
- AI coding agents: use ICP skills to build on the Internet Computer with AI
- icp-cli documentation: full CLI reference and guides