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.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).
Michael1
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
- stop Daedalus
- open
C:\Users\%username%\AppData\Roaming\Daedalus
in file explorer - 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.
- open the file
C:\Program Files\Daedalus\launcher-config.yaml
in a text editor and change thenodeDbPath
parameter. For example when you moved the DB folder to D:\daedalus then add the full absolute path before the existingDB-1.0
- 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 3.0.3.7144. 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?
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
.
Hereās my solution so far:
Letās say I want to install daedalus and have chain stored in /proj/cardano
- In bash:
export HOME=/proj/cardano
- Run daedalus (.bin) in the same bash, you should be able to see it creates folder under the ānewā $HOME.
- After installation, go to /tmp and find the nix temp folder, usually with the name of
/tmp/nix<six-chars-random-string>
- 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
. - 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 thenix-user-chroot
mount point specified by-m
option. - Finally, you can launch the wallet via
.desktop
file usinggtk-launch Daedalus-mainnet
HTH.
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)
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.