Information on n8n setup
- n8n version: 0.178.0
- Database: Postgres
- Running n8n via npm on Windows 2019 Server
My goal
I am retrying to setup multiple n8n instances on a single host. In addition a ssl reverse proxy should provide the SSL termination, e.g.
SSL reverse Proxy (https://www.example.com)
|
|--- N8N Instance 1 (https://www.example.com/n8n_default)
|--- N8N Instance 2 (https://www.example.com/n8n_instance2)
|--- N8N Instance 3 (https://www.example.com/n8n_instance3)
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)
- I tried the solution mentioned here N8N as a subfolder with nginx - #5 by harshil1712, but without any success.
- 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
"N8N_PORT" : 6678,
"N8N_PATH" : "/n8n_default/",
"DOMAIN_NAME" : "localhost",
"WEBHOOK_URL" : "http://localhost:6678/n8n_default",
"VUE_APP_URL_BASE_API" : "http://localhost:6678/n8n_default",
<!DOCTYPE html><html lang="en">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="/n8n_default/favicon.ico">
<script>window.BASE_PATH = "/n8n_default/";</script>
<title>n8n.io - Workflow Automation</title><link href="/n8n_default/js/chunk-2d2073c1.f0370751.js" rel="prefetch">
<link href="/n8n_default/js/chunk-2d22d3e6.388c0a4c.js" rel="prefetch"><link href="/n8n_default/js/chunk-4301fce8.d032a636.js" rel="prefetch"><link href="/n8n_default/js/chunk-b1e1f7c0.92d036f0.js" rel="prefetch"><link href="/n8n_default/css/app.3544aae5.css" rel="preload" as="style"><link href="/n8n_default/css/chunk-vendors.274eb558.css" rel="preload" as="style"><link href="/n8n_default/js/app.98057e67.js" rel="preload" as="script"><link href="/n8n_default/js/chunk-vendors.ec9c98e5.js" rel="preload" as="script"><link href="/n8n_default/css/chunk-vendors.274eb558.css" rel="stylesheet"><link href="/n8n_default/css/app.3544aae5.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but the n8n Editor-UI doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/n8n_default/js/chunk-vendors.ec9c98e5.js"></script><script src="/n8n_default/js/app.98057e67.js"></script></body></html>
Any ideas which additional setting I should tweak ?
Challenge 3: Wrap the stuff using a reverse proxy
- Not yet started, but I guess I will observe more suprises