Test URL on formm submision showing localhost:5678 instead of 192.168.1.40 (static IP for Windows mchine)

THis is my fist workflow. Raw Newbie.

I am running a local install on headless windows pc.
I have created a ssl certificate using cloudflare

I can open the workflow page from anothe rPC on my LAN. no issues

When I create a form submission trigger the test url shows localhost instead of the static ipaddress of the windows pc

hello @fritserasmus

you can set url manually.

Configure webhook URLs with reverse proxy | n8n Docs

Thank you very much for your help Barn4k

I visited the website but hav no idea where to put, save or run this command.

I installed n8n using (Node.js) on a local headless PC.
I have also created a ssl certificate using cloudflare.
I can open the workflow page from another PC on my LAN as well as from the outside world using the domain created for cloudflare SSL- no issues there.

I will appreciate some guidence very much.

Thanks

The environment variableWEBHOOK_URL does the trick.

Depending on how you start n8n:

  • Cli: WEBHOOK_URL=https://example.com n8n start
  • Docker: docker run -e WEBHOOK_URL=https://example.com n8nio/n8n
  • Docker compose:
version: '3'

services:
  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - "5678:5678"
    environment:
      - WEBHOOK_URL=https://example.com
    volumes:
      - ~/.n8n:/home/node/.n8n

Thanks Franz for your help, but I am still unsure.

I start my instance with “n8n start”. I created a .bat file for that and added the shortcut to the desktop to make it easier for me.

Based on your suggestion I edited the bat file to run the following command:

WEBHOOK_URL=http://192.168.1.40 n8n start

I then get an error: ‘WEBHOOK_URL’ is not recognized as an internal or external command,
operable program or batch file.

I am obviously doing something wrong.

Sorry for being so daft, but I just don’t know

JUst to make sure: I do not run it in docker

On Linux and Mac, you can set environment variables directly before the command.
This doesn’t work on Windows.

But since you are using a .bat file to start n8n, the easiest way is to set the variable like this:

set WEBHOOK_URL=http://192.168.1.40
n8n start

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