darktable on an external drive

The challenge: getting darktable to function with the database files on an external drive.

For a number of weeks I have been trying to get either darktable or digikam to work as a Digital Asset Management platform. I posted a separate post regarding the issues that I have had with digikam, namely that it only picks up some of the images. This post will focus on my issues with darktable.

I have used iMatch for many years but my current database will not transfer to their newer versions so I am losing all of my categorization work. (Unless I find someone to write a script to read the database and then write the information into the correct files.)

I have 200,000 files of photographs and videos, they total around 6 TB of data, they are on an external drive, I am on a Windows 11 mini PC dedicated to working with the photographs and videos. This allows me to have it churning away on rendering a long video while doing other work on my main PC with neither of them interfering with the other.

This set up is working well but presents a challenge as far as working with darktable. Because of the set up I need the darktable database to be on the external drive. Darktable was successful at scanning all 200,000 files (it did take a long time), however, I cannot get it to recognize the database when it is on the external drive, it keeps trying to start a new one under the user AppData folder.

I tried different versions of the --library command that a number of articles mentioned but could not get it to work. Maybe that is just a Linux thing?

Next I found reference to editing the database location in the darktablerc file. I have tried that but apparently have not gotten it right as anytime I try to open darktable I get an error saying that there is a lock file even though I cannot find any. The error screen has a button that is an option to delete the lock files but it does not solve the problem.

Any suggestions on getting darktable to function with the database files on an external drive?

If that is not doable would XnView MP work as an alternative? Do you know of any step by step guides on XnView MP as a DAM? I saw an article that referenced several settings you needed to change in order to edit and save data but have not been able to find that article again.

I would like to use darktable (or digikam) but after spending many, many hours have not gotten either one to work for my situation.

Its going to be really slow from an external drive, And you’ll need to mount the drive to the same drive letter on every PC.

What command did you try for --library ? Please share the full command and the terminal output that results from it.

I tried also for a few weeks, I gave up because too slow. Using now internal SSD for storing “work in progress” images and of course DT database. When editing is done, I move these images on the external HDDs. And I backup everything on other external HDDs …

I don’t know if this helps, but all active photos are on an internal SSD and archived photos are on an external drive while DT and its library and config files are on my main C: drive, and everything works well for me. This might be a good workaround for you unless you absolutely need those files stored externally.

Thanks for the responses.
As far as drive letter- yes, I assign it the same drive letter.
As far as command- I tried various alterations of
darktable --library N:\AV\Darktable 202506a\library.db
With spaces, without, with backslash before path, without backslash, with brackets that one example had, etc.
The errors were variations of not a recognized command

Can you try the full path to darktable and quotes around the library path? Something like "C:\Program Files\darktable\darktable.exe" --library "D:\darktable\library.db" and share the terminal output.

In regards to the general issue of having the database on the C: drive in the user files: With 200,000 images, having lost all of my categorization work once I am not keen on it happening again. I have had 3 Windows 10 & 11 computers end up with permanent BSOD after updates, resulting in the loss of user app data. I try to make sure that nothing of a permanent nature gets stored there.
I am open to ideas on alternatives to the external drive location but am very hesitant to use the user app data location on the C: drive.

You need to have backups instead of just trying not to keep anything there.

Instead of just specifying the library, specify the darktable configuration directory so that everything about darktable is stored in one place, darktable --configdir N:\AV\Darktable 202506a\. This way all the files you need for darktable (darktablerc, library.db, data.db, etc) are in the same place and if you have to move to a different computer all you have to do is point darktable on the new computer to the same place.

paperdigits, thanks for the path suggestion.
Here is what I entered, including the quotation marks:
“C:\Program Files\darktable\bin\darktable.exe” --library “N:\AV\Darktable 202506a\library.db”
No error message in terminal output, opened darktable.
It did create a lock file in both the AppData and the external drive location and it added a few files to the AppData folder but seems to have opened the database from the external drive.
I will try wpferguson’s configdir option next.
Thanks

Instead of the command prompt this time I edited the shortcut path to “C:\Program Files\darktable\bin\darktable.exe” --configdir N:\AV\Darktable 202506a.
It ignored the " 202506a" part and created a folder "N:\AV\Darktable
I closed darktable, copied my database files into that folder and the shortcut now opens my database on the external drive. (No new files in the AppData folder.)
I tried opening darktable with the command prompt with the configdir and that works as well.
Thanks!!!

1 Like

Yes, I had something like that happen myself a few months back. Fortunately I’ve been good about backing up my user data onto a separate location, but needless to say, you need to manage your data as you see fit.