# Why does it try to use wallet instead of ledger?

**URL:** <https://forum.dfinity.org/t/why-does-it-try-to-use-wallet-instead-of-ledger/32351>\
**Category:** Command Line Tools\
**Created:** [June 24, 2024, 8:59pm UTC](https://forum.dfinity.org/t/why-does-it-try-to-use-wallet-instead-of-ledger/32351 "2024-06-24T20:59:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![qwertytrewq](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/qwertytrewq/32/10423_2.png) [@qwertytrewq](https://forum.dfinity.org/u/qwertytrewq)\
**Post date:** [June 24, 2024, 8:59pm UTC](https://forum.dfinity.org/t/why-does-it-try-to-use-wallet-instead-of-ledger/32351/1 "2024-06-24T20:59:10Z")

</div>

Why does it try to use wallet? I want it to deploy using Ledger instead.

```plaintext
$ dfx deploy --network ic -v
Found keyring identity suffix - PEM file is stored in keyring.
Build order: battery CanDBIndex CanDBPartition NacDBIndex NacDBPartition call main frontend ic_eth items pst payments personhood users
Deploying all canisters.
Creating canisters...
Creating canister battery...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to register all canisters.
Caused by: Failed to create canister 'battery'.
Caused by: No wallet configured for combination of identity 'Zon' and network 'ic'

```

```plaintext
$ dfx deploy --network ic -v --no-wallet
Found keyring identity suffix - PEM file is stored in keyring.
Build order: battery CanDBIndex CanDBPartition NacDBIndex NacDBPartition call main frontend ic_eth items pst payments personhood users
Deploying all canisters.
Creating canisters...
Creating canister battery...
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to register all canisters.
Caused by: Failed to create canister 'battery'.
Caused by: In order to create a canister on this network, you must use a wallet in order to allocate cycles to the new canister. To do this, remove the --no-wallet argument and try again. It is also possible to create a canister on this network using `dfx ledger create-canister`, but doing so will not associate the created canister with any of the canisters in your project.

```

I did set `DFX_CYCLES_LEDGER_SUPPORT_ENABLE=1` in `.env`. This does not help.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [June 25, 2024, 8:16am UTC](https://forum.dfinity.org/t/why-does-it-try-to-use-wallet-instead-of-ledger/32351/2 "2024-06-25T08:16:36Z")

</div>

`export DFX_CYCLES_LEDGER_SUPPORT_ENABLE=1` is the way to go, either in the terminal or in a dotfile. dfx does not read this variable from `.env`
