# Updating Authentik

This is extended guide to updating Authentik software. Read trough official Authentik documentation before running updates.

[Authentik Documentation](https://docs.goauthentik.io/install-config/upgrade/)

1. Take a snapshot of Overseer vm
2. Navigate to Authentik Directory

```bash
cd /docker/authentik
```

3. Backup Database

```bash
docker exec -t authentik_postgresql_1 pg_dumpall -c -U postgres > authentik_backup.sql
```

4. Download the latest docker-compose.yml file

```bash
wget -O docker-compose.yml https://goauthentik.io/docker-compose.yml
```

5. Ensure .env is all set and has following variables in it

```bash
touch .env
```

```yaml
PG_PASS=your_database_password
PG_USER=authentik
PG_DB=authentik
AUTHENTIK_SECRET_KEY=your_secret_key
AUTHENTIK_TAG=latest
```

6. Pull the Latest image and apply the updates

```bash
docker compose pull
docker compose up -d
```

7. Check the status

```bash
docker compose ps
```

8. Login to Authentik and make sure everything is up to date, and everything is working properly

Optional:

If there is an error due to space when downloading or installing the image run a clean up command:

```bash
docker image prune -a
```