From e2b29d3af93f83f344641f92ed2f0be40479749b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Apr 2026 23:19:22 +0000 Subject: [PATCH] Enable Authelia template config filter configuration.yml uses Go-template substitution like `{{ env "DOMAIN" }}` for the cookie domain, authelia_url, etc. That substitution doesn't run by default; Authelia reads the braces literally, fails URL parsing with `invalid character "{" in host name`, and `domain` validation rejects the hostname for having no period. Setting X_AUTHELIA_CONFIG_FILTERS=template enables Authelia's Go-template filter so the substitution runs at config load. The env var is inherited by `docker compose run --rm authelia`, so validate-config picks it up too. https://claude.ai/code/session_013XZ1vmgk78k2PEQ5DmJhF3 --- docker-compose.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2a447ad..486619d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,8 +34,14 @@ services: - AUTHELIA_SESSION_SECRET_FILE=/secrets/SESSION_SECRET - AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE=/secrets/STORAGE_ENCRYPTION_KEY - TZ=${TZ:-UTC} - # Passed through so authelia/configuration.yml can use {{ env "DOMAIN" }} - # instead of hardcoding your domain in the config file. + # Enables Go-template substitution in configuration.yml so + # `{{ env "DOMAIN" }}` actually expands instead of being read as a + # literal string. Without this, Authelia parses the braces as part + # of the hostname and validate-config fails with `invalid character + # "{" in host name`. Inherited by `docker compose run --rm authelia`, + # so validate-config picks it up too. + - X_AUTHELIA_CONFIG_FILTERS=template + # Passed through so authelia/configuration.yml can use {{ env "DOMAIN" }}. - DOMAIN=${DOMAIN} volumes: - ./authelia:/config