Https and ssl for n8n docker

Hello guys.
I am using n8n Docker on ubuntu linux server.
I have installed letsencrypt + duckdns. but my docker containers just open in http.
how do i can use letsencrypt for n8n so i can use it for telegram webhook ? it just only accepts https.


Information on your n8n setup

  • n8n version: latest
  • Database you’re using (default: SQLite): default
  • Running n8n with the execution process [own(default), main]:
  • **Running n8n via [Docker, npm,, desktop app]:**Docker

I did it so long time ago, but I use this nginx config:
The last two certificates had been generated by certbot so remove them and then try to run certbot via sudo certbot

Docker run command: docker run -d --restart always --name n8n2 -p -e N8N_HOST="" -e N8N_PORT=443 -e N8N_PROTOCOL="https" -e WEBHOOK_TUNNEL_URL="" -e VUE_APP_URL_BASE_API="" -v /home/simon/n8n-local-files:/files -v ~/.n8n:/home/node/.n8n n8nio/n8n

Like I mentioned I did it long time ago but LMK if does not work I’ll try to help

Hey @rhodesgod,

When you set up the docker container did you also take the traefik approach to put a reverse proxy in front of it or did you use something else?

ok let me explain :
i am using for installing jellyfin and some installs nginx and duckdns + letencrypt.
i don’t know how to edit nginx conf file.

no i didnt.i don’t know how really.i am using nginx.

  1. Make a file in /etc/nginx/pages-enabled with my config except the last lines made by let’s encrypt also change your domain
  2. Check config with sudo nginx -t
  3. Run let’s encrypt to generate certificate for the same domain as in nginx file
  4. Run Docker
  5. Check if it’s working

Hope it’s gonna work


i will try this. :+1: :+1: :+1: