Skip to content

Canister Lifecycle

TODO: Write content for this page.

Walk through the full canister lifecycle: creation, code installation, upgrades (with pre/post-upgrade hooks), reinstallation, and deletion. Cover the canister factory pattern for programmatic creation. Explain state management across upgrades, the difference between install and upgrade modes, and migration between subnets. Show icp-cli commands for each operation.

  • Portal: building-apps/canister-management/upgrade.mdx, state.mdx, developing-canisters/create.mdx, compile.mdx, install.mdx, deploy.mdx, delete.mdx, history.mdx, trapping.mdx, advanced/canister-migration.mdx
  • icp-cli: concepts/build-deploy-sync.md
  • icskills: cycles-management, stable-memory
  • Examples: canister_factory (Motoko), classes (Motoko), canister-info (Rust)
  • Learn Hub: Canister Control
  • concepts/canisters — what is a canister
  • guides/backends/data-persistence — state across upgrades
  • guides/canister-management/cycles-management — cycles for canister creation
  • guides/security/canister-upgrades — upgrade safety
  • icp-cli docs: https://dfinity.github.io/icp-cli/0.2/