Home » n8n» n8n which port: default port and deployment tips

Learn n8n which port?

This guide explains n8n which port is used and how to adjust it for Docker, VPS, Node.js, and cloud setups. By default n8n listens on port 5678. You can change this value to match your hosting or security needs.

What is the default n8n port

The standard port for n8n web access is 5678. That is the port the n8n web interface serves by default. Many users access the UI at http://your-host:5678 or via a reverse proxy on a different public port.

n8n which port explained for common setups

For Docker, the container runs n8n on 5678 inside the container. On a VPS running Node.js, the app also listens on 5678 unless configured otherwise. Cloud services may map a different public port or use a load balancer.

How ports and port mapping work with Docker, VPS, and cloud

  • Docker often maps container port 5678 to a host port. This lets you expose the UI on another port.
  • On a VPS you can run n8n behind a reverse proxy like Nginx to serve it on port 80 or 443 for SSL.
  • Cloud platforms can forward traffic from a public port to the internal 5678 port or handle TLS termination for you.

Best practices for choosing and changing the port

  • Use port 5678 when you can for simplicity and documentation compatibility.
  • Use a reverse proxy and serve on port 443 for secure public access.
  • Avoid using privileged ports below 1024 unless required and configured securely.
  • Keep network rules and firewall settings aligned with the chosen port.

Conclusion

In short, n8n uses port 5678 by default. You can change that port to meet your Docker, VPS, Node.js, or cloud environment needs. Use a reverse proxy for secure public access and adjust firewall rules accordingly.


Neil
Written by Neil

Neil is a true n8n geek who lives and breathes workflow automation. He dives deep into nodes, triggers, webhooks, custom logic, and self-hosting setups, sharing everything he learns about n8n on AutomationCompare.com. As part of a broader team of automation specialists, Neil focuses purely on mastering n8n and helping others unlock its full potential.

Keep Reading

Scroll to Top