Environment variable, no-Docker

Hello.
I setup n8n on local physical machine, without docker, ubuntu server + cloudflare tunnels and domain.
I want to change for ex. webhook “localhost” to my domain.
Everything works fine, but i cant (don’t know how) change env variables.

I add it directly to ubuntu (.bashrc) doesn’t work.
i dont have .env for n8n, i dont know why, im noob :slight_smile:

Can You help me?


Zrzut ekranu 2025-07-12 o 09.49.19

you can create a json file for storing env, and make the file as env reference for n8n by export the variable
export N8N_CONFIG_FILES=/<path-to-config>/my-config.json

Source:
Endpoints environment variables | n8n Docs
Configuration methods | n8n Docs

And if you want the env vars to "stick around’ after you reboot your machine, you can add it to your ~/.bash_profile or ~/.zshrc file depending what you’re using.

my json config file:
{
“WEBHOOK_URL”=“https://my.domain.org.pl/
“N8N_PROTOCOL”=“https”
}
is correct?

Its still doesn’t works
I add N8N_CONFIG_FILES with path to ~./bashrc, after reboot its on env var.

Zrzut ekranu 2025-07-12 o 15.19.30

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