2020-02-29 00:43:59 +00:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
title: Deployment - Highly-Available
|
|
|
|
parent: Deployment
|
|
|
|
nav_order: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Highly-Available Deployment
|
2018-11-16 07:39:57 +00:00
|
|
|
|
|
|
|
**Authelia** can be deployed on bare metal or on Kubernetes with two
|
2019-11-03 12:07:02 +00:00
|
|
|
different kind of artifacts: the distributable version (binary and public_html)
|
|
|
|
or a Docker image.
|
2018-11-16 07:39:57 +00:00
|
|
|
|
|
|
|
**NOTE:** If not done already, we highly recommend you first follow the
|
|
|
|
[Getting Started] documentation.
|
|
|
|
|
|
|
|
## On Bare Metal
|
|
|
|
|
|
|
|
**Authelia** has been designed to be a proxy companion handling the
|
|
|
|
authentication and authorization requests for your entire infrastructure.
|
|
|
|
|
2019-11-03 12:07:02 +00:00
|
|
|
As **Authelia** will be key to your architecture, it requires several
|
|
|
|
components to make it highly-available. Deploying it in production means having
|
|
|
|
an LDAP server for storing the information about the users, a Redis cache to
|
2019-11-16 10:38:21 +00:00
|
|
|
store the user sessions in a distributed manner, a SQL server like MariaDB to
|
|
|
|
persist user configurations and one or more nginx reverse proxies configured to
|
|
|
|
be used with Authelia. With such a setup **Authelia** can easily be scaled to
|
|
|
|
multiple instances to evenly handle the traffic.
|
2018-11-16 07:39:57 +00:00
|
|
|
|
2020-02-01 13:17:39 +00:00
|
|
|
**NOTE**: If you don't have all those components, don't worry, there is a way to
|
2020-03-09 22:37:46 +00:00
|
|
|
deploy **Authelia** with only nginx. This is described in [Deployment - Lite](./deployment-lite.md).
|
2018-11-16 07:39:57 +00:00
|
|
|
|
|
|
|
Here are the available steps to deploy **Authelia** given
|
2019-12-24 02:14:52 +00:00
|
|
|
the configuration file is **/path/to/your/configuration.yml**. Note that you can
|
2018-11-16 07:39:57 +00:00
|
|
|
create your own configuration file from [config.template.yml] located at
|
|
|
|
the root of the repo.
|
|
|
|
|
2020-02-01 13:17:39 +00:00
|
|
|
**NOTE**: Prefer using environment variables to set secrets in production otherwise
|
|
|
|
pay attention to the permissions of the configuration file. See
|
2020-03-09 22:37:46 +00:00
|
|
|
[secrets](../configuration/secrets.md) for more information.
|
2020-02-01 13:17:39 +00:00
|
|
|
|
2019-11-03 12:07:02 +00:00
|
|
|
### Deploy with the distributable version
|
2018-11-16 07:39:57 +00:00
|
|
|
|
2019-11-03 12:07:02 +00:00
|
|
|
# Build it if not done already
|
2019-12-05 20:52:04 +00:00
|
|
|
$ authelia-scripts build
|
2019-12-24 02:14:52 +00:00
|
|
|
$ PUBLIC_DIR=./dist/public_html authelia --config /path/to/your/configuration.yml
|
2018-11-16 07:39:57 +00:00
|
|
|
|
|
|
|
### Deploy With Docker
|
|
|
|
|
2019-12-24 02:14:52 +00:00
|
|
|
$ docker run -v /path/to/your/configuration.yml:/etc/authelia/configuration.yml -e TZ=Europe/Paris authelia/authelia
|
2018-11-16 07:39:57 +00:00
|
|
|
|
|
|
|
## FAQ
|
|
|
|
|
|
|
|
### Why is this not automated?
|
|
|
|
|
|
|
|
Ansible would be a very good candidate to automate the installation of such
|
|
|
|
an infrastructure on bare metal. We would be more than happy to review any PR on that matter.
|
|
|
|
|
2019-03-02 23:25:40 +00:00
|
|
|
|
|
|
|
|
2020-03-01 05:58:26 +00:00
|
|
|
[config.template.yml]: https://github.com/authelia/authelia/blob/master/config.template.yml
|
|
|
|
[Getting Started]: ../getting-started.md
|
2019-03-02 23:25:40 +00:00
|
|
|
[Deployment for Devs]: ./deployment-dev.md
|
|
|
|
[Kubernetes]: https://kubernetes.io/
|