N8n ignores Postgres in config file, new install

Describe the problem/error/question

n8n ignores Postgres configuration in config file, new install

What is the error message (if any)?

Log files never mention connecting to Postgres will allows create an SQLite file and mention migration in the logs. I have tried putting the database configuration in 1. config 2. env variables 3. ecosystem. Can not get any errors in any logs… here is ecosystem.config.js
module.exports = {
apps: [{
name: ‘n8n’,
script: ‘/usr/lib/node_modules/n8n/bin/n8n’,
args: ‘start’,
env: {
N8N_HOST: ‘',
N8N_PROTOCOL: ‘https’,
N8N_PORT: 5678,
N8N_LOG_LEVEL: ‘verbose’,
DB_TYPE: ‘postgres’,
DB_POSTGRESDB_DATABASE: 'n8n_db
’,
DB_POSTGRESDB_HOST: ‘localhost’,
DB_POSTGRESDB_PORT: 5432,
DB_POSTGRESDB_USER: ‘n8n’,
DB_POSTGRESDB_PASSWORD: '
**’,
DB_POSTGRESDB_SCHEMA: ‘public’,
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: true
}
}]
};

log… not connecting to database. It is not running so harder to collect versions… Thanks for your help in advance!

Chris

Information on your n8n setup

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

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

There’s a typo in your configuration - I notice you’re using DB_TYPE: ‘postgres’ but according to the documentation, it should be DB_TYPE: ‘postgresdb’.

If this helps, please mark as solved!

Yes you were correct… thanks. Both Grok and ChatGPT insisted that is was straight postgres… Thanks again! Chris

1 Like

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