From eade5e461760d0da4e7b6285bdbce20404375c70 Mon Sep 17 00:00:00 2001 From: Tim Coninx Date: Sun, 9 May 2021 11:38:26 +0200 Subject: [PATCH] Postgres - include instruction to create a user (#17744) As a postgres newbie I had to look up what the line "role does not exist" meant, and how to create users first --- source/_integrations/recorder.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index e9b0aea9cad..49dc1f0f059 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -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`