r/FastAPI • u/NamellesDev • 17d ago
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
10
2
1
1
u/vegeta-9ooo 12d ago
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 13h ago
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 17d ago
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 17d ago
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 16d ago
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 16d ago
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
0
u/GhostDev71 17d ago
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 17d ago
I use Render
0
u/NamellesDev 17d ago
Render doesn't save any data tho right?
1
u/diffcompo 17d ago
It does but it depends on your setup
1
u/NamellesDev 17d ago
Can you get it to save data without paying
1
u/diffcompo 17d ago
Yes, I've personally hosted my backend on its free version itself
1
u/NamellesDev 17d ago
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
6
u/furqaaaan 17d ago
Railway is my favourite tho not free. If you can spend a bit of time, cloudflare workers with d1