Not able to change the default n8n DB in local(Using the n8n actual code without docker)

Describe the issue/error/question

I am trying n8n in my local and I have created a node it was initially not reflecting when I ran the command “n8n start”, later it worked with "npm run start " .The issue that I am facing is I cannot find where to change the DB connection parameters. I have to connect to an already running Postgres DB(docker) .

  1. using n8n start I am able to connect to my Postgres DB with the env file I have manually added but the node that I have created is not displaying.
  2. using npm run start , the node that I have created is coming but not able to connect to my Postgres DB.
    I have to execute npm run start command
    Can anyone help me out in changing the default db parameters?

Information on your n8n setup

  • n8n version:0.185.0
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [ npm]:

Hey @AnjanaSAcroUser,

Have you tried setting the env options first? What I do locally when testing is run something like

export WEBHOOK_TUNNEL_URL=https://xxxxxxxxxx

Then I run npm run dev and that gets things running, In theory this should also work for npm run start and the database env options.

If you are making a node though assuming you are using the node starter template you could always run n8n from npm instead of from source and use that instead by putting your node into the ~/.n8n/custom/ folder after you build it.

Thanks for the reply!
Somehow it’s connecting to my local DB now. I have added some more parameters to env file and it worked.