How to setup n8n on linode with nginx proxy server?

Context

We’re trying to set up N8N on a Linode instance by making use of the n8n docker container.
The goal is that our n8n application is approachable on a subdomain with SSL/HTTPS connection.
E.g: n8n.xxx.com

The first step: deploying n8n on linode is not a problem.
We can approach n8n on the ip address with the default n8n port → xxx.xxx.xxx.xxx:5678
However, approaching the n8n application through ip-address is not sufficient for our setup.

Therefore we make use of nginx reverse proxy to setup our subdomain with ssl: n8n.xxx.com and point this to the application on xxx.xxx.xxx.xxx:5678

The problem

We tried to achieve our goal with different kinds of setups, but none of them seem to work.
Most commonly we get 502 bad gateway errors. To us it looks like the proxy handles the request, but doesnt seem to get response from n8n on the linode server.

Does someone know which parameters to use in the configuration of both the linode server as well as the proxy server?

Hey @Yentl,

You can follow our normal docker setup guide and ignore the reverse proxy and configure your own proxy making sure it has support for websockets, there are a few examples of nginx setups on here but we would need to see what you are doing to work out what the misconfiguration could be.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.