--- tags: - Documentation - Bookstack - Notes --- # Authentik # Install and Setup
*This document and video was written and produced by Brian @ Awesome Open Source. Please support his channel and ongoing efforts through Patreon: [https://www.patreon.com/bePatron?u=234177](https://www.patreon.com/bePatron?u=234177)*
## Introduction As the internet and services have become more and more the norm in our society protecting our services with authentication has become ever more important as well. This is where amazing projects like Authentik, and Authelia come in. These solutions give you the opportunity to setup a Single Sign On system for all of your services. That means you just need to have one very secure login, and you can access any of the services you use everyday. ### What You'll Need - Docker and Docker Compose Installed on a Host that you can access from the Internet - A domain or sub-domain that you own and can set an A or CNAME Record for. - NGinX Proxy Manager (or other reverse proxy of your choice) - an SMTP Email Server - About 30 minutes of your time ### Installation #### Configure and Install Authentik Let's create our folder structure. First, we want to create a parent 'docker' folder, and inside that place any / all of our application folders we may want to run on this host. In this case our application folder will be 'authentik'. `mkdir -p docker/authentik` Next, we'll move into our new folder and create our docker-compose.yml file. This file defines our application containers, and helps put them all into a private network on our host so the various parts of the overall application can communicate securely. `nano docker-compose.yml` Copy the block of yaml code from below, and paste it into the document we just opened. You can paste in the linux terminal by right clicking, and selecting paste, or by using CTRL + Shift + V.NOTE: In the above, if you used it in the past, I have adjusted it to remove (comment out) one line which said `user: root` based on errors after an upgrade to 2025.8.2. Many people had the same error, and this was determined to be the cause.
Once you've pasted in the code, save the file with CTRL + O, then press Enter to confirm, and exit the nano editor with CTRL + X. Next we need to create an environment variable file that the docker-compose.yml file will read. This file allows us to customize our variables for the container setup without having to repeatedly enter like values throughout the docker-compose file. `nano .env`Note: The period in front of the filename. In unix based systems a filename starting with a period is a hidden file, and will not be shown with commands like `ls` alone. Instead you must use the flag `-a` (all) to show everything in a folder including hidden files, like this `ls -a`.
Once open, copy the file contents below, and paste them into the .env file.