Authentik - Single Sign-On (SSO)
Authentik is an open-source identity provider that provides single sign-on (SSO), multi-factor authentication, and user management for collabrains.eu services.
Quick Facts
- Version: Latest (via Coolify)
- URL: https://auth.collabrains.eu
- Database: PostgreSQL 16
- Purpose: Centralized authentication for all services
- Status: ✅ Running
Key Features
- 🔐 OAuth2 / OpenID Connect provider
- 📱 Multi-factor authentication (MFA)
- 👥 User management and groups
- 🔗 SAML / LDAP integration
- 📧 Email-based authentication
- 🎯 Application-specific configurations
Configuration
Service Integration
Services that use Authentik for SSO: - Paperless-NGX - Immich (optional) - Pocket ID - Others (custom configuration)
Environment Variables
Check /data/coolify/services/AUTHENTIK_ID/.env for:
- AUTHENTIK_SECRET_KEY
- AUTHENTIK_BOOTSTRAP_PASSWORD
- AUTHENTIK_BOOTSTRAP_TOKEN
- Database credentials
Common Operations
Access Admin Interface
- URL: https://auth.collabrains.eu/admin
- Default user:
akadmin - Password: Check docker logs or .env
Create New User
# Via web interface (recommended)
# 1. Go to https://auth.collabrains.eu/admin
# 2. Users → Create
# 3. Fill in username, email, password
# 4. Assign groups if needed
Add Service to SSO
- Create OAuth2/OIDC Application:
- Admin panel → Applications
- Configure provider (OAuth2 or SAML)
-
Set redirect URI
-
Get credentials:
- Client ID
- Client Secret
- Authorization URL
-
Token URL
-
Configure service to use Authentik endpoints
Troubleshooting
Users Can't Login
- Check Authentik is running:
docker ps | grep authentik - View logs:
docker logs authentik-server -f - Verify database:
docker logs postgres-AUTHENTIK_ID
SSO Not Working in Service
- Verify Authentik application configured
- Check redirect URI matches service
- Test with curl:
bash curl -X POST https://auth.collabrains.eu/application/o/token/ \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_SECRET" \ -d "grant_type=client_credentials"
Database Connection Error
- Check PostgreSQL:
docker ps | grep postgres - Test connection:
docker exec -it postgres-AUTHENTIK_ID psql -U authentik -d authentik - Restart:
docker restart authentik-server
Backup
Authentik data (users, groups, apps) is backed up daily:
# Database backup (includes all Authentik data)
docker exec postgres-AUTHENTIK_ID pg_dump -U authentik authentik > authentik-backup.sql
# Restore
docker exec -i postgres-AUTHENTIK_ID psql -U authentik authentik < authentik-backup.sql
Security Notes
- ✅ HTTPS enforced (Let's Encrypt)
- ✅ Database passwords secured
- ⚠️ Keep bootstrap token secure
- ⚠️ MFA highly recommended for admin accounts
Related Documentation
- Services Overview — All services
- Backups & Recovery — Database restoration
- Troubleshooting — Common issues