The current n8n docker installation runs with PUID and PGID of 1000.
By doing this n8n runs on the system with the user 1000 is assigned.
For example in my installation environment 1000 id is the user mysql.
So n8n runs as mysql user.
The problem is when you create a folder or a volume and map this to docker and wants the n8n to write, edit and delete files and folders inside this parent folder, you have to chown the permissions for the parent folder to that of mysql user in my example.
The best thing is to create a user in linux for the n8n installation and assign that ID to the docker via environent variables.
So in docker compose will look something like that:
environment:
PUID=1002
PGID=1002
Please consider adding that option so we stop using others users permissions to folders and files so that n8n can write and modify files and folders locally in host.
It would be excellent to support this for sharing application data across NFS volumes. My specific use-case is that I have n8n deployed in a small k3s cluster and have set custom filesystem permissions for certain deployments and namespaces.
Most, if not all linuxserver.io containers implement this handy feature which makes deployment a lot more flexible!
is there any progress on this? i’m struggling with a docker install on Synology, specifically to mount and map a persistent volume to /home/node/.n8n, and the problem is entirely because i can’t set a custom PUID and PGID on the container.