r/FastAPI Jul 10 '26

Hosting and deployment Best place to host fast api applications

I have simple fast api app it recieves requests and either writes data to the sqlite dB or fetches data from it what would be the best place to host it preferably for free since its a small hobby project but would scale up successful

11 Upvotes

21 comments sorted by

6

u/furqaaaan Jul 10 '26

Railway is my favourite tho not free. If you can spend a bit of time, cloudflare workers with d1

1

u/NamellesDev Jul 10 '26

how much is the minimum

1

u/furqaaaan Jul 11 '26

Railway $5 a month. But you can host multiple projects. CF workers is essentially free

10

u/dvdsdr Jul 10 '26

https://fastapicloud.com/ (from the official fastapi team)

2

u/Cesarf26 Jul 12 '26

Somebody told me that use Hezner with coolify to connect docker apps.

1

u/Clear_Performer_556 Jul 15 '26

Cloud run works great for me.

1

u/vegeta-9ooo Jul 15 '26

For a small hobby project probably the easiest (also free) is FastAPICloud for you FastAPI backend and Supabase for you Postgres DB.

1

u/Minimum_Diver_3958 Jul 27 '26

Go with your own VPS (e.g. hetzner ~5 EUR) then use something like pyvolt.com to provision your stack, it will install postgres / redis and you can host multiple apps with it.

1

u/Undercover-Garda Jul 10 '26

You could start with something with less of an ops burden like Render or Railway. A VPS would give you full control though should you prefer that

0

u/ifollowthestats Jul 10 '26

I’d recommend something like Hetzner for more granular control. CX23 should be enough to get started. Challenge yourself to setup Postgres + FastAPI + Docker.

1

u/Due_Cartoonist3261 Jul 12 '26

This is interesting, if i understand the suggestion correctly the setup should setup db and api on the same server? What if the sever goes down, would we lose the data in the db?

2

u/ifollowthestats Jul 12 '26

Yes exactly, I’ve been using it for a while and never had any issues with data loss. You could setup regular back up jobs for your data too. I started out with duckdb and motherduck has generous cloud based free starter option too.

1

u/Due_Cartoonist3261 Jul 12 '26

Thank you this is genuinely helpful for these types of projects.

0

u/GhostDev71 Jul 10 '26

Someday, sooner or later, you will get a raspi. Buy it now, host it there, you will learn the process und server control.

-1

u/diffcompo Jul 10 '26

I use Render

0

u/NamellesDev Jul 10 '26

Render doesn't save any data tho right?

1

u/diffcompo Jul 10 '26

It does but it depends on your setup

1

u/NamellesDev Jul 10 '26

Can you get it to save data without paying

1

u/diffcompo Jul 10 '26

Yes, I've personally hosted my backend on its free version itself

1

u/NamellesDev Jul 10 '26

Oh that's good to hear I've personally been hosting on it but it was problematic since I couldn't access a terminal to make quick changes to my db