unRaid Docker won't work

Having trouble getting PS to run on unRaid. Firstly, had to change the config and log folder locations, as the docker originally tried to create them in a strange un-writable location (not under /mnt/user/appdata).
That got me to the Welcome Screen, but pressing Start crashed it with this error message:

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EACCES: permission denied, open '/ps/tmp/local-db/README.txt'

What settings do I need to change?
Thanks in advance!

EDIT: never mind, found the setting - had to change the .tmp folder location to /mnt/user/.tmp/photostructure.

In short, it seems that the unRaid docker needs some tweaking to work properly.

Running Photostructure on Unraid is actually pretty straightforward. The problem is that somebody created an unsanctioned template that may not have the best configuration. There’s no reason you need to use the template though. All you need is a setup that looks like this:

(note: Host Path 5 should be the directory where your photos are stored)

1 Like

I’m also on unRaid… I have some additional settings for various runtime variables I want set (but those are optional). One thing I have explicitly are two variables for UID=99 and GID=100 - that makes the permissions work for my setup - not sure if it’s a good idea or not.

1 Like

I’m on unraid as well and seems to work good, not at my home computer though so I can’t post my current docker container setup now.

I am on unraid as well, and used the template but through trial and error added and changed a lot of things. Not sure I’ve got it all perfect (I am also fairly new to unraid), but it works well.

My cache drive is a 1TB nvme, so I use it for pretty much everything except my source folder. My library folder is set to prefer cache.

I am not sure which variables I truly needed to make everything work but PS_FORCE_LOCAL_DB_REPLICA set to false was an absolute must. I had all sort of errors before that (and weird behavior in the UI), and the default value is only truly needed if some of your storage is remote and/or slow. Why it hurts when storage is fast? No idea, it doesn’t sound like it should, but it really did for me.

Mounts:

/mnt/cache/photostructure/ → /ps/library
/mnt/cache/appdata/photostructure/tmp/ → /ps/tmp
/mnt/cache/appdata/photostructure/config/ → /ps/config
/mnt/cache/appdata/photostructure/logs/ → /ps/logs
/mnt/cache/photostructure/Photosbackup/ → /photos-backup
/mnt/user/PhotoArchive/ → /photos

Variables:
TZ: America/New_York
PS_FORCE_LOCAL_DB_REPLICA: false
PS_LOG_LEVEL: error
PS_DB_CACHE_SIZE_MB: 512
PS_MAX_MEMORY_MB: 4000
PS_MAX_RSS_MEMORY_MB: 6000
PS_MAX_TASKS_PER_PROCESS: 2000
PS_FFMPEG_HWACCEL: false
PS_KEYWORD_REPARENTING: move
PS_WHO_TAGS: [“People”]
PS_TAG_JSON_FACES: false
PS_TAG_FACE_REGIONS: false
PS_TRANSCODE_VIDEOS: false

1 Like

I’m talking with spants and we’ll be updating the template soon.

:rocket:

3 Likes

Thanks everyone for your comments and suggestions. I’m new to unRaid and Docker, so took some research and trial and error to fix the template.

Here’s my first attempt at a template:

If you find any issues or have any suggestions, please tell me!

1 Like

This looks like a reasonable default template. The one thing I would find helpful is a link to a full list of environment variables that can be added.

1 Like

Your tmp volume should be <HostDir>/mnt/user/appdata/photostructure/tmp</HostDir> (not <HostDir>/mnt/cache/appdata/photostructure/tmp</HostDir>)

Is that because the cache volume may not exist?

Yes, that’s probably the most compelling reason. You want your template to be valid for almost everybody who might want to install it. Most people have a cache, but not everybody. Using the appdata user share allows your template to be agnostic of the setup of that share.

Animated GIF

Squid published my repository as the new official template just now!

:tada:

3 Likes

I installed the official CA container yesterday. I couldn’t get scanning of my files until I added a new container path, as in host path 5 like in post 3. Once I did that PS took off scanning my pictures which are on a specific share on my unraid.

I think that’s to be expected, as @mrm (or any template author) will have no way of knowing the path to your photos. However, perhaps a “dummy” path could be added to the template with a description of what path should be added there.

1 Like

Correct. I just added that in case anyone came in looking at this topic assuming like I did briefly that the Official image had that piece. Once I reviewed the docker settings again I realized it was missing and added it.

1 Like

Thanks for the suggestion, @tkohhh and @kydsid !

Is there a “standard” for unraid templates that y’all have seen for these sort of dummy paths?

I’m pretty sure some of the linuxserver containers have paths like that. I’ll take a look at it later tonight or tomorrow morning and provide an example!

Most docker templates have a host path for data that the docker would access or write too. For PS you might need multiple (I elected to because it was the sorting I wanted to use from PS - so one to scan and another share to write too, the later is already in the template). So the host path for photos with the explanation this is existing media to be scanned by ps would be sufficient.

You could leave blank for the user to define a specific share or prepopulate with /mnt/user. That would would work well with the automatic setting in pS because it would give PS access to all shares for scanning. And it would work with the in app settings for a user to define in there the specific shares if they wanted I think.

Nextcloud example pointing to an example share in unraid

what I inserted for PS template

1 Like