How To Use Traefik v2 as a Reverse Proxy for n8n and appwrite on Ubuntu

Hi there;
I install appwrite for my database and n8n for my backend server via docker-compose on my ubuntu server.
I want to these two containers use “traefik” as a proxy to use :80 and :443 port.

From here I could install traefik as a network.

My question is how can I register my appwrite and n8n (as my backend server) both of theme use traefik for https
Where I found probably such docker-compose.yml file to guide me?

1 Like

Hi @mooghermez, I think this question might be better placed in the Traefik community.

I am not a user myself, so unfortunately won’t be able to share any best practices on how to configure it :frowning:

Thank for responding;
As you know in n8n docker-compose.yml we could run traefik service and over it n8n user https protocol

version: "3"

    image: "traefik"
      - "--api=true"
      - "--api.insecure=true"
      - "--api.dashboard=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
      - "${SSL_EMAIL}"
      - ""
      - "443:443"
      - "80:80"
      - ${DATA_FOLDER}/letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

I want to know when I run traefik and make network, how can I change n8n docker-compose.yml file that it could use traefik as a proxy server.

For example according my search in traefik community I should force a container to use traefik network:

version: "3"

    external: true
    external: false

I want to know how n8n use traefik in such relationship.