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

**URL:** <https://forum.cardano.org/t/how-do-i-change-the-directory-where-daedalus-stores-its-db-and-logs-in-linux/12908>\
**Category:** Community Technical Support\
**Created:** [9 June 2018 15:20 UTC](https://forum.cardano.org/t/how-do-i-change-the-directory-where-daedalus-stores-its-db-and-logs-in-linux/12908 "2018-06-09T15:20:18Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dbwest](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dbwest](https://forum.cardano.org/u/dbwest)\
**Post date:** [11 June 2018 17:52 UTC](https://forum.cardano.org/t/how-do-i-change-the-directory-where-daedalus-stores-its-db-and-logs-in-linux/12908/5 "2018-06-11T17:52:06Z")

</div>

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!

---

_[View the full topic](https://forum.cardano.org/t/how-do-i-change-the-directory-where-daedalus-stores-its-db-and-logs-in-linux/12908)._
