How can I restart a stopped canister smart contract?

To restart a canister smart contract after a successful canister upgrade, you can run the dfx canister start command.


For example, to restart all of the canisters running on the local Internet Computer blockchain mainnet, you can run the following command:

dfx canister start --all


This command displays output similar to the following:

Starting code for canister status_check, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q
Starting code for canister status_check_assets, with canister_id cxeji-wacaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q


For more information on how to restart a canister, please check out the “Managing the Running State of a Canister” content on the Internet Computer Docs.

You can also learn more about canisters on the Internet Computer Wiki.