Postgres - include instruction to create a user (#17744)

As a postgres newbie I had to look up what the line "role <user> does not exist" meant, and how to create users first
This commit is contained in:
Tim Coninx 2021-05-09 11:38:26 +02:00 committed by GitHub
parent e6cfdcd6b6
commit eade5e4617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,7 +349,13 @@ sudo apt-get install postgresql-server-dev-X.Y
pip3 install psycopg2
```
For using Unix Sockets, add the following line to your [`pg_hba.conf`](https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html):
For using Unix Sockets, first create your user from the `postgres` user account;
```bash
createuser USER_NAME
```
Where `USER_NAME` is the name of the user running the Home Assistant instance (see [securing your installation](/docs/configuration/securing/)).
Then add the following line to your [`pg_hba.conf`](https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html):
`local DB_NAME USER_NAME peer`