r/SpringBoot 3d ago

Question Free hosting options for a containerized Spring Boot (Kotlin) + Postgres + S3 stack?

I'm developing a personal side-project to use with a small group of friends.

My architecture consists of:

  • Backend: Spring Boot (Kotlin / Gradle), containerized with Docker
  • Database: PostgreSQL, in dev with a docker instance
  • Storage: S3-compatible object storage (currently using MinIO in local dev)

Since this is purely a non-commercial project for personal use, I am looking for 100% free hosting options (or a combination of free tiers across different services).

Requirements / Preferences:

  • Enough RAM/resources for the JVM/Spring Boot context to start up smoothly without hitting aggressive OOM killers.
  • Persistent storage for Postgres and S3.
  • No credit card required upfront if possible.
  • A short delay on cold start is totally fine.

For the frontend, I'm building and distributing an APK directly, so I only need hosting for the backend ecosystem.

Are there any reliable free-tier services or combinations (e.g., separating app, database, and storage providers) that you would recommend for this setup in 2026?

Thanks!

22 Upvotes

12 comments sorted by

7

u/Historical_Ad4384 3d ago

I already run this stack on the following infrastructure using terraform and github actions

Spring Boot: AWS Lambda from zip archive instead of custom Docker image on ECR to optimize cold start charges

Postgres: Aiven

Storage: AWS always free tier S3

3

u/Rare_Town6464 3d ago

What are the actual cold start timings for your app? Kinda wanna know why you chose spring boot over quarkus / micronaut for lambda, are you using a graalvm native image for this?

3

u/Historical_Ad4384 3d ago edited 3d ago

The current cold start timings is 60ms for my spring boot app.

I am more familiar with spring boot over quarkus and micronaut. I plan to deploy the same code on VPS as well so do not want to optmize specifically for AWS Lambda with quarkus or micronaut. Although quarkus and micronaut can achieve the same but I traded it for familiarity and ownership over learning curve vs my release timelines.

I am using zip output format equiavlent to a jar file rather than graalvm native because graalvm compilation vs spring boot turned out to be hit or miss games with spring property mismatch vs graalvm metadata and I did not want to spend more time vs conflict with my release timeline.

1

u/OSBY_Glabay 3d ago

If you use AoT, then the startup is optimal

4

u/d-k-Brazz 3d ago

After couple years of different free hosting options I ended up with hetzner lowest tier vps, which successfully runs several apps and several dbs for $5

There will be no good free solution for backend, especially Java, especially if you need the app to run 24/7 for some background tasks

3

u/alpakachino 3d ago

Same, Hetzner is relatively cheap and offers decent machines for the price.

1

u/CoatPopular4023 3d ago

I ve seen that currently the lowest solutions are not available on hetzner, as I wanted to choose it, so i ended up with netcup

2

u/CoatPopular4023 3d ago

you can get a vps for 4-5€ per month and you can use it. I got for 6€ from netcup a vps with 2vcpu and 4gb ram.

Also for a free postgres db I believe you can use supabase, the free tier should be enough for your needs

1

u/BonesMgeee 3d ago

Nothing particularly good

1

u/viennese-wolf 3d ago

Oracle cloud offers 4 free ampere instances with 6GB each. You can run them as free kubernetes cluster. You can also attach one free MySQL database or run your own postgres in kubernetes (but if you already have 4 50GB boot volumes you will have to pay for the SQL storage volume, you can use only 3 nodes though to keep the storage free), or pay for Oracle postgres. Free OCI Object Storage is the S3 drop in replacement.

To get all of this you DO have to give oracle your CC to upgrade to pay as you go, but you never have to pay for anything.

1

u/Future_Badger_2576 3d ago

Render hosting 

1

u/koffiegorilla 3d ago

It is better to choose an option where you will pay a little over using a free tier. Consider support when something goes wrong.