# Dfx deploy command

**URL:** <https://forum.dfinity.org/t/dfx-deploy-command/2282>\
**Category:** Developers\
**Created:** [March 25, 2021, 10:23am UTC](https://forum.dfinity.org/t/dfx-deploy-command/2282 "2021-03-25T10:23:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seb](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/seb/32/10340_2.png) [@Seb](https://forum.dfinity.org/u/Seb)\
**Post date:** [March 25, 2021, 10:23am UTC](https://forum.dfinity.org/t/dfx-deploy-command/2282/1 "2021-03-25T10:23:52Z")

</div>

Hello 🙂

I have some interrogations on the basics dfx commands : dfx canister create / dfx build / dfx install /dfx deploy.

If I understood well :

- _dfx canister create_ =\> Registers an id for your futur canisters and stores the ID in the canisters\_id.jsons file.
- _dfx build_ =\> Compile your source code into a WebAssembly module ; create javascripts representation of the canister interface and put all the created files into a directory .dfx/local/canister (when you are deploying locally).
- _dfx install_ =\> Deploy the previous created folder with the WASM module and javascript files on the IC.

But what about the command _dfx deploy_ ? Does it do the 3 previous steps in one ?

Thank you; have a good day 🙂 .

---

<div class="post-metadata">

**Author:** ![Ori](https://avatars.discourse-cdn.com/v4/letter/o/ecae2f/32.png) [@Ori](https://forum.dfinity.org/u/Ori)\
**Post date:** [March 25, 2021, 11:20am UTC](https://forum.dfinity.org/t/dfx-deploy-command/2282/2 "2021-03-25T11:20:04Z")

</div>

`dfx deploy` does all these steps yes, note that it runs `dfx canister install --mode upgrade`, which allows you to maintain canister state.

You can run `dfx deploy` for all canisters, or choose a canister with `dfx deploy <canister-name>` .

---

<div class="post-metadata">

**Author:** ![Seb](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/seb/32/10340_2.png) [@Seb](https://forum.dfinity.org/u/Seb)\
**Post date:** [March 25, 2021, 11:37am UTC](https://forum.dfinity.org/t/dfx-deploy-command/2282/3 "2021-03-25T11:37:52Z")

</div>

Okay thanks for the clarification!
