Fresh Docker installation on Ubuntu gives 404 Page

Hi guys,
this is my first post here and first of all, n8n looks amazing. I think it is an incredible tool.
Also I love the idea of fair-code (never heard it before) and I hope to give something back to the community and to the project.

I made a fresh server installation on ubuntu20.04 with docker. Everything looks good at installation.
But when I try open the page it gives me a 404 error.
What am I doing wrong?
SSL works and everything seems to be fine.
Is there a n8n log somewhere?

Looking forward to your help,
Cheers,
Alex

1 Like

Are both docker containers running?
check with command: docker container ls

1 Like

Welcome to the community @alexhammerschmied!

As @Benedikt_Bohm pointed out is it a good start to make sure that the container is running. If it is you can get it output via docker logs <container-name> for example docker logs n8n

Did you follow our server-setup guide?

If so I did do exactly the same a few weeks ago also on ubuntu 20.04 and for me, it worked fine. So would then check if the domain and subdomain are set correctly.

1 Like

thanks for the answers guys.
This is what is in the logs for the second container (n8n):

UserSettings got generated and saved to: /home/node/.n8n/config
(node:6) UnhandledPromiseRejectionWarning: Error: There was an error: EACCES: permission denied, open '/home/node/.n8n/config'
    at Object.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/errors/lib/index.js:26:15)
    at Start.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/command.js:60:23)
    at /usr/local/lib/node_modules/n8n/dist/commands/start.js:134:22
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:6) UnhandledPromiseRejectionWarning: Error: SQLITE_CANTOPEN: unable to open database file
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

So there is a problem with the read/write permissions. But I followed the tutorial exactly (at least i think so…)

You can try to change the path in the docker-compose file.

From

   - ${DATA_FOLDER}/.n8n:/home/node/.n8n

to

   - ${DATA_FOLDER}/.n8n:/root/.n8n

And then restart. If that does not work you can try to run:

chmod 777 -R ~/.n8n
3 Likes

Amazing! Thank you Jan!
Now it works. Now I am able to see the obvious…

Thank you very much!

Great to hear! Have fun!

Hi Jan,

I am having 404 issues and tried to do everything you guys mentioned above and I was not able to fix it. Could you please help me?

@Stephano_Fernandes do you get an error in the docker logs? Are you also able to share the environment options you are running (removing anything important)

Hi… Checking the erros logs, it seems to me some erro ir the ports of traefik container. Please see attached. Please let me any other command that I can run to share more info with you. I am a begginer. Thank you !

Screen Shot 2021-10-17 at 08.08.28|690x277

Thank you!

There is a big space there between the port and the hostname, Do you have the logs from the traefik container as well?

Is this one?

That could be the one, Looks like something is unhappy do you have something already listening on port 80 and 443?

I am not sure how Traefik actually works but it does seem to be unhappy. Are you running on this a webserver that already has something like Apache / IIS or Nginx running?

I am running on a server on Digital Ocean. How can I check if there is something already running on ports 80 and 443? I just set up this new server yesterday on Digital Ocean, it is a brand new Ubuntu 20.10 x64 machine and the only packages I installed are the ones listed in the tutorial to set the server.

That should be ok if it is a new droplet. Are you using compose and can you share the file removing anything important.

My composer is exactly the same as the tutorial on the link. I only changed the data folder path as suggested here in the last line.

And this is the env file

Hi Jon, check this out. The ports seems to be open and correctly linked to the docker…

They do look right don’t they, I wonder if it is the data folder. Does the user running the container have permission to write to the root folder?

There is only the root use. I did not create any other one. How can I check the permissions?

I was also wondering if it would be the case to use PM2 / NGINX as discussed below.