running DT of an external drive (MacOS)

Hi,

For my workflow, it would be ideally to have entire DT database, image+sidecar files as well as all config stored on an encrypted 2TB external drive, as I could conveniently mount them on my 2 or 3 MacOS machines and use when and as I need it. The addition, it would be super easy to back it up and store off site periodically.

Does anyone run such a setup?

Thank you,
Andy

Putting the database on anything other than an internal ssd or faster will likely lead to darktable feeling exceptionally slow. Files and sidecar files on an external is fine. You should look at darktable’s Copy Locally feature.

tbh a usb 4 external nvme is probably just as fast.

1 Like

I am getting very fast xfer numbers on my external drive indeed.

thx but copy locally feature is more for a selected/surgery kind of work. I just prefer to have all-or-nothing approach.

but is it even possible to configure database on external drive?

Another software which I dare not mention here allowed me to store the DB on each external hard drive I had and when I attached the hard drive to my computers I could then ask the program to open the database located on that drive. This was a very useful feature for my purposes. I too would like to be able to do this with DT but have not worked out how. I feel it would require an option in the lighttable to open a specified DB. Maybe this can already be done and I just don’t know how. I am not willing to put in a feature request for this feature because if the developers thought it was a good idea I am sure they would have already implemented it. I mainly run Windows if that relevant.

Some time ago I made a portable version for windows. I installed DT on my local machine and then added a config folder to the installed directory… THis was on Windows… THen I ran a little batch file that just ran DT pointing to the config… by doing this way you could unzip and run it from anywhere including a USB drive… I suspect you can do the same on Mac… THe key was to add the config folder and then run DT using a batch with the --configdir parameter and point it to that local config file…

Explained a bit more here…

Of course its possible, but you will certainly be disappointed with the performance.

Yes, there are command-line switches to set the locations of the files and directories that darktable uses:

--configdir <config directory>
Define the directory where darktable stores user-specific configuration. The default location is $HOME/.config/darktable/.

This way, you can put both databases (library.db and data.db), as well as the configuration file, on the external disk.
Any LUTs and watermarks would also need to be moved, and you’d have to make sure the external disk is mounted under the same path on all machines, otherwise the image paths stored library.db, and the paths to LUTs and watermarks would become inaccessible. But be warned, the same config may not work on all machines (e.g. different screen resolution if you configure the user CSS or the font size, different resources).

Another option is to only move the library.db, but then your module presets, styles, tags and locations (which are stored in data.db) would not be shared:

--library <library file>
darktable keeps image information in an sqlite database for fast access. The default location of that database file is file name library.db in the directory specified by --configdir or defaulted to $HOME/.config/darktable/. Use this option to provide an alternative location […]

There is no such configuration option for data.db (--datadir is not the right option).

See darktable 4.6 user manual - darktable.

Why? I routinely run even a whole OS (Windows, Linux) off an external SSD on my iMac, and the performance ist just fine.

We must have different definitions of “bad performance” but if it works for you, that’s good.

1 Like

Thx all for the info. So I tested --configdir and it works just fine. I was wondering if we could keep cache local by setting --cachedir though for improved performance.

Now, one thing I could not find after extensive search is how to permanently replace default $HOME/Pictures/Darktable in lighttable->import->‘copy & import’ , so I do not have to worry when importing every time

You mean this?

1 Like

Yes. I noticed though if I put an absolute path pointing to my external drive, it stays there.

I wonder if there is a global setting for PICTURES_FOLDER though, so I can leave the place unmodified.

$(PICTURES_FOLDER) the pictures folder as defined by the system (usually “$HOME/Pictures”)

https://darktable-org.github.io/dtdocs/en/preferences-settings/import/#session-options

I have seen that page but it is not documented how I can override default values.

I tried:

export PICTURES_FOLDER={otherdir1}
/Applications/darktable.app/Contents/MacOS/darktable --configdir {otherdir2}

to no avail.

Perhaps the manual should say Several pre-defined constants can instead of variables .

In any case, setting my own value in the import dialog is not a big deal.

I don’t think it is one specific environment variable; I assume darktable uses a different one for each OS. I’ll try to confirm this when I get home.

1 Like

If I understand correctly, darktable uses GTK/GLib configuration: https://docs.gtk.org/glib/enum.UserDirectory.html

However, I have been unable to find how GTK resolves those. I remember I read something about this on the forum quite recently (someone had to override some variable), but cannot find it.

1 Like

Thx for the hint. I will follow-up on this (used to be Linux dev so I am familiar with the architecture)

1 Like

One more consideration. If case of DT upgrade, it should be done on all machines at the same time to prevent different versions related conflicts. …