-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.96.0-rpi image - data persistence issue #1233
Comments
Ah yes, thanks a lot. You are right. We will update the documentation it should be |
Ok did update it on the website: https://n8n.io Also committed the fix the n8n-docs repository. So it should tomorrow also appear in the docs with the next docs-update. |
Hi @janober, thanks for your quick response but changing mount point did not resolve the issue. I've tried running container with command:
and following error appeared:
Could you reopen this issue? |
Sure can reopen it but if it does not work I guess the error message describes what the problem is. That it can not write to the file. So would try to delete the folder ( |
Yeah, the problem is that by default n8n runs with "node" user privileges because of line in Dockerfile which I mentioned earlier. So if you just run command:
as root (which I think is the default method for most users) the whole n8n configuration won't be saved because user "node" inside container does not have privileges to write to root's ~/.n8n on host machine. And when you recreate n8n container (which in my case I did after a few days of happy using) you'll find out, that all config files were never saved and are gone now. After changing container's bind mount from /root/.n8n to /home/node/.n8n, the error mentioned before appears. So, quick workarounds that can be made are:
extra lines before:
line. This will work only if used with docker volume which does NOT exist yet. To run n8n this way use:
My whole point is that everything should work from the beginning without a need to do some extra configuration. So I think Raspberry's version of the image should run n8n with root privileges like other versions does. If someone is willing to run it with less privileged user then custom image can be made locally. |
Hey @NlVlN we released an update on version 0.99.0 that might have fixed this. You can find all the discussion in the link above. Let me know if this solved the issue for you! |
As we did not hear back for multiple months do I close this issue now. If the issue still persists for you please report back. Thanks! |
Describe the bug
n8n data is not persistent when using official docker image for Raspberry Pi and official instruction from docker hub's "Persist data" section (https://hub.docker.com/r/n8nio/n8n#persist-data).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Data should be saved in the mounted directory / volume.
Environment:
Additional context
Probably the issue exists because n8n is executed as "node" user inside container because of line:
in Dockerfile and therefore, it is not able to save data to /root/.n8n directory.
The text was updated successfully, but these errors were encountered: