Skip to content

Commit ee0f063

Browse files
authored
Merge pull request #437 from CarlSchwan/carl/authentik
feat: Add authentik as a service
2 parents eeb9c09 + 25b8f25 commit ee0f063

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ services:
6262
- phpmyadmin${DOMAIN_SUFFIX}
6363
- talk-signaling${DOMAIN_SUFFIX}
6464
- talk-recording${DOMAIN_SUFFIX}
65+
- authentik${DOMAIN_SUFFIX}
6566
extra_hosts:
6667
- host.docker.internal:host-gateway
6768

@@ -1155,6 +1156,69 @@ services:
11551156
- EX_APPS_NET=${EX_APPS_NET:-ipv4@localhost}
11561157
- EX_APPS_COUNT=${EX_APPS_COUNT:-50}
11571158

1159+
authentik-postgresql:
1160+
env_file:
1161+
- .env
1162+
environment:
1163+
POSTGRES_DB: ${PG_DB:-authentik}
1164+
POSTGRES_PASSWORD: authentik-database
1165+
POSTGRES_USER: ${PG_USER:-authentik}
1166+
healthcheck:
1167+
interval: 30s
1168+
retries: 5
1169+
start_period: 20s
1170+
test:
1171+
- CMD-SHELL
1172+
- pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}
1173+
timeout: 5s
1174+
image: docker.io/library/postgres:16-alpine
1175+
restart: unless-stopped
1176+
volumes:
1177+
- authentik-database:/var/lib/postgresql/data
1178+
authentik-worker:
1179+
command: worker
1180+
depends_on:
1181+
authentik-postgresql:
1182+
condition: service_healthy
1183+
env_file:
1184+
- .env
1185+
environment:
1186+
AUTHENTIK_POSTGRESQL__HOST: authentik-postgresql
1187+
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
1188+
AUTHENTIK_POSTGRESQL__PASSWORD: authentik-database
1189+
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
1190+
AUTHENTIK_SECRET_KEY: authentik-secret
1191+
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2025.10.2}
1192+
restart: unless-stopped
1193+
user: root
1194+
volumes:
1195+
- /var/run/docker.sock:/var/run/docker.sock
1196+
- ./authentik-media:/media
1197+
- ./authentik-certs:/certs
1198+
- ./authentik-custom-templates:/templates
1199+
1200+
authentik:
1201+
command: server
1202+
depends_on:
1203+
authentik-postgresql:
1204+
condition: service_healthy
1205+
authentik-worker:
1206+
condition: service_healthy
1207+
environment:
1208+
AUTHENTIK_POSTGRESQL__HOST: authentik-postgresql
1209+
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
1210+
AUTHENTIK_POSTGRESQL__PASSWORD: authentik-database
1211+
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
1212+
AUTHENTIK_SECRET_KEY: authentik-secret
1213+
VIRTUAL_HOST: "authentik${DOMAIN_SUFFIX}"
1214+
VIRTUAL_PORT: 9000
1215+
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2025.10.2}
1216+
ports:
1217+
- ${COMPOSE_PORT_HTTP:-9000}:9000
1218+
restart: unless-stopped
1219+
volumes:
1220+
- ./authentik-media:/media
1221+
- ./authentik-custom-templates:/templates
11581222

11591223
volumes:
11601224
data:
@@ -1178,6 +1242,8 @@ volumes:
11781242
elasticsearch_data:
11791243
clam:
11801244
mariadb_primary_data:
1245+
authentik-database:
1246+
driver: local
11811247

11821248
networks:
11831249
default:

docs/services/sso.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
- nextcloud
1111
- 09e3c268-d8bc-42f1-b7c6-74d307ef5fde
1212

13+
## Authentik
14+
15+
```
16+
docker compose up -d proxy nextcloud authentik
17+
```
18+
19+
The server will be available on [http://authentik.local:9000](http://authentik.local:9000) and you can follow [authentik documentation](https://integrations.goauthentik.io/chat-communication-collaboration/nextcloud/) to understand how to configure Nextcloud with SAML (but also OIDC and LDAP).
20+
1321
## SAML
1422

1523
```

0 commit comments

Comments
 (0)