DEV Community

Cover image for 5 Cheap Ways to Host Postgres
Jonas Scholz
Jonas Scholz Subscriber

Posted on

5 Cheap Ways to Host Postgres

Hetzner, Sliplane, Render, Github, DigitalOcean - Picking a hosting provider for your Postgres database can be challenging, especially with all the awesome options available. Analysis Paralysis is real 😵‍💫. Who wins the race for the cheapest postgres host?

GO!

1. Hetzner

Hetzner is a German Cloud Provider with Locations in Europe and North America, with a wide variety of compute options including ARM, dedicated, and shared servers. Hetzner is loved by developers, with 70% saying that they want to continue using them according to the latest Stackoverflow survey. Hetzner provides incredibly cheap but at the same time basic servers.

Hosting a simple Postgres database isn't actually that complicated! (If you dont need HA, autoscaling, and sharding etc.). Check out this great tutorial from Docker

2. Sliplane

What if you could combine the awesome price of Hetzner with the ease of a PaaS like Heroku, Render, or Vercel? Sliplane is a PaaS on top that gives you push-to-deploy, automatic SSL, a free domain, and more for your Docker apps. Connect your GitHub account and get started in less than 5 minutes for free with a 48 hour trial. Sliplane lets you host an unlimited number of Docker Apps on your server, making it incredibly cheap if you have a large number of low-traffic apps. For example, hosting a frontend, backend, cron jobs, and postgres will only cost you 7 Euros per month.

Postgres Start

Disclaimer: I'm the co-founder 🤫

3. Don't use Postgres!

I knooow, I know. You came for cheap postgres databases, but do you actually need one? Maybe just a simple JSON file or SQLite is enough? Don't overcomplicate your tech stack! I actually have a project running for over a few years now that just dumps data into a json file in a GitHub repository. Works like a charm!

While this doesn't work for everything, and especially not for something that needs to be 100% reliable, sometimes it's worth it to think outside the box to save some bucks 🤑

4. Supabase

Supabase is another hosting provider that is loved by developers and has grown tremendously in the last few years. At this point, Supabase provides a lot more than just Postgres. They now also have auth, object storage, functions, and can probably even make pizza. And they even have a free plan! Keep in mind that free projects are paused after 1 week of inactivity.

5. Render

Last but not least, another PaaS provider that I want to mention is Render. While Render might look expensive at first, the "Zero DevOps cloud" really makes up for it by being the simplest solution in this list while also providing a free tier for Postgres. In the end, the price that your database costs is not everything, you also need to consider the time you are putting in to keep everything running! Sometimes a $20 database is cheaper than a $5 database if you need to work 10 hours less per month, just keep that in mind :)

Conclusion

I hope you learned something new, and always keep in mind to include the price of your own sanity when checking out prices!

Also, I'd love to know where you are hosting your Docker apps. What features do you love, and which do you dislike? Let's discuss it!

Top comments (13)

Collapse
 
fridaycandours profile image
Friday candour

No #3 was a unnecessary, anyone who clicks on your post expects one thing.
you mentioned Github which is not even an option.
why is DigitalOcean crossed out in your cover image? that's a reasonably cheap option.
using aws well can be cheap as well.

Overall this post was aimed to do one thing (promote) not to cover the better cheap ways to host postgres.

Not bad i kinda like no #1

Collapse
 
code42cate profile image
Jonas Scholz

I wouldn’t consider AWS or digitalocean cheap, and I mentioned GitHub in 3. I think a lot of beginners over complicate their techstacks, sometimes a JSON file is enough! Thanks for the feedback:)

Collapse
 
seandinan profile image
Sean Dinan

I think you could probably get a database up and running on a $4/month DO droplet

Thread Thread
 
code42cate profile image
Jonas Scholz

Oh yeah absolutely, but I think hetzner does a better job if all you want is a VPS. I assumed he talked about Managed Postgres, they start at $15.

Collapse
 
tzahifadida profile image
Tzahi Fadida

Neon ?

Collapse
 
code42cate profile image
Jonas Scholz

Never tried them out tbh!

Collapse
 
ppaanngggg profile image
ppaanngggg

cool, I use Sliplane for some API deployment

Collapse
 
code42cate profile image
Jonas Scholz

Thanks:)

Collapse
 
thecodingthesi profile image
Thesi

wellll self-hosting is everything but cheap for me lol. Would take me 50 hours to just get started 😂

Collapse
 
su_subh1 profile image
Subh

I really liked the idea of sliplane.io/.
I will try this solution.
How do I reach you guys? by support@sliplane.io ??

Collapse
 
code42cate profile image
Jonas Scholz

Yes, that goes straight to me and my co-founder. jonas@sliplane.io if you want specifically me x)

Collapse
 
wimadev profile image
Lukas Mauser

Also worth to have the “what if I outgrow that” scenario in mind. Free or very cheap PaaS plans are usually pretty limited

Collapse
 
manak_91bf8023626d1a311db profile image
Manak • Edited

Great post! While these are solid options, I’ve personally found Utho to be the most affordable choice for hosting Postgres. It’s not on the list, but it’s definitely worth considering if you're looking for a budget-friendly and reliable alternative. And the best part is it also provide free trial. 😱🤑
i'll leave the site for you guys: [utho.com/]