I’m pulling my hair out on this as I’ve been trying to set this up for a few days now and just simply had no luck.
Rough overview of my setup:
I have a VM on my self-hosted proxmox cluster.
Here is the content of a bunch of relevant files:
root@ubuntu:~/n8n# cat ~/.ngrok/ngrok.yml
version: "2"
authtoken: <MY_AUTH_TOKEN>
tunnels:
n8n:
proto: http
addr: 5678
root@ubuntu:~/n8n# cat docker-compose.yml
version: "3.7"
services:
n8n:
image: n8nio/n8n:1.78.1
ports:
- "5678:5678" # Container listens on port 5678
environment:
- N8N_HOST=${N8N_HOST}
- N8N_PORT=5678
- N8N_PROTOCOL=http
- N8N_WEBHOOK_URL=https://${N8N_HOST}
- N8N_WEBHOOK_TEST_URL=https://${N8N_HOST}
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=${N8N_USER}
- N8N_BASIC_AUTH_PASSWORD=${N8N_PASS}
volumes:
- ~/.n8n:/home/node/.n8n
restart: always
root@ubuntu:~/n8n# cat /etc/systemd/system/ngrok.service
[Unit]
Description=ngrok tunnel service
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/ngrok start --all --config <DIRECTORY>/.ngrok/ngrok.yml
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
I can get it running, and I can access the N8N instance on my ngrok url, and I have used botfather to setup a telegram bot. I’ve taken the bottoken and run this command:
curl -F "url=https://<MY_NGROK_URL>/webhook-test/9922ea8a-e869-4226-885c-644ab10eece1/webhook" https://api.telegram.org/bot<MY_BOT_TOKEN>/setWebhook.
No matter what I do, I get an error on the telegram webhook as it either requires https, which shouldn’t be a problem, as the app is on https, or that the port is wrong.
I just don’t understand what I’m doing wrong.
Any advice would be greatly appreciated!
Information on your n8n setup
n8n version: : 1.78.1
Database (default: SQLite): not configured yet
n8n EXECUTIONS_PROCESS setting (default: own, main): proxmox vm locally forwarded through ngrok
Running n8n via (Docker, npm, n8n cloud, desktop app): : running via docker
Operating system: : ubuntu server
I had the same exact problem, try Easypanel…
My setup is similar, but I use NPM instead of ngrok, and it works perfectly. It seems ngrok might be the issue.
1 Like
The same problem here under proxmox. If you use n8n cloud everything works.
I had the same issue, see this helps:
Run ngrok on it’s own container
docker run -it -e NGROK_AUTHTOKEN=<your-token> ngrok/ngrok http http://<n8n-private-address>:5678 --url=<your-ngrok-domain>.free.app
Confirm you set the WEBHOOK_URL to your ngrok domain in your .env file or docker-compose.yml
environment:
- WEBHOOK_URL=https://<your-ngrok-domain>.ngrok-free.app
If that fails then try N8N’s tunnel service, they offer a free service that can do the same as ngrok, though I was not able to get it to work.
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n \
start --tunnel
I also got it to work with Cloudflare Secure Tunnel, but that was a lot more work.
Good luck… Hope it helps!
After much messing around, I ended up opting for the recommendation of NPM. @Ruslan_Yanyshyn
Overview of the solution for anyone who stumbles on this forum post:
NPM - Nginx Proxy Manager
domain names: <my subdomain>
scheme: http
ip: local ip of n8n
port: 5678
websockets enabled: TRUE
force ssl: TRUE
http/2 support: TRUE
DNS for sub domain:
A record
n8n.XXXXX
destination: public IP of my router
docker-compose setup (.env file had user and password and for the host, just the raw domain without https etc. and no trailing slash):
version: "3.7"
services:
n8n:
image: n8nio/n8n:1.79.3
ports:
- "5678:5678"
environment:
- N8N_HOST=${N8N_HOST}
- N8N_PORT=5678
- N8N_PROTOCOL=http
- WEBHOOK_URL=https://${N8N_HOST}
- N8N_WEBHOOK_TEST_URL=https://${N8N_HOST}
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=${N8N_USER}
- N8N_BASIC_AUTH_PASSWORD=${N8N_PASS}
volumes:
- ~/.n8n:/home/node/.n8n
restart: always
I know there is a newer version of n8n, but I’m not ready to break things again just yet
telegram trigger:
used botfather, created a bot and then ran this command:
curl -F "url=COPY_PASTE_FROM_TELEGRAM_NODE_WEBHOOK" https://api.telegram.org/botMY_BOT_TOKEN/setWebhook
Think that’s pretty much it
2 Likes
system
Closed
February 28, 2025, 6:02pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.