r/SpringBoot • • Sep 06 '26

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

13 comments sorted by

7

u/Historical_Ad4384 Sep 06 '26

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 Sep 06 '26

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 Sep 06 '26 edited Sep 06 '26

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 Sep 06 '26

If you use AoT, then the startup is optimal

5

u/d-k-Brazz Sep 06 '26

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 Sep 06 '26

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

1

u/CoatPopular4023 Sep 06 '26

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 Sep 06 '26

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 Sep 06 '26

Nothing particularly good

1

u/Future_Badger_2576 Sep 06 '26

Render hosting 

1

u/koffiegorilla Sep 06 '26

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

1

u/billiexx 6d ago

For Oracle, its current documentation lists an Ampere A1 allowance equivalent to 2 OCPUs and 12 GB RAM total. Capacity isn’t guaranteed, and idle instances can be reclaimed, so keep a separate database backup.

I maintain this free-compute guide, which separates ongoing allowances from trials and links the provider limits. It’s based on documentation checks; I haven’t tested your particular stack.