From 46d5293964470f585618f3167a36457867b1c285 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wxcaf=C3=A9=20=28Cl=C3=A9ment=20Hertling=29?=
 <wxcafe@wxcafe.net>
Date: Thu, 12 Jul 2018 21:07:29 +0200
Subject: [PATCH] adds funkwhale user authorization for postgres

---
 docs/installation/external_dependencies.rst | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/docs/installation/external_dependencies.rst b/docs/installation/external_dependencies.rst
index 3fa43078..55ce9747 100644
--- a/docs/installation/external_dependencies.rst
+++ b/docs/installation/external_dependencies.rst
@@ -45,15 +45,25 @@ Create the project database and user:
     CREATE USER funkwhale;
     GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale;
 
-Assuming you already have :ref:`created your funkwhale user <create-funkwhale-user>`,
-you should now be able to open a postgresql shell:
-
 .. warning::
 
-    It's importing that you use utf-8 encoding for your database,
+    It's important that you use utf-8 encoding for your database,
     otherwise you'll end up with errors and crashes later on when dealing
     with music metedata that contains non-ascii chars.
 
+
+On Debian you will also need to allow the funkwhale unix user to access the database:
+
+.. code-block:: shell
+
+    cat | sudo tee -a /etc/postgresql/9.5/main/pg_hba.conf << EOF
+    local   all             funkwhale                               peer
+    EOF
+    sudo systemctl restart postgresql
+
+Assuming you already have :ref:`created your funkwhale user <create-funkwhale-user>`,
+you should now be able to open a postgresql shell:
+
 .. code-block:: shell
 
     sudo -u funkwhale -H psql
-- 
GitLab