2022-06-15 07:51:47 +00:00
|
|
|
---
|
|
|
|
title: "Storage"
|
|
|
|
description: "Storage Configuration"
|
|
|
|
lead: "Configuring the SQL Storage."
|
2022-06-28 05:27:14 +00:00
|
|
|
date: 2022-06-15T17:51:47+10:00
|
2022-06-15 07:51:47 +00:00
|
|
|
draft: false
|
|
|
|
images: []
|
|
|
|
menu:
|
|
|
|
configuration:
|
|
|
|
parent: "storage"
|
|
|
|
weight: 106100
|
|
|
|
toc: true
|
|
|
|
aliases:
|
|
|
|
- /docs/configuration/storage/
|
|
|
|
---
|
|
|
|
|
|
|
|
__Authelia__ supports multiple storage backends. The backend is used to store user preferences, 2FA device handles and
|
|
|
|
secrets, authentication logs, etc...
|
|
|
|
|
|
|
|
The available storage backends are listed in the table of contents below.
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
storage:
|
|
|
|
encryption_key: a_very_important_secret
|
|
|
|
local: {}
|
|
|
|
mysql: {}
|
|
|
|
postgres: {}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
### encryption_key
|
|
|
|
|
|
|
|
{{< confkey type="string" required="yes" >}}
|
|
|
|
|
2022-06-21 09:45:08 +00:00
|
|
|
*__Important Note:__ This can also be defined using a [secret](../methods/secrets.md) which is __strongly recommended__
|
|
|
|
especially for containerized deployments.*
|
|
|
|
|
2022-06-15 07:51:47 +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.
|
|
|
|
|
2022-06-21 09:45:08 +00:00
|
|
|
The minimum length of this key is 20 characters.
|
2022-06-15 07:51:47 +00:00
|
|
|
|
2022-06-21 09:45:08 +00:00
|
|
|
It's __strongly recommended__ this is a
|
2022-10-23 07:09:19 +00:00
|
|
|
[Random Alphanumeric String](../../reference/guides/generating-secure-values.md#generating-a-random-alphanumeric-string) with 64 or more
|
2022-06-21 09:45:08 +00:00
|
|
|
characters.
|
2022-06-15 07:51:47 +00:00
|
|
|
|
2022-09-24 21:40:48 +00:00
|
|
|
See [security measures](../../overview/security/measures.md#storage-security-measures) for more information.
|
2022-06-15 07:51:47 +00:00
|
|
|
|
|
|
|
### postgres
|
|
|
|
|
|
|
|
See [PostgreSQL](postgres.md).
|
|
|
|
|
|
|
|
### local
|
|
|
|
|
|
|
|
See [SQLite](sqlite.md).
|
|
|
|
|
|
|
|
### mysql
|
|
|
|
|
|
|
|
See [MySQL](mysql.md).
|