Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you host your DB? Do you use managed DB service?


I run it on my VPS along with the rest of my project.

If I want to set it up on a new server, I start a fresh Debian machine, do "apt install mariadb-server" and I am good to go.

I don't like managed services (like Heroku) because:

1: I cannot easily replicate the setup locally.

2: It creates vendor lock-in which will cause me trouble when the vendors service changes in a way I don't like.

3: I would not be able to put the whole setup of my project in one setup script. It is so nice to just have a single script that contains all the steps that need to be done (Like the "apt install mariadb-server") to run the project on a fresh machine.


If someone wants to know how to host a database for the first time, I have a full chapter on PostgreSQL (and one on Redis) in my new book https://deploymentfromscratch.com/. There is also a demo that sets up an independent database server (which you can treat as your own managed db).

It's easier than you think if you stick to your distributions' packages. Just need to know how to 1, do auth right 2, enable SSL 3, run with SELinux 4, set a different location (for attached storage) 5, managed backups.


Any chance you have an HN discount code? :-)


I want to do Show HN, but probably have to prepare a bigger preview for that. Grab the "ruby30" code from the Reddit announcement: https://www.reddit.com/r/ruby/comments/pg3c9c/i_posted_on_th...


Purchased. Thanks!




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: