3.5 KiB
title | description | lead | date | draft | images | menu | weight | toc | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Files | Using the YAML File Configuration Method. | Authelia can be configured via files. This section describes utilizing this method. | 2022-03-20T12:52:27+11:00 | false |
|
101200 | true |
Authelia loads configuration.yml
as the configuration if you just run it. You can override this behaviour with the
following syntax:
authelia --config config.custom.yml
Multiple Configuration Files
You can have multiple configuration files which will be merged in the order specified. If duplicate keys are specified the last one to be specified is the one that takes precedence. Example:
authelia --config configuration.yml --config config-acl.yml --config config-other.yml
authelia --config configuration.yml,config-acl.yml,config-other.yml
Authelia's configuration files use the YAML format. A template with all possible options can be found at the root of the repository here.
Important Note: You should not have configuration sections such as Access Control Rules or OpenID Connect clients configured in multiple files. If you wish to split these into their own files that is fine, but if you have two files that specify these sections and expect them to merge properly you are asking for trouble.
Container
By default, the container looks for a configuration file at /config/configuration.yml
.
Docker
This is an example of how to override the configuration files loaded in docker:
docker run -d --volume /path/to/config:/config authelia:authelia:latest authelia --config=/config/configuration.yaml --config=/config/configuration.acl.yaml
See the Docker Documentation for more information on the
docker run
command.
Docker Compose
An excerpt from a docker compose that allows you to specify multiple configuration files is as follows:
version: "3.8"
services:
authelia:
container_name: authelia
image: authelia/authelia:latest
command:
- "authelia"
- "--config=/config/configuration.yaml"
- "--config=/config/configuration.acl.yaml"
See the compose file reference for more information.
Kubernetes
An excerpt from a Kubernetes container that allows you to specify multiple configuration files is as follows:
kind: Deployment
apiVersion: apps/v1
metadata:
name: authelia
namespace: authelia
labels:
app.kubernetes.io/instance: authelia
app.kubernetes.io/name: authelia
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: authelia
app.kubernetes.io/name: authelia
template:
metadata:
labels:
app.kubernetes.io/instance: authelia
app.kubernetes.io/name: authelia
spec:
enableServiceLinks: false
containers:
- name: authelia
image: docker.io/authelia/authelia:fix-missing-head-handler
command:
- authelia
args:
- '--config=/configuration.yaml'
- '--config=/configuration.acl.yaml'
See the Kubernetes workloads documentation or the Container API docs for more information.