2020-02-29 00:43:59 +00:00
|
|
|
---
|
|
|
|
layout: default
|
2021-08-02 11:55:30 +00:00
|
|
|
title: Storage Backends
|
2020-02-29 00:43:59 +00:00
|
|
|
parent: Configuration
|
2021-09-17 04:44:35 +00:00
|
|
|
nav_order: 14
|
2020-02-29 00:43:59 +00:00
|
|
|
has_children: true
|
|
|
|
---
|
|
|
|
|
2021-04-12 03:21:19 +00:00
|
|
|
**Authelia** supports multiple storage backends. The backend is used to store user preferences, 2FA device handles and
|
|
|
|
secrets, authentication logs, etc...
|
2020-02-29 00:43:59 +00:00
|
|
|
|
2021-04-12 03:21:19 +00:00
|
|
|
The available storage backends are listed in the table of contents below.
|
2021-11-25 01:56:58 +00:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
storage:
|
|
|
|
encryption_key: a_very_important_secret
|
|
|
|
local: {}
|
|
|
|
mysql: {}
|
|
|
|
postgres: {}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
### encryption_key
|
|
|
|
<div markdown="1">
|
|
|
|
type: string
|
|
|
|
{: .label .label-config .label-purple }
|
|
|
|
required: yes
|
|
|
|
{: .label .label-config .label-red }
|
|
|
|
</div>
|
|
|
|
|
2021-12-03 00:04:11 +00:00
|
|
|
The encryption key used to encrypt data in the database. We encrypt data by creating a sha256 checksum of the provided
|
|
|
|
value, and use that to encrypt the data with the AES-GCM 256bit algorithm.
|
2021-11-25 01:56:58 +00:00
|
|
|
|
2021-12-03 00:04:11 +00:00
|
|
|
The minimum length of this key is 20 characters, however we generally recommend above 64 characters.
|
|
|
|
|
|
|
|
See [securty measures](../../security/measures.md#storage-security-measures) for more information.
|
2021-11-25 01:56:58 +00:00
|
|
|
|
|
|
|
### local
|
|
|
|
See [SQLite](./sqlite.md).
|
|
|
|
|
|
|
|
### mysql
|
|
|
|
See [MySQL](./mysql.md).
|
|
|
|
|
|
|
|
### postgres
|
|
|
|
See [PostgreSQL](./postgres.md).
|