Hello n8n community,
I’m encountering an issue with the “Hosted Chat” feature in a self-hosted n8n instance running on Render.
Problem Description:
Despite setting the N8N_HOST
and N8N_PROTOCOL
environment variables in Render to my public URL (https://n8n-y3ej.onrender.com
), the “Chat URL” displayed within the “When chat message received” trigger node consistently shows http://localhost:5678/...
in both “Hosted Chat” and “Embedded Chat” modes.
The internal chat functionality within the n8n workflow view works perfectly, indicating that the logic of my AI agent workflow is correctly set up. However, when I try to access the chat interface using what I believe should be the public URL for “Hosted Chat” (e.g., https://n8n-y3ej.onrender.com/chat/MY_WORKFLOW_ID
), I receive a 404 Not Found error.
I have ensured that the “Mode” in the “When chat message received” node is set to “Hosted Chat” and that the “Make Chat Publicly Available” option is enabled. I have also tried adjusting the “Allowed Origin (CORS)” setting to *
.
It appears that n8n is incorrectly generating a localhost
URL for the “Hosted Chat” interface, even though it’s running on a public Render instance with the correct host and protocol environment variables configured.
My Setup:
- n8n version: (Please include your n8n version here)
- Deployment method: Self-hosted on Render
- Environment variables set in Render:
N8N_HOST=n8n-y3ej.onrender.com
,N8N_PROTOCOL=https
- “When chat message received” node configuration: Mode is “Hosted Chat”, “Make Chat Publicly Available” is enabled.
Has anyone else experienced this issue or have any insights on how to correctly configure the “Hosted Chat” URL in a self-hosted environment like Render? Any help would be greatly appreciated.
Thank you!