How to Install Authelia on Manjaro

Authelia is an open-source authentication and authorization server that provides Single Sign-On (SSO) to access multiple applications with two-factor authentication (2FA) support. In this tutorial, we will explain the installation process of Authelia on Manjaro.

Prerequisites

Before getting started, you need to make sure that you have the following prerequisites:

Step 1: Download the Authelia Docker files

First, download the Authelia Docker files from the official repository using the following command in your terminal window:

git clone https://github.com/authelia/authelia.git

This command will create a new directory named authelia in your current working directory, which contains all the necessary files to run Authelia.

Step 2: Configure Authelia

Navigate to the authelia directory and create a new configuration file by copying the default configuration file:

cd authelia
cp example/authelia.yml config.yml

This command will create a new configuration file named config.yml in the authelia directory.

Next, open the configuration file using a text editor:

nano config.yml

In this file, you can configure Authelia settings such as authentication backends, two-factor authentication options, and session settings. Once you have made the necessary changes, save and close the file.

Note that if you want to use a different configuration file name or location, you can specify it in the docker-compose.yml file in the following step.

Step 3: Start Authelia using Docker Compose

Create a new file named docker-compose.yml in the authelia directory:

nano docker-compose.yml

Paste the following code into this file:

version: '3.7'
services:
  authelia:
    container_name: authelia
    image: authelia/authelia:latest
    command: --config /config/config.yml
    restart: always
    volumes:
      - ./config.yml:/config/config.yml:ro
    ports:
      - 8080:8080
      - 8081:8081
    environment:
      - TZ=Europe/London
    networks:
      - web
networks:
  web:

This docker-compose file declares a service named authelia that uses the latest version of the Authelia image from Docker Hub. The service accepts the path to the configuration file as an argument and mounts the configuration file as a read-only volume.

To start Authelia, run the following command in your terminal window:

sudo docker-compose up -d

This command will start the Authelia service in detached mode, which means it will run in the background. You may now access Authelia by navigating to https://your-domain-name:8080

Step 4: Configure reverse proxy and SSL

Lastly, it is recommended that you set up a reverse proxy such as Nginx or Apache and SSL using Let's Encrypt. This will ensure that your users can securely access the Authelia login page.

Once you have set up a reverse proxy and SSL, configure your reverse proxy to forward requests to http://localhost:8080 for the Authelia service.

Conclusion

In this tutorial, we have explained the installation process of Authelia on Manjaro. By following these steps, you can provide secure single sign-on access to your applications with two-factor authentication support.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!