In this video we look at how to configure n8n to run behing NGINX.
Out of the box, n8n uses Caddy as a web server, and if you intend to only use your server to run n8n, I suggest you leave things exactly how they are.
If you want to use your server to run other applications alongside n8n, then you will either need to configure Caddy to run those applications, or configure n8n to use another web server - in this case, NGINX.
This guide is only applicable if you installed n8n using docker compose.
WARNING! This guide completely removes Caddy. If any other applications on your server are using Caddy, please DO NOT follow this guide. You will need to reconfigure all of the other applications to use NGINX first before proceeding.
You can see the corresponding article for this video at https://autom8this.com/running-n8n-behind-nginx/ where you will find copy and paste commands and the NGINX configuration file contents used in the video.
03:38 - Installing NGINX
04:26 - Creating the NGINX Configuration File
05:56 - Creating a Symbolic Link
07:05 - Configuring n8n to run behind NGINX (editing the Docker Compose File)
08:43 - Removing Caddy
11:05 - Installing an SSL to use with n8n and NGINX
13:05 - Wrapping-up and Testing n8n and NGINX