Allowing external users to use CHAT nodes without exposing the n8n login screen
Esentially - i am currently self hosting n8n and attempting to develop some workflows that can be used as a custom made agent/LLM by folks via the use of chat nodes.
I’ve seperated my UI access to n8n on a private domain, and set webhooks to use a public domain - exactly to have that security split and make sure nobody can access anything but what is absolutetly necceseary from the outside.
Webhook calls worked just fine, but the chat links once opened from outside the local network just gave dev tool errors of 403 and dropping the websockets connection.
As it turns out, that is because of my Reverse Proxy that blocks anything but mypublicdomain.si/webhook and /webhook-test.
I consulted the docs and got the information that fundamentally it is not possible to allow the use of chat nodes this way so that they are publically accesible without ALSO allowing access to the entire rest of your n8n app to the public - including the ui access and login screen, which is of course going against the fundamental cybersecurity level i wish to attain.
So my question is; Is there any way to achieve the split i am looking for? Or do i just… have to put my entire n8n on to the public web with 2FA in between / give people access to them via VPN?
Yes, you can absolutely achieve this setup! The key is configuring your reverse proxy to allow specific chat-related paths while keeping the rest of n8n private. Here’s how:
Solution: Selective Path Exposure via Reverse Proxy
The paths you need to expose publicly for chat nodes:
/webhook-test/chat/* - For chat webhook endpoints
/webhook/chat/* - For production chat endpoints
/rest/oauth2-credential/callback - If using OAuth in your chat workflows (optional)
WebSocket Support is Critical: The 403 error and dropped connections you’re seeing are because your reverse proxy isn’t handling WebSocket upgrades. Chat nodes require WebSocket for real-time communication.
n8n Environment Variables: Make sure your n8n instance has:
No Need for VPN or 2FA on Public Domain: With this setup, you’re only exposing the chat endpoints, not the UI or any admin functionality. This is secure.
Testing: When you access your chat URL from outside, it should look like: https://mypublicdomain.si/webhook/chat/your-workflow-id
Alternative: Embed Chat Widget
If you want even more control, you can embed the chat using the n8n chat widget on your own website:
You could run 2 instances as well where one is used to edit your workflows and the other is purely for chat and webhook executions. On the instance you want to expose the chat and webhooks, but not have the UI accessible, you can set this env var
N8N_DISABLE_UI=true
You could also have a look at this documentation to separate the ui and backend completely, however this involves some manual build