Skip to content

Latest commit

 

History

History
267 lines (204 loc) · 6.55 KB

File metadata and controls

267 lines (204 loc) · 6.55 KB

Authelia Configuration - All Issues Resolved ✅

en es ca zh-cn

Quick Status

Issue Status Details
JWT Secret Deprecation ✅ FIXED Migrated to identity_validation.reset_password.jwt_secret
SMTP Conflict ✅ FIXED Using address format only (no host/port mix)
Session Cookies ✅ FIXED Per-cookie default_redirection_url configured
Cookie Domain ✅ FIXED localhost with nginx-proxy handling
SMTP Address ✅ FIXED Address format: smtp://host:port

Files Ready to Use

authelia/configuration.yml - Modern v4.38.0+ syntax ✅ docker-compose.yml - Updated env variables (lines 1464-1530) ✅ Complete Documentation - 5 comprehensive guides


Start in 5 Minutes

1. Add to .env

SMTP_HOST=smtp.tinet.cat
SMTP_PORT=465
SMTP_USERNAME=your_email@example.com
SMTP_PASSWORD=your_password
SMTP_SENDER=Authelia <noreply@example.com>
AUTHELIA_DOMAIN=auth.localhost

2. Generate Secrets

mkdir -p ./secrets
openssl rand -base64 32 > ./secrets/authelia_jwt_secret.txt
openssl rand -base64 32 > ./secrets/authelia_session_secret.txt
chmod 600 ./secrets/*.txt

3. Start Services

docker compose up -d postgres redis authelia

4. Check Health

curl http://localhost:9091/api/health
# Expected: HTTP 200 OK

5. Access UI

Browser: http://auth.localhost:9091

Documentation Files

File Size Purpose
AUTHELIA_QUICK_START.md 8.7 KB 🚀 Start here - Step-by-step guide
AUTHELIA_FAQ.md 11 KB ❓ Answers to your 5 questions
AUTHELIA_FIXES_SUMMARY.md 9.4 KB 🔍 What was fixed & why
docs/authelia-setup.md 12 KB 📚 Complete reference
AUTHELIA_COMPLETE_SOLUTION.md 9 KB 📋 Full index & overview

Key Changes Made

Configuration File (authelia/configuration.yml)

# ✅ Modern JWT (was: jwt_secret at root)
identity_validation:
  reset_password:
    jwt:
      expiration: 15m

# ✅ Per-cookie config (was: global default_redirection_url)
session:
  cookies:
    - name: authelia_session
      domain: localhost
      default_redirection_url: https://forgejo.localhost

# ✅ SMTP address format (was: host + port keys)
notifier:
  smtp:
    address: 'smtp://smtp.tinet.cat:465'
    sender: 'Authelia <noreply@example.com>'

Docker Compose (docker-compose.yml, lines 1480-1495)

environment:
  # ✅ Modern JWT key
  - AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET_FILE=/run/secrets/authelia_jwt_secret

  # ✅ SMTP address format (not host/port)
  - AUTHELIA_NOTIFIER_SMTP_ADDRESS=smtp://${SMTP_HOST:-smtp.tinet.cat}:${SMTP_PORT:-465}
  - AUTHELIA_NOTIFIER_SMTP_USERNAME=${SMTP_USERNAME}
  - AUTHELIA_NOTIFIER_SMTP_PASSWORD=${SMTP_PASSWORD}
  - AUTHELIA_NOTIFIER_SMTP_SENDER=${SMTP_SENDER:-Authelia <noreply@example.com>}

Verification

After Starting Authelia

# 1. Container running?
docker compose ps authelia
# Expected: Up (healthy)

# 2. Health endpoint working?
curl -i http://localhost:9091/api/health
# Expected: HTTP/1.1 200 OK

# 3. No configuration errors?
docker compose logs authelia | grep -i "error\|fatal" | wc -l
# Expected: 0

# 4. Login page accessible?
curl -s http://localhost:9091 | grep -i "login\|password" | head -1
# Expected: Found "login" in HTML

Your Questions Answered

Q1: SMTP Configuration Format ✅

Use address format: smtp://host:port

Q2: Localhost Session Cookies ✅

Use localhost in config + nginx-proxy handles browser

Q3: JWT Secret Migration ✅

Use new path: identity_validation.reset_password.jwt_secret

Q4: Default Redirection URL ✅

Move to per-cookie level in cookies array

Q5: HTTP vs HTTPS ✅

Authelia runs HTTP internally, nginx-proxy handles TLS

→ See AUTHELIA_FAQ.md for detailed answers


Before/After Comparison

Before (Broken - Restart Loop)

# ❌ Old JWT key
jwt_secret: ...

# ❌ Mixing SMTP formats (causes conflict)
host: smtp.example.com
port: 465
address: 'smtp://...:465'

# ❌ Global default_redirection_url (causes error)
session:
  default_redirection_url: https://example.com
  cookies:
    - name: session

# ❌ Deprecated SMTP env vars
AUTHELIA_NOTIFIER_SMTP_HOST=...
AUTHELIA_NOTIFIER_SMTP_PORT=...

After (Fixed - Starts Successfully) ✅

# ✅ Modern JWT key path
identity_validation:
  reset_password:
    jwt:
      expiration: 15m

# ✅ SMTP address format only (no conflict)
notifier:
  smtp:
    address: 'smtp://smtp.example.com:465'

# ✅ Per-cookie config (no error)
session:
  cookies:
    - name: authelia_session
      default_redirection_url: https://example.com

# ✅ Modern SMTP env var
AUTHELIA_NOTIFIER_SMTP_ADDRESS=smtp://...

Architecture

User Browser
     ↓
nginx-proxy (Port 80/443) ← Handles HTTPS
     ↓
Authelia (Port 9091) ← Authentication
     ↓
Protected Services (n8n, ComfyUI, etc.)
     ↓
Backend Services (PostgreSQL, Redis, etc.)

What's Next

  1. Read: AUTHELIA_QUICK_START.md
  2. Setup: Create .env file
  3. Generate: Docker secrets
  4. Start: Services
  5. Test: Health endpoints
  6. Use: Protect your services

Total Time: ~15 minutes ⏱️


Support


Checklist

  • Read AUTHELIA_QUICK_START.md
  • Add SMTP variables to .env
  • Generate Docker secrets
  • Start PostgreSQL
  • Start Redis
  • Start Authelia
  • Check health endpoint
  • Access login page
  • Create test user
  • Test protected service

Status: ✅ All Issues Resolved - Ready to Deploy

Last Updated: January 5, 2025 Authelia Version: 4.38.0+ Docker Compose: 3.8+