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