goauthentik / goauthentik/authentik
Read replica support on initial deploy broken
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 651
Description
**Describe the bug**
When deploying Authentik with [Postgres read replica support](https://docs.goauthentik.io/docs/install-config/configuration/#read-replicas) on first deploy the database migrations fail and the instance comes up with the "Not found screen".
Deploying Authentik without read replica support to let the migrations finish and then adding read replica support by redeploying the container is a work-around. But this makes deployment via CI/CD pipeline very painful.
This has previously been reported in these issues, but has still not been fixed:
#14319 #9866 #6712 #2559
**To Reproduce**
Steps to reproduce the behavior:
1. Configure Authentik initially with read replicas enabled
2. Deploy Authentik (first deployment)
3. Wait for Authentik to fully deploy (database migrations appear to run correctly)
4. Open Authentik web site and see "Not found" error
**Expected behavior**
Authentik should fully deploy without any errors (as it does with Read Replicas disabled)
**Screenshots**

**Logs**
Nothing relevant in the logs that I can find. The migrations all appear to run without any errors.
**Version and Deployment (please complete the following information):**
- authentik version: [e.g. 2025.2.0] 2025.6.2
- Deployment: [e.g. docker-compose, helm] AWS CloudFormation with additional env variables to configure read replicas
**Additional context**
Values being set for the read replica configuration are:
AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__HOST:
AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__NAME: 'authentik'
AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__PORT: '5432'
AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__USER:
AUTHENTIK_POSTGRESQL__READ_REPLICAS__0__PASSWORD:
Contributor guide
Assessment
This issue has not been assessed yet.