How to make a chat public available in self-hosted n8n?

Describe the problem/error/question

I’m trying to make a chat trigger go public, but not being able to.
My n8n is self hosted in an aws ec2, and the instance is accessible through a domain, through IIS.

Testing it inside the n8n, it works ok. But when I access the Chat UI, public on my domain, it doesn’t respond anything, as in the image below. Also, no execution is registered.

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

{
“nodes”: [
{
“parameters”: {
“public”: true,
“initialMessages”: “Olá! :wave:\nEu sou o Sentinela. Em que posso te ajudar?”,
“options”: {
“allowedOrigins”: “*”,
“allowFileUploads”: true,
“inputPlaceholder”: “Como posso conversar com você?”,
“responseMode”: “responseNode”,
“showWelcomeScreen”: true,
“getStarted”: “New Conversation”,
“title”: “Chat do Sentinela :robot:
}
},
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“typeVersion”: 1.1,
“position”: [
60,
-20
],
“id”: “43783894-8d70-4fe3-8e16-29d9ecc64f64”,
“name”: “When chat message received”,
“webhookId”: “0c4aa4bf-dc3c-47ad-a153-40ec8f6df58d”
}
],
“connections”: {
“When chat message received”: {
“main”: [

]
}
},
“pinData”: {},
“meta”: {
“instanceId”: “bbb362b7a4d6347f35ff045b97a71b7301e96c863f3a314e3653479049c01ed1”
}
}

Information on your n8n setup

  • n8n version: 1.78.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm (self-hosted)
  • Operating system: Windows Server 2019

What am I missing here?
Appreciate any help given.

Gabriel

Did you activate the workflow?
It might be as simple as that :sweat_smile:

By the way, I’d recommend to update to version 1.80.5 or higher. Some important bugs were fixed.
.

:point_right: If my reply answers your question, please remember to mark it as a solution.

Yes, It is activated!
That’s why I can access the Chat UI through my URL in any PC (example: http://n8n.mydomain.com/webhook/webhook code/chat).

I’m thinking it might be some problem related to IIS (Windows Server) or in the AWS EC2 configurations, but couldn’t find it so far…

Hey @Gabriel_Yuji_Nakashi,

If possible, try updating to 1.80.5 and see what you get.

I am getting the same problem on a self-hosted n8n docker container running on my Tailscale network.

https://thomas-nuc.tailaad228.ts.net/webhook/cdb5c076-d458-4b9d-8398-f43bd25059b1/chat

n8n version: 1.81.4

If I run using the http://localhost:5678/webhook/cdb5c076-d458-4b9d-8398-f43bd25059b1/chat then everything is working fine.

@Gabriel_Yuji_Nakashi @Thomas_Yung

I would advise, in a scenario like this, once on the url itself, to open chrome/browser developer tools, and investigate the console & networking panel.

Then try perform chat actions and see if there are any crazy errors. I have seen something like this happen on self hosted where the websocket was dropping connections, and I had to custom route the socket endpoint via nginx reverse proxy, and it fixed the issue.

Hey Thomas, did you solve the issue? And if, yes, please tell how. I am running selfhosted n8n on a render.com in order to test webhook functionality and having issue to create credentials for google mail, drive node. In “redirect url” in the node exist predifined url linked to lokal:5678 and when i reset “redirect url” to server-name:443 it does not function. Any idea what to do?

@2024s

Setting these values in the docker compose should help fix any wrong URLs on the n8n UI side, if you are behind a domain.

  • N8N_EDITOR_BASE_URL=https://{domain}
  • WEBHOOK_URL=https://{domain}

It may work with IP as well. Not confident.

1 Like

Those env variables worked for me. Thanks!

1 Like