2

Good afternoon! Newbie here, I've tried to install Lemmy using Ansible (Debian stable) and I ended up having an issue with the Postgresql connectivity (localhost via socket).

The error message I have is:

thread 'main' panicked at 'Error connecting to postgresql:///lemmy?user=lemmy&host=/var/run/postgresql: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory

I have updated my /etc/postgresql/15/main/pg_hba.conf from peer to trust to md5 with no success (rebooting Postresql each time).

My config.hjson is:

database: {
 uri: "postgresql:///lemmy?user=lemmy&host=/var/run/postgresql"
 password: "{{ postgres\_password }}"
}

Any idea / suggestion? Thanks!

PS: cross-posted on the Matrix.org install support chat

you are viewing a single comment's thread
view the rest of the comments
[-] idefix@sh.itjust.works 2 points 6 months ago

After reading your comment, I went back to investigate my install. I can't remember having changed anything relevant but Lemmy started to function properly, connecting as it should the database. It's been stable since, even after reboots.

As you suggested, I am using "postgres" as the host, as the service is described in the docker-compose.yml file. The communication is then via TCP/IP and not socket.

this post was submitted on 19 Dec 2023
2 points (100.0% liked)

Lemmy Administration

686 readers
1 users here now

Anything about running your own Lemmy instance. Including how to install it, maintain and customise it.

Be sure to check out the docs: https://join-lemmy.org/docs/en/administration/administration.html

If you have any problems, describe them here and we will try to help you fixing them.

founded 4 years ago
MODERATORS