2020-02-29 07:43:59 +07:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
title: PostgreSQL
|
|
|
|
parent: Storage backends
|
|
|
|
grand_parent: Configuration
|
2020-03-27 06:43:10 +07:00
|
|
|
nav_order: 3
|
2020-02-29 07:43:59 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
# PostgreSQL
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
storage:
|
2020-04-11 11:46:07 +07:00
|
|
|
postgres:
|
|
|
|
host: 127.0.0.1
|
|
|
|
port: 5432
|
|
|
|
database: authelia
|
|
|
|
username: authelia
|
2020-04-23 08:11:32 +07:00
|
|
|
# Password can also be set using a secret: https://docs.authelia.com/configuration/secrets.html
|
2020-04-11 11:46:07 +07:00
|
|
|
password: mypassword
|
2020-04-23 08:11:32 +07:00
|
|
|
sslmode: disable
|
2020-02-29 07:43:59 +07:00
|
|
|
```
|
2020-04-23 08:11:32 +07:00
|
|
|
|
2020-12-16 07:31:39 +07:00
|
|
|
## IPv6 Addresses
|
|
|
|
|
2020-12-30 02:33:57 +07:00
|
|
|
If utilising an IPv6 literal address it must be enclosed by square brackets and quoted:
|
2020-12-16 07:31:39 +07:00
|
|
|
```yaml
|
|
|
|
host: "[fd00:1111:2222:3333::1]"
|
|
|
|
```
|
|
|
|
|
2020-04-23 08:11:32 +07:00
|
|
|
## SSL Mode
|
|
|
|
|
|
|
|
SSL mode configures how to handle SSL connections with Postgres.
|
|
|
|
Valid options are 'disable', 'require', 'verify-ca', or 'verify-full'.
|
|
|
|
See the [PostgreSQL Documentation](https://www.postgresql.org/docs/12/libpq-ssl.html)
|
2020-07-16 12:56:08 +07:00
|
|
|
or [pgx - PostgreSQL Driver and Toolkit Documentation](https://pkg.go.dev/github.com/jackc/pgx?tab=doc)
|
2020-04-23 08:11:32 +07:00
|
|
|
for more information.
|
|
|
|
|
|
|
|
## Loading a password from a secret instead of inside the configuration
|
|
|
|
|
|
|
|
Password can also be defined using a [secret](../secrets.md).
|