AppData/Data Directory Path Config for Non-Unraid Dockers

I’m still learning my way around things, but had a bit of a hiccup a few weeks ago. I posted about it on the Unraid forums and got some answers, but the responses weren’t as detailed enough for me to figure things out. I messed around with a few settings, but I’m not seeing data where I’m expecting it.

I haven’t started dumping a lot of stuff into Unraid yet, as I’m afraid I’m going to screw something up and lose data/info. I’ve spun quite a few things up and go them working, but nothing I couldn’t live without.

I started receiving docker.img size warnings and after not having a ton of luck find a fix, one of the suggestions was to delete it, reinstall the apps from Apps > Previous apps, and you’d be fine. I did that, had to recreate the defined network I had configured, change the dockers to use that network, then was back up and running. Or so I thought.

It seems like the non-Unraid dockers (the dockers I installed that aren’t “custom” to Unraid) didn’t have their data stored in AppData, so when I nuked things, that data was gone. I had only messed with a few things and hadn’t started adding a lot of stuff, just in case something like this happened.

I do want to configure things so something similar doesn’t happen in the future. How to I configure dockers like shaarli and trilium to store their data elsewhere when the appdata entry isn’t a standard configurable?

Example: shaarli - it took me a little while to figure out to make the custom port to get that up and running in Unraid, but now the port is there, but the data is gone. After checking the shaarli docs, it refers to data_dir in their config, which seems to point to “data”. Similar with trilium: TRILIUM_DATA_DIR=/data

Do I define some custom paths and everything is taken care of or do I need to tweak the config in the docker, then account for that change in the Unraid?

TIA.

Unraid Forum link for reference: AppData/Data Directory Path Config? - General Support - Unraid

“Unraid” Dockers that you may find in community apps or from Linuxserver/etc. will have a Docker PATH already added to them that maps the container’s data to /appdata. If you don’t use a pre-made template then you need to add that path yourself.

This is the configuration for one of my Postgres containers:


Notice Host Path 1, I manually added a mount so that postgres’ data get’s persisted to my appdata folder. You’ll have to figure out where the data for a container is, but it is usually referenced in the documentation (or a VOLUME command in the Dockerfile)

In regards to your Docker.img warnings, this is due to not adding these mount points. If a Docker image has a Volume that doesn’t get mounted to anything it will get put in your Docker.img (which you don’t want).

If you have further questions you can hit me up on Discord (or here)

1 Like