I’m trying to follow the guide here https://join-lemmy.org/docs/administration/install_docker.html
I get an error when I run docker compose up -d. It happens after docker outputs ⠹ Container lemmy-postgres-1 Starting
Error response from daemon: failed to create task for container: failed to create shim task: OCI
runtime create failed: runc create failed: unable to start container process: error during container
init: error mounting "/home/user/lemmy/volumes/postgres" to rootfs at "/var/lib/postgresql/data":
change mount propagation through procfd: open o_path procfd: open /var/lib/docker/
overlay2/238f1ac3ed9eac5f9c1fdc9ee1851634765c83da087baccc4dfbf4fcc4316b32/merged/
var/lib/postgresql/data: no such file or directory: unknown
I’m not really sure what this means, and trying all of AIs suggestions didn’t fix it.
I’m kinda new to all of this, so any help would be appreciated.


This is the solution to your problem
Change your config to mount the data directory to
/var/lib/postgresqlinstead of/var/lib/postgresql/dataMy advice though, if your debugging skills are primarily comprised of asking AI for help, you’re in for a bit of a learning curve. The software is absolutely amazing (I’ve been running an instance since 2023), but weird things pop up and because this is so niche quick google searches are very limited and you gotta be willing to dive into github issues (this for example, I’ve also had to do it for pictrs to debug something a while ago).
Don’t feel discouraged though, this is probably the most rewarding thing I host (more than plex, immich, or any of the other “mainstream” things people talk about)
Editing to add, i know this is the fix because I had to reinstall lemmy from the ground up (long story) a few weeks ago and had the same issue :)
Wow, thank you so much. This solved it.
I’m honestly not that familiar with docker or lemmy, so I was just trying to follow the guide and look up issues as they arose.
I simply could not figure this out after hours of trying, so I decided to call in the cavalry. I was not disappointed.