2020-02-29 07:43:59 +07:00
|
|
|
---
|
|
|
|
layout: default
|
2021-08-02 18:55:30 +07:00
|
|
|
title: Storage Backends
|
2020-02-29 07:43:59 +07:00
|
|
|
parent: Configuration
|
2021-09-17 11:44:35 +07:00
|
|
|
nav_order: 14
|
2020-02-29 07:43:59 +07:00
|
|
|
has_children: true
|
|
|
|
---
|
|
|
|
|
2021-04-12 10:21:19 +07: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 07:43:59 +07:00
|
|
|
|
2021-04-12 10:21:19 +07:00
|
|
|
The available storage backends are listed in the table of contents below.
|
2021-11-25 08:56:58 +07: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 07:04:11 +07: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 08:56:58 +07:00
|
|
|
|
2021-12-03 07:04:11 +07: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 08:56:58 +07:00
|
|
|
|
|
|
|
### local
|
|
|
|
See [SQLite](./sqlite.md).
|
|
|
|
|
|
|
|
### mysql
|
|
|
|
See [MySQL](./mysql.md).
|
|
|
|
|
|
|
|
### postgres
|
|
|
|
See [PostgreSQL](./postgres.md).
|