Is it possible to have the Web UI not accessible to the public using a reverse proxy?

Hey,

i’m running n8n on ubuntu via pm2 and have it configured through a nginx reverse proxy.

The proxy handles the ssl encryption.
Is it possible to have the web hooks encrypted using the proxy but not have the Web UI accessible to the public? Currently the proxy forwards port 4433 to the intern IP on port 5678 for the web UI. Can I change it so its not visible to the public, but still have the web hooks running over port 4433 and be ssl encrypted?

Hey @Felix,

That shouldn’t be a problem but it would be controlled by your proxy. You would need to add in rules for the URIs so where you might have something like…

location / {
    proxy_pass http://localhost:5678;
}

You would instead replace that with something like:

location ~ ^/webhooks/(.*)${
    proxy_pass http://localhost:5678/webhooks/$1;
}

The above probably won’t work as is and the nginx documentation will need to be checked. But the important thing is you can do it :smiley:

1 Like