Hello,
I have been trying to change the default database from mysqlite to postgres, but it looks like I’m failing.
What i did was that I created a new .env file on the root level of n8n folder,
i added these to the file, the webhook url actually took effect, but everything related to the db did not change. it’s still using the sqlite.
N8N_HOST=xxxx
VUE_APP_URL_BASE_API=xxxx
N8N_EDITOR_BASE_URL=xxxx
WEBHOOK_URL=xxxx
DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE=n8n-db
DB_POSTGRESDB_HOST=xxxx.us-east-1.rds.amazonaws.com
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_USER=postgres
DB_POSTGRESDB_PASSWORD=xxxx
What did i do wrong?
I’m using the latest n8n version
Running it using npm run dev locally
n8n
January 24, 2025, 3:01pm
2
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:
cnibeck
February 28, 2025, 2:39am
3
Did you figure this out? I am having the same problem… Of course everyone else has their databases as they want them. I want mine to work too.
For development mode, you need to:
Place .env file in the n8n project root
Run npm run build
before starting
Start with explicit database parameter: DB_TYPE=postgresdb npm run dev
If that doesn’t work, try loading the variables directly: node -r dotenv/config packages/cli/bin/dev
system
Closed
May 29, 2025, 7:43am
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.