Hi all, i’m running traefik on my docker host machine (192.168.1.100), HA is running in a VM (192.168.1.101). I try to proxy from outside (smarthome.domain.de) to my HA instance. This is working so far, but i can’t login (even with the right credentials):
I am trying to resolve an issue with my setup, which is similar to yours. I am running traefik in a docker container on my Unraid server, and Home Assistant is running on a VM. My Traefik access log shows every attempt returns a 502 error as seen below.
From traefik, it’s showing the proper domain and IP address. The IP listed there is the correct one for the VM running HA.
I copied your http: section and pasted that into my configuration.yaml for HA. The only thing that’s different that I can think of where a problem could be occurring is with TLS certificates. Here’s my trafik.yml file
global:
checkNewVersion: true
sendAnonymousUsage: false
serversTransport:
insecureSkipVerify: true
entryPoints:
# Not used in apps, but redirect everything from HTTP to HTTPS
http:
address: :80
http:
redirections:
entryPoint:
to: https
scheme: https
# HTTPS endpoint, with domain wildcard
https:
address: :443
forwardedHeaders:
http:
tls:
# Generate a wildcard domain certificate
certResolver: letsencrypt
domains:
- main: EXAMPLE.duckdns.org
sans:
- '*.EXAMPLE.duckdns.org'
middlewares:
- securityHeaders@file
providers:
providersThrottleDuration: 2s
# File provider for connecting things that are outside of docker / defining middleware
file:
filename: /etc/traefik/fileConfig.yml
watch: true
# Docker provider for connecting all apps that are inside of the docker network
docker:
watch: true
network: aurelioserver # Add Your Docker Network Name Here
# Default host rule to containername.domain.example
defaultRule: "Host(`{{ lower (trimPrefix `/` .Name )}}.EXAMPLE.duckdns.org`)" # Replace with your domain
exposedByDefault: false
# Enable traefik ui
api:
dashboard: true
insecure: true
# Log level INFO|DEBUG|ERROR
log:
level: DEBUG
# Use letsencrypt to generate ssl serficiates
certificatesResolvers:
letsencrypt:
acme:
email: [email protected]
storage: /etc/traefik/acme.json
dnsChallenge:
provider: duckdns
# Used to make sure the dns challenge is propagated to the rights dns servers
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
#Access Log
accessLog:
filePath: "/etc/traefik/access.log"
#Prometheus
metrics:
prometheus:
addEntryPointsLabels: true
addRoutersLabels: true
addServicesLabels: true
Just a question as I’m going through a similar process and stumbled upon this topic. Don’t we need to explicitly reference the middleware within the router config to actually make use of it?