From 3709675e6da02de621819ece3a1a93cac551d556 Mon Sep 17 00:00:00 2001 From: Alexander Kreitner <180843591+Gl4dr3x@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:25:01 +0100 Subject: [PATCH] fix(compose): read Basic Auth users from an htpasswd file Coolify does not interpolate variables in labels, so the basicauth.users label reached Traefik as a literal ${...} string. Point the middleware at an htpasswd file the Coolify proxy mounts instead, and attach it to the https-0 router as well as http-0. Co-Authored-By: Claude Opus 5.5 --- docker-compose.custom.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.custom.yml b/docker-compose.custom.yml index 043b6eefb0b4..2b9b81e1527a 100644 --- a/docker-compose.custom.yml +++ b/docker-compose.custom.yml @@ -19,10 +19,14 @@ services: - redis - browserless labels: - # RSSHUB_BASIC_AUTH is set in Coolify as user:bcrypt-hash (htpasswd -nbB); a deploy is blocked while it is empty. - # Unverified: if the right password gets 401, Compose may have expanded the $ signs; enter the hash with every $ doubled. - - traefik.http.middlewares.hyprrykhpm87vx88mwnlwrkt-rsshub.basicauth.users=${RSSHUB_BASIC_AUTH:?} + # Basic Auth reads its users from an htpasswd file on the server, not from a label value: + # Coolify does not interpolate variables in labels, so a ${...} reference reaches Traefik literally. + # The file is /data/coolify/proxy/rsshub.htpasswd on the server, mounted into the Coolify proxy as /traefik. + # Create or update it with: htpasswd -nbB -C 12 + - traefik.http.middlewares.hyprrykhpm87vx88mwnlwrkt-rsshub.basicauth.usersfile=/traefik/rsshub.htpasswd + # Coolify generates an http-0 and, for an https domain, an https-0 router; both get the middleware. - traefik.http.routers.http-0-hyprrykhpm87vx88mwnlwrkt-rsshub.middlewares=hyprrykhpm87vx88mwnlwrkt-rsshub + - traefik.http.routers.https-0-hyprrykhpm87vx88mwnlwrkt-rsshub.middlewares=hyprrykhpm87vx88mwnlwrkt-rsshub real-browser: image: ghcr.io/hyoban/puppeteer-real-browser-hono