Authelia
Container
An open-source authentication and authorization server providing 2-factor authentication and single sign-on (SSO) for your applications via a web portal.
Image details
Source details
Configuration
TypeContainerlinuxauthelia/authelia:latest9091:9091/tcp/etc/authelia/ : /portainer/Files/AppData/Config/AutheliaTZ=''unless-stoppedTemplate by mikestraney
Notes
Standalone Install
Select an install method, to see config/commands for deploying Authelia
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Authelia, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
More install options in our documentation, or see authelia/authelia for app-specific guidance.
Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for your applications via a web portal. It acts as a companion for reverse proxies by allowing, denying, or redirecting requests.
Documentation is available at https://www.authelia.com/.
The following is a simple diagram of the architecture:
Authelia can be installed as a standalone service from the AUR, APT, FreeBSD Ports, or using a static binary, .deb package, as a container on Docker or Kubernetes.
Deployment can be orchestrated via the Helm Chart (beta) leveraging ingress controllers and ingress configurations.
Here is what Authelia's portal looks like:
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://www.authelia.com/images/dark.png" width="400">
<source media="(prefers-color-scheme: light)" srcset="https://www.authelia.com/images/light.png" width="400">
<img src="https://www.authelia.com/images/light.png" width="400">
<source media="(prefers-color-scheme: dark)" srcset="https://www.authelia.com/images/2fa-methods-dark.png" width="400">
<source media="(prefers-color-scheme: light)" srcset="https://www.authelia.com/images/2fa-methods-light.png" width="400">
<img src="https://www.authelia.com/images/2fa-methods-light.png" width="400"> Features summary
This is a list of the key features of Authelia:- OpenID Connect 1.0 / OAuth 2.0
- Several second factor methods:
[FIDO2] [WebAuthn] with devices like a [YubiKey]. Time-based One-Time passwordwith compatible authenticator applications. Mobile Push Notificationswith [Duo](https://duo.com/).- Passwordless Authentication via WebAuthn (Passkeys)
- Password reset with identity verification using email confirmation.
- Access restriction after too many invalid authentication attempts.
- Fine-grained access control using rules which match criteria like subdomain, user, user group membership, request uri,
- Choice between one-factor and two-factor policies per-rule.
- Support of basic authentication for endpoints protected by the one-factor policy.
- Highly available using a remote database and Redis as a highly available KV store.
- Compatible with Traefik out of the box using the
- Curated configuration from LinuxServer via their
- Compatible with Caddy using the forwardauth
- Kubernetes Support:
* [ingress-nginx](https://www.authelia.com/integration/kubernetes/nginx-ingress/)
* [Traefik Kubernetes CRD](https://www.authelia.com/integration/kubernetes/traefik-ingress/#ingressroute)
* [Traefik Kubernetes Ingress](https://www.authelia.com/integration/kubernetes/traefik-ingress/#ingress)
* [Istio](https://www.authelia.com/integration/kubernetes/envoy/introduction/)
* [Envoy Gateway](https://www.authelia.com/integration/kubernetes/envoy/gateway/) Beta support for installing via Helm using our Charts.For more details take a look at the Overview.
If you want to know more about the roadmap, follow Roadmap.
OpenID Connect 1.0 / OAuth 2.0
Authelia is OpenID Certified™ to the Basic OP / Implicit OP / Hybrid OP / Form Post OP / Config OP profiles of the OpenID Connect™ protocol. While this offering is still effectively on the roadmap as a beta it's very comprehensive and well implemented already, also allowing us comprehensive certification. Read more about the OpenID Certified™ status of Authelia in the OpenID Connect 1.0 Integration Guide.<a href="https://www.authelia.com/integration/openid-connect/introduction/#openid-certified" target="_blank">
<picture>
<img src="https://www.authelia.com/images/oid-certification.jpg" width="400" title="OpenID Certified™ by Authelia to the Basic OP / Implicit OP / Hybrid OP / Form Post OP / Config OP of the OpenID Connect™ protocol">
</picture>
</a>Proxy support
Authelia works in combination with nginx, Traefik, Caddy, Skipper, Envoy, or HAProxy.
Getting Started
See the Get Started Guide or one of the curated examples below.docker compose
Thedocker compose bundles act as a starting point for anyone wanting to see Authelia in action. You will have to
customize them to your needs as they come with self-signed certificates.Local
The Local compose bundle is intended to test Authelia without worrying about configuration. It's meant to be used for scenarios where the server is not be exposed to the internet. Domains will be defined in the local hosts file and self-signed certificates will be utilized.Lite
The Lite compose bundle is intended for scenarios where the server will be exposed to the internet, domains and DNS will need to be setup accordingly and certificates will be generated through LetsEncrypt. The Lite element refers to minimal external dependencies; File based user storage, SQLite based configuration storage. In this configuration, the service will not scale well.Deployment
Now that you have tested Authelia and you want to try it out in your own infrastructure, you can learn how to deploy and use it with Deployment. This guide will show you how to deploy it on bare metal as well as on Kubernetes.Security
Authelia takes security very seriously. If you discover a vulnerability in Authelia, please see our Security Policy.For more information about security related matters, please read the documentation.
Contact Options
Several contact options exist for our community, the primary one being Matrix. These are in addition to GitHub issues for creating a new issue.Matrix
Community members are invited to join the Matrix Space which includes both the Support Room and the Contributing Room.- The core team members are identified as administrators in the Space and individual Rooms.
- All channels are linked to Discord.
Discord
Community members are invited to join the Discord Server.- The core team members are identified by the CORE TEAM role in Discord.
- The #support and #contributing channels are linked to Matrix.
Breaking changes
Since Authelia is still under active development, it is subject to breaking changes. It's recommended to pin a version tag instead of using thelatest tag and reading the release notes
before upgrading. This is where you will find information about breaking changes and what you should do to overcome
said changes.Why Open Source?
You might wonder why Authelia is open source while it adds a great deal of security and user experience to your infrastructure at zero cost. It is open source because we firmly believe that security should be available for all to benefit in the face of the battlefield which is the Internet, with near zero effort.Additionally, keeping the code open source is a way to leave it auditable by anyone who is willing to contribute. This way, you can be confident that the product remains secure and does not act maliciously.
It's important to keep in mind Authelia is not directly exposed on the Internet (your reverse proxies are) however, it's still the control plane for your internal security so take care of it!
Contribute
If you want to contribute to Authelia, please read our contribution guidelines.Authelia exists thanks to all the people who contribute so don't be shy, come chat with us on either Matrix or Discord and start contributing too.
Backers
Thank you to all our backers! 🙏 Become a backer and help us sustain our community. The money we currently receive is dedicated to fund a security audit, and potentially in the future introducing a bug bounty program to give us as many eyes as we can to detect potential vulnerabilities.Sponsorship
Companies contributing to Authelia via Open Collective will have a special mention below. Become a sponsor.License
Authelia is licensed under the Apache 2.0 license. The terms of the license are detailed in LICENSE.Serve Authelia on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying authelia.example.com to http://authelia:9091
Add this to your Caddyfile
authelia.example.com {
reverse_proxy http://authelia:9091
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs authelia - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:9091 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :9091 - Stop the other service, or pick a different host port. In
9091:9091only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:9091. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, authelia can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 9091
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /portainer/Files/AppData/Config/Authelia
Image won't pull
Test the pull directly on the host: docker pull authelia/authelia:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64, arm/v7, arm64/v8 - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Container keeps restarting
The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.
- Check the logs right after a restart, the last few lines before it died are the useful ones.
- Get the exit code with
docker inspect authelia --format '{{.State.ExitCode}}' - Still stuck? Redeploy once with the restart policy set to
noso the failure stays visible.
Required settings are blank
TZ has no default value, and authelia may crash or misbehave if left empty.
- Fill it in on the deploy screen before hitting deploy.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue on authelia/authelia
- Template not working: Open an issue on mikestraney/portainer-templates
- This website not working: Open an issue on lissy93/portainer-templates
A single container
Authelia runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.
The app image
An image is the app packed up ready to go, everything Authelia needs bundled into one download. This template pulls authelia/authelia:latest, which Docker fetches once (about 26 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. Authelia's comes from Docker Hub, published by authelia.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 4.39. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, arm64/v8, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Ports
A port is the door the app answers on. A mapping like 9091:9091 means it's reachable on port 9091 of your server, where the left number is yours to change and the right one belongs to the app. It opens:
9091:9091
Volumes
A volume is where Authelia keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/etc/authelia/from/portainer/Files/AppData/Config/Autheliaon the host
Environment variables
Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Authelia takes 1 of them, and one needs a value before it'll start properly:
TZ, needs a value
Restart policy
The restart policy here is unless-stopped, so Docker restarts Authelia after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Networking
Nothing custom is set, so Authelia sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container authelia. That's what you'll spot in the containers list and use in commands like docker logs authelia.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Open source license
Authelia is open source, released under the Apache-2.0 license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Authelia up. Add the template list to Portainer once, then deploying Authelia is a click rather than a wall of config.