How do I expose an n8n webhook over HTTPS?
Configure DNS, the reverse proxy and WEBHOOK_URL, then test the production URL.
External integrations typically require HTTPS. Port 5678 should remain listening locally behind Caddy or Nginx.
Step-by-step procedure
-
Create the DNS record
Add an A record for n8n.example.com pointing to the VPS IPv4 address.
-
Configure n8n
Set N8N_HOST, N8N_PROTOCOL=https and WEBHOOK_URL in Compose, then recreate the container.
-
Install Caddy
Make Caddy listen on ports 80 and 443 and reverse-proxy to 127.0.0.1:5678.
-
Open the firewall ports
Allow HTTP and HTTPS. Keep 5678 closed to the public network.
-
Test the production URL
Activate a Webhook node, copy the production URL, then call it with curl or the source application.