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

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

Not sure about the linux distribution, but on Mac there’s the launcher-config.yaml file. You can try to play with it and see if it helps:

The nodeDbPath property specifically

I don’t know how to make Daedalus change the location, but maybe you can trick it and get the log files stored where you want them. You can try and move the entire DB and log directories to the new location then create a symlink to the new locations. I had done this migrating older programs from one version of linux to another with a different directory structure and it didn’

t always work.

1 Like
1 Like

Combining the two answers by @rickymac and @p-alik worked perfectly.

Detailed solution:

The shell script that installed the wallet on my distro (NixOS) put it in ~/.local.

I made a new directory on my large drive mounted on /data called /data/cardano.

I went to ~/.local/share/Daedalus and executed mv mainnet /data/cardano. After that completed I did ln -s /data/cardano/mainnet/ ./mainnet.

Next I made sure to edit ~/.local/bin/daedalus and ~/.local/share/Daedalus/mainnet/namespaceHelper (now symlinked to the big drive… this is what my desktop shortcut runs to start the wallet) to have the additions suggested by @p-alik. Both those files now look like this…

#!/usr/bin/env bash

set -ex

cd ~/.daedalus/
mkdir -p etc
cat /etc/hosts > etc/hosts
cat /etc/nsswitch.conf > etc/nsswitch.conf
cat /etc/machine-id > etc/machine-id
cat /etc/resolv.conf > etc/resolv.conf

export XDG_DATA_HOME=/data/cardano/mainnet

exec ./nix/store/4xbn31l2fr95vp9z7g7ayxzy19ywcpnd-nix-user-chroot-2c52b5f/bin/nix-user-chroot -n ./nix -c -m /home:/home -m /etc:/host-etc -m etc:/etc -p DISPLAY -p HOME -p XAUTHORITY -p XDG_DATA_HOME -- /nix/var/nix/profiles/profile/bin/enter-phase2 daedalus

After starting up the wallet again it is now using the shared drive AFAIK this is now working with no problems and no longer uses my SSD, which is shorter on space. Thanks all!


@p-alik @rickymac After letting it go some more I am not so sure it is using the right directory! It seems to be writing to /tmp instead of to /data/cardano as I set for the XDG_DATA_HOME.

Ouch. Have you tried just using one of the 2 solutions?

I plan on doing the same thin next week, I will try the symbolic link method.

It did not work for me with just the symbolic link…

Maybe try a hard link. Or use p-alik’s method all by its self? He really knows the details well.

The credit is only of @_ilap. I hope he could help. The workaround helped me to solve the isseu. But unfortunately I never went further testing.

Hey, Replicated on Windows 7. I’m just trying to run Daedalus for the first time, for over a week. In the meantime, it got fully synchronized (I understood it from the logs). I tried everything suggested in the FAQ and on the web, and I mean everything (except using another PC, which is not a fix).

happy columbus day

Replicated what? Please create a dedicated topic if you need help.

Here’s a little howto for Windows systems based on version 1.4

  1. stop Daedalus
  2. open C:\Users\%username%\AppData\Roaming\Daedalusin file explorer
  3. move the subfolder /DB-1.0 to the new location and ensure that your personal user account has read&write permissions

Note: As this is the public blockchain data folder, it’s not crucial to protect it in a special way. But that doesn’t apply to the other folders and files in the original Daedalus folder. Moveing them to some other location should be done very carefully.

  1. open the file C:\Program Files\Daedalus\launcher-config.yaml in a text editor and change the nodeDbPath parameter. For example when you moved the DB folder to D:\daedalus then add the full absolute path before the existing DB-1.0


  1. now safe this config file and launch Daedalus

In case your Computer has not that much free space left on the system partion (C:) by moving this DB folder to another partition will free up around 3.5 GB of diskspace.


I know this is an old thread but it still seems to be the most relevant so I’ll bring it back to life…
I am also trying to change where the blocks/DB folder is stored (I want it on different partition than my OS) but I cannot get it to work.

I am on Archlinux (5.2.13-arch1-1-ARCH) with Daedalus 0.14.0 and Cardano So I believe the latest version at time of writing.

If I try to symlink the folder ~/.local/share/Daedalus (or any of its subfolder) to a folder on another partition, then depending on what folder/subfolder I symlink either:

  • Daedalus doesn’t launch and in the terminal I get: “mkdir: cannot create directory ‘~/.local/share/Daedalus’: File exists”
  • or Daedalus launches and says immediately something along the lines of “Cardano node crashed”

If I try the solution of @p-alik / @_ilap of editing the shell script then something really strange happens.
It does not write the blocks to any partitions (definitely not in the folder defined in XDG_DATA_HOME) but instead seems to store them in the RAM. The memory used by the process cardano-node grows indefinitely until my machine runs out of memory and freezes/crashes.

Any suggestions how to solve this? Has there been any progress made on this topic?