Webhook doesn't work - VPS + Plesk

Hi !
I tried to setup a new n8n install ( my first one ) on a VPS who’s run Ubuntu 22.04 with Plesk.
So first i have setup my subdomain + ssl and then install N8N using Docker. This is my settings :

After that i set a proxy rule in my domain to target the n8n container.

Finally with this setup my n8n is running and i can acces it on my subdomain.

So now my problem :
I created a simple webhook like :

But when i tried to send something nothing happened :confused: .

(The same thing in the n8n desktop app works great !)

Did i miss something in my setup ? (I don’t have error message)

Thanks.

n8n Version: 0.195.4 - sqlite

Hi @Remi, welcome to the community!

I am sorry to hear you’re having trouble.

On your screenshot it seems you’ve switched to the production URL of your webhook. Data sent to the production URL wouldn’t show up immediately on your canvas (it would be available through the execution list for past executions instead).

Could you try this using the test URL instead? This data should show up straight away when you manually execute your webhook node.

If this still fails, can you confirm which response you’re getting when sending data to the webhook URL? This response might contain a hint as to what’s wrong.

Thank you!

Yes i tried with the TEST URL and it’s the same :confused:

I have a 404 response :

  • Data
    {“code”:404,“message”:“The requested webhook "POST c25244db-5218-4d5b-9153-d63b11cf4d46" is not registered.”,“hint”:“Click the ‘Execute workflow’ button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)”}

(i also tried to delete the webhook and create another in test mode)

thanks

This message would be coming from n8n which is a good sign.

Is there a chance this is just a hickup? Can you force-reload n8n your browser, try this once again and see if you get a different response?

Ok so when i force-reload n8n, create a new webhook node i have a better response :

  • Status code 200
  • Data {“message”:“Workflow was started”}

But ! i have no output in n8n and the workflow / node seems stuck :
“stop listening” and “stop waiting for webhook call” do nothing

1 Like

Great, so that’s one step further. The UI not updating could suggest a problem with the server sent events not reaching the UI. This often comes down to a problem with the reverse proxy configuration.

Can you confirm if you’re using a reverse proxy (like nginx, caddy, Apache) and how you have it configured currently?

Yes the server use Nginx and i configured like this :

:

I don’t know about Plex unfortunately, but a frequent problem with nginx would be a missing directive. Perhaps you can make sure all of directives from the below example present, so n8n can sent Server-sent events (SSE) to the browser:

server {
    server_name <domain name>;
    (...)

    location / {
        proxy_pass http://localhost:5678;
        proxy_set_header Connection '';
        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
    }
}

This is an nignx config I’ve used successfully in the past (with my n8n instance listening on localhost port 5678).

I Tried to configure Nginx but i doesn’t work… So I finally gave up and installed successfully on fresh ubuntu server 22.04 with your docker method who works like a charm.
I will try on another server with plesk but for now i run out of time and i need to use n8n :slight_smile:

2 Likes

Had some issues here too. Running N8N using Plesk.
All our webhooks worked, but the testmode/listening for Test Events didn’t do anything.

Make sure to disable Proxy mode in nginx settings:

I run n8n in Plesk on Portainer using this stack:

version: '3.8'

volumes:
  db_storage:
  n8n_storage:

services:
  db:
    image: mariadb:10.7
    restart: always
    environment:
      - MARIADB_ROOT_PASSWORD
      - MARIADB_DATABASE
      - MARIADB_USER
      - MARIADB_PASSWORD
      - MARIADB_MYSQL_LOCALHOST_USER=true
    volumes:
      - db_storage:/var/lib/mysql
    healthcheck:
      test: "/usr/bin/mysql --user=${MARIADB_USER} --password=${MARIADB_PASSWORD} --execute 'SELECT 1;'"
      interval: 10s
      timeout: 5s
      retries: 10

  n8n:
    image: n8nio/n8n
    restart: always
    environment:
      - DB_TYPE=mariadb
      - DB_MYSQLDB_HOST=db
      - DB_MYSQLDB_DATABASE=${MARIADB_DATABASE}
      - DB_MYSQLDB_USER=${MARIADB_USER}
      - DB_MYSQLDB_PASSWORD=${MARIADB_PASSWORD}
    ports:
      - 5678:5678
    links:
      - db
    volumes:
      - n8n_storage:/home/node/.n8n
    command: n8n start --tunnel
    depends_on:
      db:
        condition: service_healthy

And of course environment variable for it.

In plesk, NGINX proxy mode already turned off.
Docker proxy port 5678 to my subdomain.

When I access via <IP_ADD>:5678 it works fine, but from the URL: “connection lost”.
All workflows can be executed normally when I use <IP_ADD>:5678.

I tried to add the directive in Plesk, but the error message is as follows:

Is there any solution for this problem?

Thank you!
Ade