Menu

Seven things I check before running Postgres on a server I own
📰

Seven things I check before running Postgres on a server I own

DEV Community: postgres·The Saint·about 5 hours ago
#uyXUqwyo
#devtopostgresql#devto#dev#database#postgres
Reading 0:00
15s threshold

Self-hosting Postgres is not hard. Skipping one of these seven is.

I build CrescoDB, a backend you deploy to a server you already rent, so I spend a lot of time thinking about what goes wrong on self-hosted setups. The failures are almost never clever. They are the same seven things, skipped once.

1. Something that restarts it at boot

Postgres will run for weeks and then not come back after a reboot, because the service was never enabled. Enable the database and the app, then reboot the box and watch them return.

sudo systemctl enable postgresql sudo systemctl enable your-app sudo reboot

Enter fullscreen mode

Exit fullscreen mode

If you have not rebooted, you do not know. A service that is running right now has told you nothing about whether it starts on its own.

This is the habit I am trying to build into CrescoDB: a deploy is not finished when the app answers once, it is finished when the whole stack has shown it comes back after a restart.

2.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.