4 months ago
Hello,
We detached our volume from the DB and if I reattach it, the DB crashes.
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/2600716d-0ea1-49db-b713-63d76f18708f/vol_rjioiqtwo15ovrtg
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-03 11:26:13.659 UTC [1] FATAL: private key file "/var/lib/postgresql/data/certs/server.key" must be owned by the database user or root
Can you please have a look?
Kind regards
3 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
4 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 4 months ago
4 months ago
Hello Brody! How can I delete the /var/lib/postgresql/data/certs/server.key so that Postgres can regenerate it during deployment? Or is there any way to download or access the volumes content?
4 months ago
hey, so you need to detach the volume, and mount into a shell container (right click service, copy ssh command), either fix the perms or remove the file and then re-attach the volume to the db service.
cd /var/lib/postgresql/data/certs
# fix owner and mode
chown postgres:postgres server.key
chmod 600 server.keyalternatively, if you just want to access the volume content, you'd have to use a template such as https://railway.com/deploy/EBwdAh to download a zip of your data.