---
title: authentik Stack
description: Authentik server stack documentation for NetGrimoire
published: true
date: 2026-04-30T02:14:28.848Z
tags: docker,swarm,authentik,netgrimoire
editor: markdown
dateCreated: 2026-04-30T02:14:28.848Z

# authentik

## Overview
The authentik stack is a Docker Swarm configuration for the Authentik server, which provides an Identity and Access Management (IAM) solution in NetGrimoire. The stack consists of three services: postgresql, redis, and authentik.

## Architecture

| Service | Image | Port | Role |
|---------|-------|-----|------|
- **Postgres**: docker.io/library/postgres:16-alpine | 5432 | Database |
- **Redis**: docker.io/library/redis:alpine | 6379 | Cache |
- **Authentik**: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2025.2} | 9080, 9443 | Server |

Exposed via: auth.netgrimoire.com

Homepage group: Management

---

## Build & Configuration
### Prerequisites
None specified.

### Volume Setup
```bash
mkdir -p /DockerVol/Authentik
chown -R user:group /DockerVol/Authentik
```

### Environment Variables
```bash
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: authentik
AUTHENTIK_POSTGRESQL__NAME: authentik
AUTHENTIK_POSTGRESQL__PASSWORD: F@lcon13
AUTHENTIK_SECRET_KEY: g8JIvopgkcpIeRUKgfT5KwHFUwGNBFobwhHMHx08wPTJTtAlmqllAwmr6u4jk+ng8O1gbV/gwZnYylMn
```

### Deploy
```bash
cd services/swarm/stack/authentik
set -a && source .env && set +a
docker stack config --compose-file authentik-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml authentik
rm resolved.yml
docker stack services authentik
```

### First Run
Run the following command to initialize the Authentik database:
```bash
authentik init
```

---

## User Guide

### Accessing authentik
| Service | URL | Purpose |
|---------|-----|---------|
- **Authentik**: https://auth.netgrimoire.com | IAM Management |

### Primary Use Cases
To use Authentik, navigate to the authentik URL and follow the in-app instructions.

### NetGrimoire Integrations
This service connects to the Postgres and Redis services for data storage and caching.

---

## Operations

### Monitoring
```bash
docker stack services authentik
docker service logs -f authentik
```

### Backups
Critical: `/DockerVol/Authentik/Postgres` contains backup data. Reconstructable: `/DockerVol/Authentik/custom-templates`.

### Restore
```bash
cd services/swarm/stack/authentik
./deploy.sh
```

---

## Common Failures
| Symptom | Cause | Fix |
|---------|-------|-----|
- Service not available | Redis not running | Check redis logs and restart the service. |
- PostgreSQL errors | Postgres configuration issues | Review and adjust Postgres environment variables. |
- Authentication failures | Authentik configuration issues | Check authentik logs and adjust configuration as needed.

---

## Changelog

| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-29 | ... | Initial documentation |

<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.>

---

## Notes
- Generated by Gremlin on 2026-04-30T02:14:28.848Z
- Source: swarm/authentik.yaml
- Review User Guide and Changelog sections