Hello. Maybe I'm closer now, not sure to be honest. My url for traefik-dashboard does work, and prompts me for login, and I can login.
Is there any way to get to the traefik console?
How can I view my acme.json file to see if it has keys in it? I assume it does since the dashboard works.
Still can't get to headscale though.
Appreciate your patience!!!!
Thanks
Here's my current traefik docker-compose.yaml:
version: "3.9"
services:
traefik:
image: "traefik:v3.0"
container_name: traefik
hostname: traefik
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --providers.docker
- --providers.docker.exposedByDefault=false
- --api
- --certificatesresolvers.myresolver.acme.email=myemail@mydomain.com
- --certificatesresolvers.myresolver.acme.storage=./acme.json
- --certificatesresolvers.myresolver.acme.tlschallenge=true
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./acme.json:/acme.json"
labels:
- "traefik.enable=true"
# Dashboard
- "traefik.http.routers.traefik.rule=Host(traefik-dashboard.mydomain.com
)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=myresolver"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.middlewares=authtraefik"
- "traefik.http.middlewares.authtraefik.basicauth.users=username:hashpassword"
# global redirect to https
- "traefik.http.routers.http-catchall.rule=hostregexp({host:.+}
)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
# middleware redirect
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
restart: unless-stopped
networks:
- proxy
whoami:
# A container that exposes an API to show its IP address
image: traefik/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(whoami.docker.localhost
)"
ports:
- 8088:80
networks:
proxy:
name: proxy
external: true
Here's my headscale docker-compase.yaml:
version: '3.9'
services:
headscale:
container_name: headscale
volumes:
- ./config:/etc/headscale/
- ./keys:/var/lib/headscale/
ports:
- 8081:8080
- 9091:9090
labels:
- "traefik.enable=true"
- "traefik.http.routers.headscale.rule=Host(headscale.mydomain.com
)"
- "traefik.http.routers.headscale.entrypoints=websecure"
- "traefik.http.routers.headscale.tls=true"
- "traefik.http.routers.headscale.tls.certresolver=myresolver"
image: headscale/headscale:0.22.2
command: headscale serve
restart: unless-stopped
headscale-ui:
image: amwpfiqvy/headscale-ui
pull_policy: always
container_name: headscale-ui
restart: unless-stopped
ports:
- 9999:80
As a side note, when I start headscale I get this error, but DERP is clearly set to disabled in my headscale/config/config.yaml file.
2024-03-18T16:19:54Z ERR Could not load DERP map from path error="Get "https://controlplane.tailscale.com/derpmap/default\": tls: failed to verify certificate: x509: certificate signed by unknown authority" func=GetDERPMap url=https://controlplane.tailscale.com/derpmap/default
2024-03-18T16:19:54Z WRN DERP map is empty, not a single DERP map datasource was loaded correctly or contained a region
In headscale/config/config.yaml:
derp:
server:
# If enabled, runs the embedded DERP server and merges it into the rest of the DERP config
# The Headscale server_url defined above MUST be using https, DERP requires TLS to be in place
enabled: false