Describe the problem/error/question
Our n8n instance was installed via npm and runs on NodeJS/Ubuntu Server 20.04.6.
Our current version is 1.45.0 and we use a config file in /usr/lib/node_modules/n8n.
Inside /etc/environment we have linked N8N_CONFIG_FILES=“/usr/lib/node_modules/n8n/my-config.json”
After updating from 1.45.0 to 1.58.2, the current config file is not accepted anymore. It seems like the schema has changed.
One hint I found, in the current version of packages/cli/src/config/schema.ts on Github, I cant find any property named “host”, “port” or “listen_address”.
I checked the breaking changes, but all of the last entries didnt seem to give any useful information.
Current config file:
{
"database": {
"sqlite": {
"executeVacuumOnStartup": false
}
},
"executions": {
"maxTimeout": 1800,
"saveDataOnError": "all",
"saveDataOnSuccess": "none",
"pruneData": true,
"pruneDataMaxAge": 168,
"pruneDataMaxCount": 3000
},
"generic": {
"timezone": "Europe/Berlin"
},
"host": "192.168.x.x",
"port": "8080",
"listen_address": "192.168.x.x",
"editorBaseUrl": "https://example.org",
"endpoints": {
"webhook": "api",
"webhookWaiting": "api-wait",
"webhookTest": "api-test"
},
"externalFrontendHooksUrls": "example.org",
"nodes": {
"exclude": "[\"n8n-nodes-base.executeCommand\",\"n8n-nodes-base.writeBinaryFile\"]"
},
"logs": {
"level": "debug",
"output": "console,file",
"file": {
"location": "/usr/lib/node_modules/n8n/logs/n8n.logs"
}
}
}
What is the error message (if any)?
User settings loaded from: /home/x/.n8n/config
Error loading config file /usr/lib/node_modules/n8n/my-config.json TypeError: Cannot create property '0' on string ''
at Object.set (/usr/lib/node_modules/n8n/node_modules/convict/src/main.js:575:24)
at Object.<anonymous> (/usr/lib/node_modules/n8n/src/config/index.ts:58:15)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (/usr/lib/node_modules/n8n/src/security-audit/security-audit.service.ts:3:1)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Version: 1.58.2
================================
Start Active Workflows:
================================
...
Information on your n8n setup
- n8n version: update from 1.45.0 to 1.58.2
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: Ubuntu Server 20.04.6
So the question is:
- Where do we setup listen_address, port, host and webhook endpoints now?
- Should we switch to environment variables instead of config file?
Thanks in advance for any help