Challenge 1: Run multiple N8N instances on same host
Seems to work by setting the USERDIR variable to a dedicated value for each instance, providing a different port via N8N_PORT and using dedicated db schemas.
Challenge 2: Use different context path for each instance (but not yet using a SSL proxy)
N8N is starting fine, the js/css resources in the returned html page pointing to “/n8n_default” (as expected), but N8N is still serving css and js resources using “/” as path
Hi @aschuma, welcome to the community and I am sorry to hear you’re having trouble here.
The documentation for VUE_APP_URL_BASE_API suggests this variable is only taken into account when building n8n:
Used when building the n8n-editor-ui package manually to set how the frontend can reach the backend API.
So you might need to build a custom version of n8n as described here. Tbh, this seems like like a lot of effort, especially when keeping these up to date.
So it seems much simpler to set up individual subdomains for each of your n8n instances (your third option) and just use the default path / for each (at least with nginx or caddy as the reverse proxy). Seeing you are using Windows Server make sure to check out this configuration advice from fellow community member @lublak if you want to use IIS:
I thought already about using subdomains for the dedicated N8N instances. But in this special case I probably run into trouble to get dedicated certs or wildcard certificates. This is an other story
What I do not get is, why it’s possible to specify an N8N_PATH at all? In general I would assume, that this would change the context path globally. Probably I missed something in the doc. Could you clarify that?