Problem self-hosting with Digital Ocean

Hey guys, so I’ve spent about 3 hours today trying to self-host n8n on digital ocean, I tried a bunch of things but can’t seem to make it work!

The process of setting everything up is quite easy, but once I launch n8n on the droplet with “sudo docker compose up” I get this error and the website doesn’t load on my subdomain…

Any idea what I’m doing wrong?

I tried installing it with the root user and inputting root as the directory and I tried making a user and inputting /home/rene/… as the director in the .env file… both don’t work.

Hey @windgrowth,

Welcome to the community :cake:

Did you follow our guide to setting up n8n on Digital Ocean? It looks like you have a permission issue, If you tried to use root before I would start the process again and use a normal user from the start which should work.

Hey Jon,

So yes I did follow all the procedures and redid it over 10x.

With root and with a normal user as well.

I also got on a call with someone currently self hosting n8n and he redid the whole process he did on a new dropplet and he’s now getting the same error as me.

Is it possible the new update isn’t working? Also we realized his current Ubuntu version on his working n8n is 22.10 but digital ocean offer 22.04 only since 20th of july

This has been my 5th or 6th deployment of n8n and I am also having the same issue trying to install on a GCP Ubuntu VM. I have another one already deployed in GCP. Gives me the same permissions issue with root and normal user, and chmod/chown doesn’t work since the file it’s looking for doesn’t exist if you go looking for it.

Error: EACCES: permission denied, open ‘/home/node/.n8n/crash.journal’
Error: Exiting due to an error.
Error: EACCES: permission denied, open ‘/home/node/.n8n/crash.journal’

Easy enough solution until they get it fixed. Run “docker pull n8nio/n8n” first and then “docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n”.

That command doesn’t persist your data so it isn’t ideal…

I have just ran through the getting starting guide and it looks like the .n8n folder is being created as root which is not ideal, If you installed n8n as a user that we call myuser this can be fixed by running chown -R myuser:root /home/myuser/.n8n which will fix the issue.

I have posted this internally so that we can fix the image or include this in the guide.

At which step do you do that? I just redid the whole installation again.

Created a user called rene, gave it admin privilege

logged in the console as rene

did all the steps, in the .env file I put DATA_FOLDER=/home/rene/n8n-docker-caddy

now when I do your command it says this "
rene@wg-n8n:~/n8n-docker-caddy$ chown -R rene:root /home/rene/.n8n
chown: cannot access ‘/home/rene/.n8n’: No such file or directory"

Hey @windgrowth,

In that case you will need to try chown -R rene:root /home/rene/n8n-docker-caddy/.n8n

ahhhhhhhhh the feeling when it finally works lol!

Thank you Jon

2 Likes