Question about .env file

Hello everyone,

I have installed n8n on Windows following the guide from the official documentation: n8n installation guide

However, after doing a clean installation, the .env file was not automatically created, so I created it manually in C:\Users\<username>\.n8n\.env.

Unfortunately, when I start n8n with the command n8n start, it seems that the file is not being read, as the webhook URL still shows as http://localhost:5678/... instead of the URL I configured in the .env file.

The content of my .env file is as follows:

WEBHOOK_URL=https://ngrok url

Previously, I was using make.com and was excited to switch to n8n, but I am finding it challenging to get it working properly. I have checked the file for extra spaces or obvious errors.

Could anyone help me resolve this issue?

Thank you in advance.

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:

Hi @TooAiArt

Are you going to develop nodes? and that is why you need to host it locally?
If not, windows is really annoying to setup hosting. Assuming you also actually want to automate things for background tasks that need to run while your machine is offline. Wouldn’t it be easier to go with n8n cloud?
Or host it on a VPS? There is a lot of guides on how to do it, but do be aware that it is an advanced option so some experience in hosting things would be good.

Of course I do not know anything on your situation, but you mention Make, so I assume you have a couple of workflows you want to transfer. And you want a robuste option that just runs in the background not dependening on your personal machine.

Thank you for your response!

Initially, I was interested in using n8n in the cloud. However, I’ve encountered issues with receiving data in webhook with Telegram bot; it works for a while but then stops functioning. That’s why I wanted to try running it locally to see if it resolves these issues.

Ultimately, my goal is to set it up on a VPS, preferably running Windows, since I’m not very experienced with other operating systems. However, if there are good tutorials available, I might consider trying to run it on Linux instead.

I appreciate your suggestions and any guidance on how to make this work!

If you use Docker things get a lot easier. But yes it is an advanced option and you can expect a bit more of a hassle if you have no experience.
Did you post on the forum about the telegram bot not working after a while? probably easiest to get that fixed on n8n Cloud :slight_smile:

1 Like

actually, installing the n8n via npm is a way MORE advanced option than use a docker

1 Like

Yep very true.

1 Like

Thank you very much, I have finally set up a VPS and using easypanel it is very easy to install n8n and so on. Now it is working fine for the moment.

If I see that it also fails I will open a topic to see if anyone else has the same problem with telegram.

2 Likes

To answer the original question asked… the .env file is not automatically read you need to first tell windows to load it before loading n8n.

I am not sure what the windows option is for this but on Linux / Unix based systems it would be source path/to/.env && n8n start

1 Like

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