-
Hi, We'd like to use password to authenticate postgresql and as the document suggests:
We followed the instruction to create the .pgpass file and we can see psql can connect to the database without asking the password. However, Nominatim server returns error like this when accessing the status endpoint:
I can see the detailed error message is like: What we did are:
So I am wondering what is missing to configure the nominatim server to use the password file for database authentication? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
After updating the NOMINATIM_DATABASE_DSN you need to run Also be aware that you have to create the .pgpass file for the user who is making the connection to the database. If you are running Nominatim through a server, this would be usually 'www-data'. You might have to work with a PGPASSFILE environment variable. But we are getting now deep into the realms of system administration which goes a bit too far for this discussion forum. Side note: the API should usually not be connecting as the DB user |
Beta Was this translation helpful? Give feedback.
-
Changing the user name to |
Beta Was this translation helpful? Give feedback.
After updating the NOMINATIM_DATABASE_DSN you need to run
nominatim refresh --website
. Have you done that? If yes, inspectwebsite/status.php
to confirm that there is really the correct DSN in there.Also be aware that you have to create the .pgpass file for the user who is making the connection to the database. If you are running Nominatim through a server, this would be usually 'www-data'. You might have to work with a PGPASSFILE environment variable. But we are getting now deep into the realms of system administration which goes a bit too far for this discussion forum.
Side note: the API should usually not be connecting as the DB user
nominatim
but as the read-only website user. If you…