How do I change the directory where daedalus stores its DB and logs in Linux?

Got the same problems first. With the steps described by dbwest in this post I was able to get it running but the wallets don’t get loaded. Even after restoring it by the recovery phrase the wallet disappears after re-starting daedalus.

Hey, after banging my head on this all day I found out why XDG_DATA_HOME wasn’t working for me.
If the path that you’re trying to set it to isn’t under your /home directory, you’ll have to also mount that path in the nix chroot. You can do this by adding the -m flag and the directory. For example, my path was in /media so I added -m /media:/media to the exec call on line 16 of ~/.local/bin/daedalus-mainnet.

1 Like

Here’s my solution so far:

Let’s say I want to install daedalus and have chain stored in /proj/cardano

  1. In bash: export HOME=/proj/cardano
  2. Run daedalus (.bin) in the same bash, you should be able to see it creates folder under the “new” $HOME.
  3. After installation, go to /tmp and find the nix temp folder, usually with the name of /tmp/nix<six-chars-random-string>
  4. In that temp dir there should also be a proj/cardano path in it, move the .daedalus , .local, and .nix-defexpr folders found there to the real /proj/cardano.
  5. Edit /proj/cardano/.local/bin/daedalus-wallet and ~/.local/share/Daedalus/mainnet/namespaceHelper to include same export HOME line in step (1) at the beginning of the script (after shebang line of course), also include the top-level folder (/proj in this example) as the nix-user-chroot mount point specified by -m option.
  6. Finally, you can launch the wallet via .desktop file using gtk-launch Daedalus-mainnet


Just found this. Instead of the symlink, I just did a bind mount into the original location in my home directory.

mount --bind /mnt/data/.../Daedalus /home/me/.local/share/Daedalus

Yep, that’s the best way!

You can also make it persistent across host reboots by adding it to your /etc/fstab file.

Say, you wanna keep your Daedalus blockchain on a separate drive mounted at /zfspool1/daedalus:

$ mv /home/user/.local/share/Daedalus /zfspool1/daedalus
$ mkdir /home/user/.local/share/Daedalus

add the following line to /etc/fstab file:
/zfspool1/daedalus /home/user/.local/share/Daedalus none defaults,bind 0 0

$ sudo mount /home/user/.local/share/Daedalus

# Check: you will see the same device is mounted at two different locations (note: I'm using ZFS).
$ mount | grep -i Daedalus
zfspool1/daedalus on /zfspool1/daedalus type zfs (rw,noatime,xattr,noacl)
zfspool1/daedalus on /home/user/.local/share/Daedalus type zfs (rw,noatime,xattr,noacl)

1 Like

Really is this the final solution? I really was hoping after 3 years they added some UI option in the settings to change the data directory of the mainnet blockchain.

Thanks Bud.
Had trouble with this before and gave up by mounting a spare filesystem on top of the mainnet directory.
This time I was cornered and you shone the light on that nearly simple algebra.
Now I have symlinked to a path on a separate RAID filesystem.
Daedalus is syncing the final 5%.
Context is Linux (Nixos). I used rsync to make a copy of the mainnet directory tree to a different RAID filesystem (maintaining links).

So in each of :
I added :
then altered this following line :

exec ./nix/store/…-nix-user-chroot-…/bin/nix-user-chroot -n ./nix -c -e -m /home:/home -m /hook:/hook -m /etc:/host-etc -m etc:/etc -p DISPLAY -p HOME -p XAUTHORITY -p LANG -p LANGUAGE -p LC_ALL -p LC_MESSAGES – /nix/var/nix/profiles/profile-mainnet/bin/enter-phase2 bash

to include the mount point of the target filesystem (in this case /hook).

I just symlinked ~/.local/share/Daedalus to /media/sdb1/Daedalus. Then, it’s not necessary to set XDG_DATA_HOME.

Including /media there was necessary, nevertheless. Too bad that it’s necessary to edit the startup script. Would be nicer if there was some way to give it to the script when calling it.


Confirmed. I edited out the XDG_DATA_HOME in each file.
Daedalus wallet still starts successfully.
Good news. Environment variables can be awkward.
So it is just the path in the nix chroot.
It does seem like that could be included before building. Not a major hack though.

1 Like

Would be an easy change to the startup script, but should definitely be a parameter. You need /hook, I need /media, next one needs /mnt, …

While at it, they could also make the debug shell a parameter and not an environment variable.

No, not at all, just a minor issue and I have changed so much in this script that I basically run my own now (Start Daedalus with tmux to use cardano-cli).


For macOS Monterey , with a 4.7.0 Daedalus Mainnet, i did :

  • Copy all the “Daedalus State Directory” to the new location (for me an external Thunderbolted SSD device) - You find the directory in “Daedalus Diagnostic page”.

  • Edit the /Applications/Daedalus

    • Replace : “${HOME}/Library/Application Support/Daedalus Mainnet”
    • by : “/Volumes/“Vol ID”/“Path”/Daedalus Mainnet”

That’s all.
No tremendous but practical

