How to deploy cycles ledger on local network?

How to deploy cycles ledger on local network?

$ DFX_CYCLES_LEDGER_SUPPORT_ENABLE=1 dfx ledger balance
Error: The replica returned a rejection error: reject code DestinationInvalid, reject message IC0301: Canister ryjl3-tyaaa-aaaaa-aaaba-cai not found, error code Some("IC0301")

Even, if I deploy the WASM code from here, how to inform DFX that this canister is the cycles ledger for DFX use?

dfx ledger targets the ICP ledger, not the cycles ledger. And you don’t need to inform dfx at all. If it’s enabled, it will assume that the cycles ledger is on the right canister id.

HOWEVER dfx does not automatically use the cycles ledger if you’re on local. It can directly create canisters/wallets. If you want to disable that you need to export DFX_DISABLE_AUTO_WALLET=1 as well