Build and deploy

Deploy an app yourself with the icp CLI

All help topics

Install the icp CLI, link it to your console identity, then run icp deploy on your engine's subnet; the Connect your ICP CLI dialog gives you all three commands, filled in for this engine.

  1. Open the engine's Build with agents page. Under Other ways to build, on Build it by hand, click Show developer tools, then Yes, show the tools.
  2. Click Connect your ICP CLI. On an engine with no apps yet, Your apps and services has the same button.
  3. Install the ICP CLI: copy and run npm i -g @icp-sdk/icp-cli. Skip it if you already have the CLI.
  4. Link your console identity: copy the link command and run it in your terminal. It opens a browser sign-in; sign in with the identity you use for the console. The command names a CLI identity, opencloud unless you open Identity name and type another (you need another if your CLI already has one called opencloud).
  5. Deploy to this engine: from your project directory, run the deploy command. It looks like icp deploy --identity opencloud --subnet <subnet-id> -e ic, with your engine's subnet filled in.
  6. Your app appears on Your apps and services.
Good to know
  • No project yet? icp new starts one from a template.
  • -e ic is the Internet Computer mainnet, which every project has. If you deploy through an environment of your own, name it instead.
  • The link gives the CLI the same identity that administers your engines, which is what lets it deploy here. A CLI signed in as anyone else is refused.
  • Already linked? Skip step 4, and type that identity's name under Identity name so the deploy command matches.
  • The deploy command appears once the engine finishes provisioning.
  • Any engine role can deploy. To have the console list the app under a name, give its canisters the console's naming variables (see why an app shows as a canister id).

More about the same page

Still stuck? Contact support