Unfortunately I have two directories that remain on the old path.

  • LocalStorage
  • GPUCache
    I don’t see any trace of this setting. I stay like that.
    If someone has an idea…

Problem with Replace : “${HOME}
There a 4 different lines in the launcher-config.yaml
when I change all 4 I get the error
Error occured while parsing configuration file: FailedToParseLauncherOption “parsing LauncherOptions failed, expected Object, but encountered String”

You must have changed more than just the replacement.
Can you share how your launcher-config.yaml looks like now?

That is hardly readable. What kind of editor do you use?

Anyway, they seem to have changed from YAML to JSON without changing the extension. Whyever.

Things like "launcherLogsPrefix":"/Volumes/"Extern2Tb"/"Ketten"/Daedalus Mainnet"/Logs/pub" are definitely not going to work in JSON. Don’t know if YAML can handle them. Quotes should be only at the beginning and end of a string.

So, "launcherLogsPrefix": "/volumes/Extern2Tb/Ketten/Daedalus Mainnet/Logs/pub" and similar for the others.

Also, here: "tlsPath":"/Volumes/"Extern2Tb"/"Ketten"/Daedalus Mainnet":"" Something went quite wrong. Looks like you deleted something. The braces are also not paired anymore. Every { should have a corresponding } and every [ a corresponding ].

Do you still have the original file and can try again?

I ist the Quotes because of this

  • Replace : “${HOME}/Library/Application Support/Daedalus Mainnet”
  • by : “/Volumes/“Vol ID”/“Path”/Daedalus Mainnet”
    but ok I will try to put the quotes only on begin and end and
    yes I have the original and I can try again. I just us to chance the file.

Now I use BBEdits and here the new version

{“cardanoAddressBin”:"${DAEDALUS_INSTALL_DIRECTORY}/cardano-address",“cliBin”:"${DAEDALUS_INSTALL_DIRECTORY}/cardano-cli",“cluster”:“mainnet”,“daedalusBin”:"${DAEDALUS_INSTALL_DIRECTORY}/Frontend",“isFlight”:false,“isStaging”:true,“launcherLogsPrefix”:"${HOME}/volumes/Extern2Tb/Ketten/Daedalus Mainnet/Logs/pub",“legacySecretKey”:“Secrets-1.0/secret.key”,“legacyStateDir”:"${HOME}/Library/Application Support/Daedalus",“legacyWalletDB”:“Wallet-1.0”,“logsPrefix”:"${HOME}/volumes/Extern2Tb/Ketten/Daedalus Mainnet/Logs",“metadataUrl”:“”,“networkName”:“mainnet”,“nodeBin”:"${DAEDALUS_INSTALL_DIRECTORY}/cardano-node",“nodeConfig”:{“configurationDir”:"",“kind”:“shelley”,“network”:{“configFile”:"${DAEDALUS_INSTALL_DIRECTORY}/…/Resources/config.yaml",“genesisFile”:"${DAEDALUS_INSTALL_DIRECTORY}/…/Resources/genesis.json",“topologyFile”:"${DAEDALUS_INSTALL_DIRECTORY}/…/Resources/topology.yaml"}},“nodeImplementation”:“cardano”,“smashUrl”:“”,“stateDir”:"${HOME}/Library/Application Support/Daedalus Mainnet",“syncTolerance”:“300s”,“tlsConfig”:{“ca”:{“commonName”:“Daedalus Self-Signed Root CA”,“expiryDays”:3650,“organization”:“Daedalus”},“clients”:[{“commonName”:“Daedalus Frontend”,“expiryDays”:365,“organization”:“Daedalus”}],“server”:{“altDNS”:[“localhost”,“localhost.localdomain”,“”,"::1"],“commonName”:“Daedalus Wallet Backend”,“expiryDays”:365,“organization”:“Daedalus”}},“tlsPath”:"${HOME}/volumes/Extern2Tb/Ketten/Daedalus Mainnet/tls",“updateArchive”:"",“updateRunnerBin”:"${DAEDALUS_INSTALL_DIRECTORY}/update-runner",“updateWindowsRunner”:"",“updaterArgs”:,“updaterPath”:"",“walletBin”:"${DAEDALUS_INSTALL_DIRECTORY}/cardano-wallet",“walletLogging”:false,“workingDir”:"${HOME}/volumes/Extern2Tb/Ketten/Daedalus Mainnet"}

What about with this line -

“${HOME}/Library/Application Support/Daedalus”,“legacyWalletDB”:“Wallet-1.0”,

I must change this also? Because is not Daedalus Mainnet folder

No, just leave it as it is. Important is that the large folder with the chain is on the external drive.

No Working Error

Error occured while parsing configuration file: FailedToDecodeFile (InvalidYaml (Just (YamlParseException {yamlProblem = “found unexpected ‘:’”, yamlContext = “while scanning a plain scalar”, yamlProblemMark = YamlMark {yamlIndex = 654, yamlLine = 0, yamlColumn = 654}})))

thx for the solution buddy! :+1:
would also like to drop a special mention to @andy01 for the permanent solution.