Running n8n locally

Hi Team,

I am running n8n locally using pnpm. The steps I have followed mentioned below.

  1. Cloned n8n repository.
  2. pnpm install.
  3. pnpm build.
  4. pnpm dev

I think by default dB is SQLite. But I want to use my local PostgreSQL. But I am unable to identify where to add the environment variables of PostgreSQL in the code. I am using Windows machine. Please help with this issue.

Hey @RaviTeja_Karri,

Unless you are making changes to n8n I would recommend using Docker for n8n locally, That being said if you want to use Postgres you would need to set the environment variables. How you do this would depend on your OS, For Windows I think you can use the Set command before running pnpm dev or you could add them to your system config.

If you really wanted to you could also update the schema.ts and set new default options if that is easier but it comes with more potential risk. Let me know how you get on or if anything is still unclear.

I wanted to try some UI changes for my internal purpose. And I also I wanted to build some custom nodes. So I am using pnpm locally.

Hey @RaviTeja_Karri,

Sounds good, So I would go with the options above and for making nodes unless you were planning to maintain your own fork it might be easier to just use the docker image and install from the community nodes menu or installing them as custom extensions.

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