No description
Find a file
2026-05-04 17:58:53 +01:00
.gitignore chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:50 2026-05-04 17:50:26 +01:00
authelia-api chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:50 2026-05-04 17:50:26 +01:00
authelia-api.postman_collection.json chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:50 2026-05-04 17:50:26 +01:00
authelia-api.postman_environment.json chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:50 2026-05-04 17:50:26 +01:00
example_bulk_request.json chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:50 2026-05-04 17:50:26 +01:00
install-authelia-api.sh chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:58 2026-05-04 17:58:53 +01:00
README.md chore: sync: ClausL-MacBook-Pro.local 2026-05-04 17:52 2026-05-04 17:52:54 +01:00

Authelia API

A Go-based REST API and management layer that sits alongside an Authelia LXC on Proxmox. Provides a "Source of Truth" in SQLite, handles bulk user onboarding via JSON, and automates synchronization of the Authelia users_database.yml file.

Features

  • Sovereign Bootstrap: Automatically imports existing Authelia users on first run
  • Bulk User Management: Create multiple users via JSON API with automatic password generation
  • Real-time Sync: SQLite changes automatically sync to Authelia's YAML configuration
  • SMTP Onboarding: Send welcome emails using Authelia's SMTP configuration
  • Secure API: Bearer token authentication with bcrypt hashing
  • Drop-in Deployment: Runs alongside existing Authelia installation

Installation

Download and execute the installation script:

curl -fsSL https://git.lohmar.co.uk/cclohmar/autehlia-api/raw/branch/main/install-authelia-api.sh | sudo bash

Manual Installation

  1. Download the binary:

    # Download the latest authelia-api binary
    curl -fsSL -o authelia-api https://git.lohmar.co.uk/cclohmar/autehlia-api/raw/branch/main/authelia-api
    chmod +x authelia-api
    
  2. Run the installer:

    sudo ./install-authelia-api.sh
    

Development Installation

For building from source, see the src/README.md file.

Note for local development: When installing from a cloned repository, set the environment variable to use the local binary:

AUTHELIA_API_DEVELOPMENT_MODE=true sudo ./install-authelia-api.sh

Quick Start

  1. Install using the script above
  2. Get your bearer token (from Authelia configuration):
    grep -A2 "session:" /opt/authelia/configuration.yml | grep "secret:" | awk '{print $2}'
    
  3. Test the API:
    curl -H "Authorization: Bearer YOUR_TOKEN_HERE" http://127.0.0.1:8080/api/health
    

API Testing with Postman

Postman collection and environment files are provided for API testing:

  • authelia-api.postman_collection.json - Complete API collection
  • authelia-api.postman_environment.json - Environment variables
  • POSTMAN_GUIDE.md - Setup and usage guide

See POSTMAN_GUIDE.md for detailed instructions.

Files in This Repository

  • authelia-api - Ready-to-use binary (production)
  • install-authelia-api.sh - Installation script
  • POSTMAN_GUIDE.md - API testing guide
  • src/ - Source code and build instructions
  • authelia-api.postman_collection.json - Postman collection
  • authelia-api.postman_environment.json - Postman environment

Production Deployment

The repository provides a ready-to-deploy binary. The installation script handles:

  • Systemd service creation
  • Database setup
  • Configuration generation
  • User creation
  • Firewall configuration (if applicable)

License

MIT License