A bridge between Authentik and Gotify for notifications. This service receives webhook notifications from Authentik and forwards them to a Gotify server.
- Node.js (v14 or higher)
- yarn
- A running Gotify server
- An Authentik instance configured to send webhook notifications
Or, if using Docker:
- Docker
- docker-compose (optional)
yarn installCreate a .env file in the root directory with the following variables:
# Server configuration
PORT=3000You can use .env.example as a template.
Pull the production image:
docker pull docker.io/billos/panoptikauth:0.0.1Or build locally:
docker build -t billos/panoptikauth:0.0.1 .Run the application in development mode with automatic restart on file changes:
yarn devThis will start the application with tsx in watch mode, automatically restarting when changes are detected in the src directory.
Run the development environment with docker-compose:
docker-compose -f docker-compose.dev.yml upThis will:
- Build the development Docker image
- Mount your source code as a volume for hot-reloading
- Run the application with tsx in watch mode
Build the TypeScript project to JavaScript:
yarn buildThe compiled JavaScript files will be placed in the dist directory.
Run the built application:
yarn startThe bridge exposes a POST endpoint at /authentik that accepts Authentik notifications with the following JSON payload:
{
"body": "body of the notification message",
"severity": "severity level as configured in the trigger",
"user_email": "notification user's email",
"user_username": "notification user's username",
"event_user_email": "event user's email",
"event_user_username": "event user's username"
}Content-Type: text/json
In your Authentik instance:
- Go to Events → Transports
- Create a new Webhook transport
- Set the webhook URL to: `http://your-bridge-server:3000/authentik?url=https://gotify.mydomain.fr&token=xxxxx&title=Test
- Set the Content-Type to
text/json - Create notification rules that use this transport
The bridge maps Authentik severity levels to Gotify priorities:
low→ Priority 2normal/medium→ Priority 5high→ Priority 8critical→ Priority 10
A health check endpoint is available at /health for monitoring purposes.
curl http://localhost:3000/health
### Docker Production
Using docker-compose:
```bash
docker-compose up -dOr run the Docker container directly:
docker run -d \
--name panoptikauth \
-e NODE_ENV=production \
docker.io/billos/panoptikauth:0.0.1yarn dev- Run in development mode with watch modeyarn build- Compile TypeScript to JavaScriptyarn start- Run the compiled applicationyarn clean- Remove the dist directory
├── src/ # TypeScript source files
│ └── index.ts # Application entry point
├── dist/ # Compiled JavaScript files (generated)
├── .env.example # Example environment configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Project dependencies and scripts
Send a test notification:
curl -X POST http://localhost:3000/authentik?url=https://gotify.fr&token=xxxxx&title=Test \
-H "Content-Type: text/json" \
-d '{
"body": "User login failed",
"severity": "high",
"user_email": "user@example.com",
"user_username": "johndoe",
"event_user_email": "admin@example.com",
"event_user_username": "admin"
}'
├── src/ # TypeScript source files
│ └── index.ts # Application entry point
├── dist/ # Compiled JavaScript files (generated)
├── Dockerfile # Production Docker image
├── Dockerfile.dev # Development Docker image
├── docker-compose.yml # Production docker-compose configuration
├── docker-compose.dev.yml # Development docker-compose configuration
├── .dockerignore # Docker ignore file
├── tsconfig.json # TypeScript configuration
└── package.json # Project dependencies and scriptsYou can configure the application using environment variables. Add them to your docker-compose.yml file or pass them when running Docker:
environment:
- NODE_ENV=productionUpdate version in package.json when releasing