I’m running n8nio/n8n:0.195.5 on my kubernetes cluster and I can’t upgrade it to any newer version. Every time I try to release any version >= 0.196.0 I get Error: EACCES: permission denied, mkdir '/.cache' How to fix it ?
It looks like an OS permission issue, What user do you have n8n running as? At some point I think we changed to a node user so if that was trying to do something in a root owned directory it would fail.
Hi ! I am just trying to run pure n8nio/n8n:0.214.0 - I haven’t changed anything in the Dockerfile so the user is exactly the same as you defined in your image and it’s not working ;c
since the last few release, n8n has stopped keeping compiled static assets in memory (to reduce the memory footprint of the service), and needs a folder to write these static assets to.
In the code this folder is defined as the ${N8N_USER_FOLDER}/.cache folder.
Usually people running n8n run it with the node user that’s defined in the container image, which makes it possible to write to /home/node/.n8n as well ass /home/node/.cache.
Since you have overridden N8N_USER_FOLDER to /, You need to either
create a new volume that mounts on /.cache, and make sure that the user 110002 can write to it. Or,
remove N8N_USER_FOLDER env variable, run the container as the node user, and update the mountPath for the n8n-home volume to /home/node/.n8n.
What’s key is that the user n8n is running as is able to write to .cache and .n8n folders inside the path defined via N8N_USER_FOLDER.