Can't access n8n on localhost:5678 using Docker Desktop Linux

Describe the problem/error/question

I’m a beginner Docker user. I’m running n8n using Docker Desktop for Linux, but I’m unable to access it using localhost:5678 on the same machine that is running Docker Desktop.

I’m tried several hours of troubleshooting, including opening port 5678, but still no luck.


What is the error message (if any)?

Information on your n8n setup

  • n8n version: 1.32.2
  • Database (default: SQLite): SQLite
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Desktop
  • Operating system: Linux Mint 21.3 Cinnamon

Did you try on Chrome or another browser as well?
if that’s not possible try to turn off some security settings temporarily.

Are you using a vpn? Try disconnecting if you are.
Also try connecting with the IP address instead. Google whats my IP. copy the IPv4 ip address and then use it in your url bar like

Actually the issue is might be with not mapping the docker port with the host port.

Can you provide the docker command that you have used to run it?

Thank you @liam and @barn4k for the quick responses! I figured out the issue after some more troubleshooting. I had to enter the port in this field when setting up the container. After that, I can run the container and access it using localhost:5678

Not sure if it’s b/c I’m a first time user, but the UI is confusing since it looks like the port is entered to the right by default.

On the right are the container ports. On the left are the host ports that should or should not be mapped to the container (it’s not nessesary to map ports for container to work). If you won’t specify any ports on the left, then no ports will be mapped (meaning, you can’t access the container instance from host)