Error: Self hosted with proxy

Webhook not working

I have a server on which I have docker, and nginx which I use as a reverse proxy, you’ll see my configurations below.
When I create a new workflow, which starts with the reception of a webhook, I can’t get it to work! However, when I test sending with postman, I get the “message” response: “Workflow was started”, but on the interface nothing happens, it’s still waiting for a response… Worse, I can’t stop the test!

Nginx config

server {
    listen 80;
    server_name n8n.highday.fr;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name n8n.highday.fr;

    ssl_certificate /etc/letsencrypt/live/n8n.highday.fr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/n8n.highday.fr/privkey.pem;

    location / {
        proxy_pass http://localhost:5678;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Docker config

I’ve tried a lot of things for my docker configuration, I’ve set the environment variable

 N8N_HOST=highday.fr
 N8N_PROTOCOL=https
 WEBHOOK_URL=https://n8n.highday.fr/

Information on your n8n setup

  • n8n version:1.20
  • Operating system:Debian10

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 @Yanis, welcome to the community!

When I create a new workflow, which starts with the reception of a webhook, I can’t get it to work! However, when I test sending with postman, I get the “message” response: “Workflow was started”, but on the interface nothing happens, it’s still waiting for a response… Worse, I can’t stop the test!

This sounds like websocket connections (which your n8n server uses to keep the UI updated on the execution progress) aren’t proxied as they should. Your nginx config might need a little tweaking, @alex_st shared a working example here:

In particular, you would need to specify the upgrade mechanism to allow upgrading a HTTP connection to a websocket connection:

Hope this helps :slight_smile:

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