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

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%.
:o)
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 :
~/.local/share/Daedalus/mainnet/namespaceHelper
and
~/.local/bin/daedalus
I added :
XDG_DATA_HOME=/hook/Daedalus/mainnet
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.

2 Likes

Thanks.
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).

Hi,

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 Mainnet.app/Contents/Resources/launcher-config.yaml

    • 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 TextEdith.app 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":"https://tokens.cardano.org","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":"https://smash.cardano-mainnet.iohk.io","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","127.0.0.1","::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.

Hi guys!
Could you help me set up Daedalus to store the blockchain on an external hard drive?
I’m on Linux Mint 20.3, but not confident enough to just edit the above mentioned files.
So far, I’ve tried symlinking, but as soon as I’ve created the symlink after moving the “chain” directory to the external hard drive, when I start Daedalus, it starts rebuilding the blockchain under /tmp.

I gathered from the posts above that this is a known issue that requires some changes in the /.local/bin/daedalus-mainnet and /.local/share/Daedalus/mainnet/namespaceHelper files.

Since the changes you guys mention are spread out over several posts, I’ve lost track of what has to be edited/added where.

I’d appreciate it if you could point me in the right direction, thanks!

From where to where do you have the symlink?

For me, it really is enough to add -m /media:/media in the two exec lines in ~/.local/bin/daedalus-mainnet among the other -m options. That’s because my symlink goes to a location in /media and therefore /media has to be known in the chroot. If you symlink to somewhere else that other location perhaps has to be added.

Hi! Thanks for the quick reply.
I ran this:
ln -s /media/myusername/BLOCKCHAINS/Cardano/chain /home/myusername/.local/share/Daedalus/mainnet

I’ve just added what you suggested (for now, only in /.local/bin/daedalus-mainnet), and Daedalus is STILL rebuilding the blockchain in /tmp.

EDIT: have now added -m /media:/media to /.local/share/Daedalus/mainnet/namespaceHelper as well, and it seems to be working.

1 Like

Don’t know, why you also need that. Maybe it depends on how you start Daedalus. But good if it works for you now.

Thanks a lot for the input. I start Daedalus with the desktop link it creates, which points to /.local/share/Daedalus/mainnet/namespaceHelper.

I can’t believe the solution should end up being so simple :slight_smile: I’ve been racking my (and other people’s) brain for four days straight over this.

I’ll come back when the blockchain finished downloading and I can confirm that everything works fine.

Thanks again!

1 Like

Seems like everything is in order. I’ve spent the better part of five days looking for a solution that came down to adding a few characters to a config file. Sheeesh.

Anyway, thanks again, @HeptaSean!

1 Like