aurral icon indicating copy to clipboard operation
aurral copied to clipboard

Feature request: allow configuring container UID/GID for non-root deployments

Open blakey108 opened this issue 9 months ago • 5 comments

Thanks for building Aurral, I’m testing the test image and it looks really promising.

One thing that would make deployment much easier: allowing the container to run with a configurable UID/GID (or provide PUID/PGID style support). In my setup the image runs as uid=1001(nodejs) and gid=65533(nogroup), and Aurral uses SQLite under /app/backend/data. Because the data directory is typically a bind mount, SQLite fails with SQLITE_CANTOPEN: unable to open database file unless the host directory ownership is changed to match those exact IDs.

It would be great if we could:

set a custom UID/GID via environment variables (e.g. PUID / PGID or AURRAL_UID / AURRAL_GID), or

optionally run under a specified user via an entrypoint that adapts permissions (or at least document the required ownership clearly).

This would help users on NAS systems, NFS, and hardened hosts where changing directory ownership to a fixed UID/GID is not ideal.

Happy to provide logs or test changes if useful.

Thanks again.

blakey108 avatar Feb 11 '26 21:02 blakey108

Thanks for the feedback and great idea! I’ve added PUID/PGID support. You can now set PUID and PGID in the container environment, and Aurral will run under those IDs so bind mounts work without changing host ownership.

Just set them to match your host folder ownership and it should resolve the SQLite permission issue.

lklynet avatar Feb 12 '26 01:02 lklynet

I've set aurral to PUID/PGID 1001/1001 and after chowning all files in the aurral volume to that user/group, so that it can access the database, but it doesn't have permission to perform other actions: 2026-02-14T03:10:58.037053950Z [WeeklyFlowPlaylistManager] Failed to write smart playlists: EACCES: permission denied, mkdir '/app/downloads/aurral-weekly-flow'

HeyItsJono avatar Feb 14 '26 03:02 HeyItsJono

Thanks for this app. Started using this and came across the same issue for flows

aurral-1  | [WeeklyFlowPlaylistManager] Failed to write smart playlists: EACCES: permission denied, mkdir '/app/downloads/aurral-weekly-flow'
aurral-1  | [WeeklyFlowWorker] Starting worker...
...
aurral-1  | [WeeklyFlowWorker] Error processing job a186f51a-9911-4786-9942-0f0507cebd68: EACCES: permission denied, mkdir '/app/downloads/_staging'

pixelfudge avatar Feb 22 '26 13:02 pixelfudge

This should be fixed. If you are still having issues, i would suggest deleting the folder you mapped to /app/downloads/ and letting aurral create a new one when its launched.

lklynet avatar Feb 23 '26 23:02 lklynet

maybe I'm missing something. I'm setting PUID and GUID to 1005 (same as my navidrome user) as env vars in my compose file, but the /app/downloads folder gets created by the root user on a fresh install

drwxr-xr-x 3 root root 4096 Mar 10 08:53 discover/

and I then get the same error as above

 [WeeklyFlowPlaylistManager] Failed to write smart playlists: EACCES: permission denied, mkdir '/app/downloads/aurral-weekly-flow'

FilBr avatar Mar 10 '26 08:03 FilBr