Nginx reverse proxy - asset failing

Describe the problem/error/question

Hi, i want to certificate n8n which is running on different port. So im using the way of nginx reverse proxy.

While opening the new port, page is failing in case of bug that some N8N assets are not loading (via screen). Its probably because the path to this assets is hardcoded and cannot be changed. Could you please add new feature to change the path of this asset by for example N8N_PATH or something like that? So I can use N8N without console bugs.

Or is some other way how to solve this issue?

What is the error message (if any)?

Please share your workflow

Nginx

Docker

Information on your n8n setup

  • n8n version: 1.21.0
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

Hey @Filip_Machala,

I am not sure this is a feature request as it looks like it could be a configuration issue, If your reverse proxy is using the /n8n/ path then I don’t think you need to set the /n8n/ path for n8n as well but as you do have that set shouldn’t your proxy pass option take that into consideration as well and redirect to http://n8n:5678/n8n/ because that is what you have configured n8n for?

Hello, I apologize for any confusion. Let’s start all over.

I would like to run n8n as a subfolder of my domain. I have gone through articles and forum discussions on configuring n8n as a subdomain via proxy. However, I need it to be set up as a subfolder (https://mydomain.tld/n8n/). I’ve managed to load the n8n page with all assets using nginx configuration and docker environment variables above, except for /rest/settings. The issue pops up because the call is made to https://mydomain.tld/rest/settings instead of https://mydomain.tld/n8n/rest/settings. I’m not sure if I’ve overlooked a configuration setting.

In summary, could you provide a brief description of how to configure n8n as a subfolder in nginx? Thank you.

Hey @Filip_Machala,

We don’t really document for different reverse proxies so some of it would need to come down on your knowledge of nginx. I would maybe start with what I suggested previously to see if that helps though.

Have you also set the editor base ui environment variable that could possibly help as well.

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