Local install of n8n Telegram URL is http, cannot make it use https

There is a related closed issue on this but the resolution doesn’t work.
I have the latest install of n8n running on Windows 11.

I have created a Telegram OnMessage trigger. The URL in the webhook it is always HTTP.
I have tried all sorts of ways to make it use https but nothing works.

I run n8n using: npx n8n

the error is:
Telegram Trigger: Bad Request: bad webhook: an HTTPS URL must be provided for Webhook.

I have tried setting the WEBHOOK_TUNNEL_URL in the config file.
I have tried setting the WEBHOOK_TUNNEL_URL in the .env file.

Nothing seems to work.

any assistance would be appreciated.

thanks
… Chris

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

The version of n8n is 1.76.3
I am running it as npx n8n
There is no database involved, the automation only has a Telegram onmessage trigger
here is my entire workflow:


Use the Docker Compose setup for running n8n with Ngrok as a tunneling service. n8n is a workflow automation tool that allows you to connect different services and APIs. Ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels.

I have tried for 12 hours to set up my n8n to run locally using Docker, ngrok and nginx. But I cannot get it to work. The result is that by adding and removing containers in multiple attempts, I deleted all of my workflows and now have to rebuild them.

n8n needs to address this and make it far easier to implement - very disappointed.

so I will switch to the cloud-based version to implement my workflows.

… Chris

Chris, did you succeed?

Try this (step by step and eventually it worked, I’m working in Linux Mint, if you are in Windows, adapt your comamnds accordingly):
I used Gemini to worked it out

  1. sudo apt install mkcert

  2. mkcert -install

  3. restart n8n
    after installation you must edit n8n config file and add/modify JSON file
    {

    “protocol”: “https”,
    “port”: 8443,
    “sslCert”: “path-to/localhost.pem”,
    “sslKey”: “path-to/localhost-key.pem”
    }
    If it does’nt work, change env variable (choose your port within Telegram range)

$ export N8N_PORT=8443 (it was the last thing that I use and after this I have now https on 8443)
export N8N_PROTOCOL=https
export N8N_SSL_CERT=“path-to/localhost.pem”
export N8N_SSL_KEY=“path-to/localhost-key.pem”
restart n8n, restart browser

One of above will work or ask Gemini or another AI
BUT
It willl not work if you have’nt public IP, so figure it out, because I’m not in that place :slight_smile:

1 Like

It worked for me using port 8443, modifying it in both the certificate and the docker-compose.yml with Nginx.

I restarted everything by running “sudo nginx -t”, “sudo systemctl restart nginx”, “docker-compose down”, and “docker-compose up -d”.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.