Skip to content

Basic Auth

# Declaring the user list
#
# Note: all dollar signs in the hash need to be doubled for escaping.
# To create user:password pair, it's possible to use this command:
# echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
labels:
  - "traefik.http.middlewares.test-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"

REMINDERS

SUPER HELPFUL

docker - Traefik v2 and Invalid Lets Encrypt Certificate - Stack Overflow

ACME v2 Production Environment & Wildcards - API Announcements - Let's Encrypt Community Support

ANOTHER PROBLEM SOLVED

"Gateway Timeout" with docker · Issue #1254 · traefik/traefik · GitHub

How to redirect http to https with Traefik 2.0 and Docker Compose labels? - Stack Overflow

Working HTTP Server (NO TLS)

version: '3'

services:
  reverse-proxy:
    # The official v2.0 Traefik docker image
    image: traefik:v2.0
    # Enables the web UI and tells Traefik to listen to docker
    command:
        #- "--log.level=DEBUG"
        - "--api.insecure=true"
        - "--providers.docker=true"
        - "--providers.docker.exposedbydefault=false"
        - "--entrypoints.web.address=:80"
    ports:
      # The HTTP port
      - "80:80"
      # The Web UI (enabled by --api.insecure=true)
      - "8080:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - traefik-homelab
networks:
  traefik-homelab:
    external:
      name: traefik-homelab

Traefik

REMINDERS

Sample docker-compose with Traefik v2.0 and Lets Encrypt · GitHub

SUPER HELPFUL

docker - Traefik v2 and Invalid Lets Encrypt Certificate - Stack Overflow

ACME v2 Production Environment & Wildcards - API Announcements - Let's Encrypt Community Support

ANOTHER PROBLEM SOLVED

"Gateway Timeout" with docker · Issue #1254 · traefik/traefik · GitHub

How to redirect http to https with Traefik 2.0 and Docker Compose labels? - Stack Overflow