A simple bot to handle the syncing of discord roles to authentik groups.
  • TypeScript 95.7%
  • Dockerfile 4.3%
Find a file
2026-01-14 08:24:12 -06:00
.github/workflows add signing permission 2026-01-14 08:24:12 -06:00
.vscode first commit 2025-12-04 16:13:10 -06:00
src update readme & sync messages 2025-12-05 08:22:21 -06:00
.gitignore first commit 2025-12-04 16:13:10 -06:00
Dockerfile first commit 2025-12-04 16:13:10 -06:00
package.json first commit 2025-12-04 16:13:10 -06:00
README.md update readme & sync messages 2025-12-05 08:22:21 -06:00
tsconfig.json first commit 2025-12-04 16:13:10 -06:00
yarn.lock first commit 2025-12-04 16:13:10 -06:00

authentik-discord-sync

A simple bot to handle the syncing of discord roles to authentik groups. Also allows for manual syncing of users via slash commands.

Setup

Using Docker Compose

Create a docker-compose.yml file with the following content:

version: "3.8"

services:
  discord-sync:
    image: ghcr.io/saeraphinx/authentik-discord-sync:latest
    container_name: authentik-discord-sync
    restart: unless-stopped
    environment:
      - DISCORD_BOT_TOKEN: your-discord-bot-token
      - DISCORD_GUILD_ID: your-discord-guild-id
      - AUTHENTIK_URL: https://authentik.company/api/v3
      - AUTHENTIK_API_KEY: your-authentik-api-key
      - AUTHENTIK_USER_PATH: goauthentik.io/sources/discord-oa

Environment Variables

Example .env file

DISCORD_BOT_TOKEN=your-discord-bot-token
DISCORD_GUILD_ID=your-discord-guild-id
AUTHENTIK_URL=https://authentik.company/api/v3
AUTHENTIK_API_KEY=your-authentik-api-key
AUTHENTIK_USER_PATH=goauthentik.io/sources/discord-oa

Configuration Options

Variable Name (Required) Description Default
DISCORD_BOT_TOKEN Token of your Discord Bot
DISCORD_GUILD_ID ID of the Discord Server that you want to sync roles with
AUTHENTIK_URL URL of your Authentik instance
AUTHENTIK_API_KEY API key of a service account with the ability to edits users & groups
AUTHENTIK_USER_PATH Path of users that you want to automatically sync are located under goauthentik.io/sources/discord-oa