# Error: Self hosted with proxy

**URL:** <https://community.n8n.io/t/error-self-hosted-with-proxy/34496>\
**Category:** Questions\
**Tags:** deployment\
**Created:** [December 22, 2023, 3:24pm UTC](https://community.n8n.io/t/error-self-hosted-with-proxy/34496 "2023-12-22T15:24:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yanis](https://avatars.discourse-cdn.com/v4/letter/y/a8b319/32.png) [@Yanis](https://community.n8n.io/u/Yanis)\
**Post date:** [December 22, 2023, 3:24pm UTC](https://community.n8n.io/t/error-self-hosted-with-proxy/34496/1 "2023-12-22T15:24:44Z")

</div>

## 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

```auto
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

```auto
 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**

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [December 22, 2023, 3:24pm UTC](https://community.n8n.io/t/error-self-hosted-with-proxy/34496/2 "2023-12-22T15:24:45Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [December 28, 2023, 3:40pm UTC](https://community.n8n.io/t/error-self-hosted-with-proxy/34496/4 "2023-12-28T15:40:35Z")

</div>

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:

> [@I updated n8n to 1.5 im getting connection lost](http://community.n8n.io/t/i-updated-n8n-to-1-5-im-getting-connection-lost/28579/12):
>
> Hello! I stumbled upon the same issue after updating to version 1.0.5. I’ve installed n8n with npm and am using NGINX reverse proxy. Adding the following to my n8n’s sites-enabled config fixed the websocket connection issue for me: # Main location block with added Websockets support location / { proxy\_pass http://nn\_backend; proxy\_set\_header Upgrade $http\_upgrade; proxy\_set\_header Connection "upgrade"; proxy\_set\_header Host $host; proxy\_set\_hea…

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

> **[Using NGINX as a WebSocket Proxy](https://www.nginx.com/blog/websocket-nginx/)**
>
> Learn how to use NGINX as a reverse proxy and load balancer for WebSocket applications

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [March 27, 2024, 3:41pm UTC](https://community.n8n.io/t/error-self-hosted-with-proxy/34496/5 "2024-03-27T15:41:36Z")

</div>

Closed on March 27, 2024, 3:41pm UTC

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