Links

Unraid

Unraid Docker Template

Authelia / Sycotix's Repository / Security

Dependencies

  • MariaDB
  • Reverse-Proxy such as Traefik or NPM
  • File editors such as Notepad++ or Code-Server
  • Domain with the following subdomains
    • NOTE: You may change these but keep in mind you must adapt it throughout the guide. (app.example.com is simply any app you want to protect with Authelia, i.e. sonarr.example.com).
      • example.com
      • auth.example.com
      • app.example.com

Code-Server

We strongly suggest using Code-Server to help you edit your configuration files and validate everything is correctly formatted.
YAML is extremely sensitive, and Code-Server, along with the YAML plugin, can be extremely helpful to save a lot of time troubleshooting. (Trust us, we've been helping members with Authelia for over a year!)
You can follow our guide here.

Redis

Redis is an in-memory data structure store, used as a distributed, in-memory key-value database, cache, and message broker, with optional durability.
  1. 1.
    In Unraid, visit the apps tab
  2. 2.
    Search for and install 'redis'. We are using the container from A75G's Repository which uses the Bitnami Redis image.
    It has parameters mapped for a password, which we will need to add into configuration.yml later.
  1. 1.
    In the template installation screen:
    1. 2.
      Set a strong password (it will be used by Authelia later)
    2. 3.
      Add the appdata path as per the below
IMPORTANT
The default template does not have a mapping for the appdata storage. Without this, Redis will not be able to cache your data and the 'Remember Me' option in Authelia will not work.
In the template, click "Add another Path, Port, Variable, Label or Device" and add the following path:
Container Path: /bitnami/
Host Path: /mnt/user/appdata/redis/bitnami/
IMPORTANT
Change the permissions of the redis folder with the follwing command executed in the webterminal: chmod 777 /mnt/usr/appdata/redis/*

MariaDB

If you do not already have MariaDB installed, then follow the next 3 steps. If you already have MariaDB installed then skip to the next section where you will create the database for Authelia.
  1. 1.
    In Unraid, visit the apps tab
  2. 2.
    Search for and install 'mariadb'. We are using the linuxserver/mariadb container.
  1. 1.
    In the template installation screen:
    1. 2.
      Set a strong password
Once installed, follow these steps to create our user and database for Authelia.

Adminer

If you want a GUI option to create, manage and administer databases, we recommend using Adminer. You can find our guide on that here.
Follow our Adminer + MariaDB guide to use a GUI to help you manage databases in an easy way.

Command-Line

If you want to use the command-line to create the database then please do the following:
  1. 1.
    Under the Docker tab in Unraid, left-click the MariaDB container, select Console
  2. 2.
    Create our user:
    • Enter the following then hit enter:
      mysql -uroot -p
    • Enter the password you set in the container settings then type:
      CREATE USER 'authelia' IDENTIFIED by 'YOURPASSWORD';
      This password will be referenced in the Authelia configuration.yml
  3. 3.
    Create our database:
    • Enter the following then hit enter:
      CREATE DATABASE IF NOT EXISTS authelia;
  4. 4.
    Allow privileges to the database:
    • Enter the following then hit enter:
      GRANT ALL PRIVILEGES ON authelia.* TO 'authelia' IDENTIFIED BY 'YOURPASSWORD';
      This is the password you created for the user above.
    • Enter the following then hit enter:
      quit
  5. 5.
    You can now close the terminal window

Authelia

  1. 1.
    Head to the Community Applications store in Unraid
  2. 2.
    Search for and click to install Authelia from Sycotix's Repository
  3. 3.
    If you are using a custom Docker network, select it in the 'Network Type' field.
  4. 4.
    Enter the host port you want to map for the WebUI. By default it is 9091. Only change it if this port is already in use.
  5. 5.
    Click Apply and wait for the container to pull down and start.
NOTE
The container will immediately shut down due to no configuration. This is normal and you can leave it off for now.