summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorsiroccal <41478263+siroccal@users.noreply.github.com>2020-04-01 13:44:51 +0200
committerGitHub <noreply@github.com>2020-04-01 12:44:51 +0100
commit250f87d0dec15f33fced7d06252e27d9c258b90c (patch)
tree3584cdb709538680a5163bb7d8452b8579d085f4 /docs
parentRemove connections per replication stream metric. (#7195) (diff)
downloadsynapse-250f87d0dec15f33fced7d06252e27d9c258b90c.tar.xz
Update postgres.md (#7119)
Diffstat (limited to 'docs')
-rw-r--r--docs/postgres.md28
1 files changed, 27 insertions, 1 deletions
diff --git a/docs/postgres.md b/docs/postgres.md
index 04aa746051..70fe29cdcc 100644
--- a/docs/postgres.md
+++ b/docs/postgres.md
@@ -61,7 +61,33 @@ Note that the PostgreSQL database *must* have the correct encoding set
 
 You may need to enable password authentication so `synapse_user` can
 connect to the database. See
-<https://www.postgresql.org/docs/11/auth-pg-hba-conf.html>.
+<https://www.postgresql.org/docs/current/auth-pg-hba-conf.html>.
+
+If you get an error along the lines of `FATAL:  Ident authentication failed for
+user "synapse_user"`, you may need to use an authentication method other than
+`ident`:
+
+* If the `synapse_user` user has a password, add the password to the `database:`
+  section of `homeserver.yaml`. Then add the following to `pg_hba.conf`:
+
+  ```
+  host    synapse     synapse_user    ::1/128     md5  # or `scram-sha-256` instead of `md5` if you use that
+  ```
+
+* If the `synapse_user` user does not have a password, then a password doesn't
+  have to be added to `homeserver.yaml`. But the following does need to be added
+  to `pg_hba.conf`:
+
+  ```
+  host    synapse     synapse_user    ::1/128     trust
+  ```
+
+Note that line order matters in `pg_hba.conf`, so make sure that if you do add a
+new line, it is inserted before:
+
+```
+host    all         all             ::1/128     ident
+```
 
 ### Fixing incorrect `COLLATE` or `CTYPE`