choose this repository to deploy traefik with authelia
Find a file
Guillaume "B.B." Van Hemmen f6414a6ae5 #0000 - Add initial project setup with configs, user db, and Docker Compose
This commit adds the foundational setup for the project, including docker-compose.yml, .env.dist, users_database.yml.dist, and Authelia configurations. It also includes the MIT license and a README with installation instructions and usage. The .gitignore file has been updated to exclude sensitive files.
2024-10-10 15:46:06 +02:00
authelia #0000 - Add initial project setup with configs, user db, and Docker Compose 2024-10-10 15:46:06 +02:00
.env.dist #0000 - Add initial project setup with configs, user db, and Docker Compose 2024-10-10 15:46:06 +02:00
.gitignore #0000 - Add initial project setup with configs, user db, and Docker Compose 2024-10-10 15:46:06 +02:00
docker-compose.yml #0000 - Add initial project setup with configs, user db, and Docker Compose 2024-10-10 15:46:06 +02:00
LICENCE #0000 - Add initial project setup with configs, user db, and Docker Compose 2024-10-10 15:46:06 +02:00
README.md #0000 - Add initial project setup with configs, user db, and Docker Compose 2024-10-10 15:46:06 +02:00

Traefik Authelia

Introduction

This project sets up a Traefik reverse proxy with support for Authelia using Docker Compose. Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices and integrating them with your existing infrastructure easy. Authelia is an open-source authentication and authorization server that provides 2FA (two-factor authentication) and SSO (single sign-on) capabilities, adding an additional layer of security to your services.

Table of Contents

Prerequisites

  • Docker: Make sure Docker is installed and running on your system.
  • Docker Compose: You also need Docker Compose to orchestrate the container setup.

Installation

  1. Clone the repository:

    git clone https://git.van-hemmen.com/GuillaumeHemmen-DockerCompose-Infra/traefik-authelia.git
    cd traefik-authelia
    
  2. Copy the environment variable template:

    cp .env.dist .env
    
  3. Customize the .env file as necessary for your environment.

  4. Copy the Authelia configuration template:

    cp ./authelia/configuration.yml.dist ./authelia/configuration.yml
    
  5. Customize the ./authelia/configuration.yml file as necessary for your environment.

  6. Copy the Authelia user database template:

    cp ./authelia/users_database.yml.dist ./authelia/users_database.yml
    
  7. Customize the ./authelia/users_database.yml file as necessary for your environment. See the official documentation for more information.

  8. Create the acme.json file and grant it the proper rights:

    touch ../acme.json && chmod 600 ../acme.json
    

Usage

  1. Start the Traefik service with Docker Compose:

    docker compose up -d
    
  2. You can now start adding your services and configure Traefik to reverse proxy to them.

Protecting Other Services

To protect other services using this instance of Traefik and Authelia, simply add the following label to their docker-compose.yml configuration:

      - 'traefik.http.routers.<serviceName>.middlewares=authelia@docker'

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.