Docker owner of volume


I noticed n8n docker assigns the owner of the volume it creates to that of 1000.

What ever new volume i mount or bind it changes to that of the owner of 1000.

Is it possible to set it to another value besides 1000?

For example in my scenario the id 1000 is mysql but i want n8n the owner of the volumes it creates in my host to be that of 1002, another user i have.

I can’t find a way to do it besides chown every time i update the docker or re create it.

Hey @Mulen,

This is more of a Docker question than an n8n one but it is an interesting one, It looks like you might be able to use the below option in your compose file.

user: "1002:1002"


Thanks i tried but doesn’t seem to work.

The problem is here, for example

- ~/.n8n:/home/node/.n8n

the ~/.n8n folder that it gets created on host (not the /home/node/.n8n that is docker’s container volume) is assigned with user id 1000 no matter what and i want that folder to be belong to someone’s else user.

Tried to google but didn’t find a correct way yet.

I will have to give it a test with some of the other docker images I run I pass UID and GUID as compose env options.

1 Like