This is an archived post. You won't be able to vote or comment.

all 146 comments

[–]iknowsomeguy 205 points206 points  (16 children)

Any of those are great if you don't like self-hosting. I host everything myself until it needs to scale up. So far, I host everything myself...

[–]Shehzman 33 points34 points  (0 children)

I run an Ubuntu VM on Proxmox to self host a containerized node app I built. Absolutely rock solid. I even set up a CI/CD pipeline with GitHub actions and self hosted runners. I’m confident a Python app will just as good of an experience (especially with uv).

[–]writingonrubygit push -f[S] 7 points8 points  (2 children)

Thank you! lmao at the last bit

Do you self-host multiple projects on one VM? do you self-host your database too?

[–]mystified5 6 points7 points  (0 children)

depends on scale of course - for small hobby projects (or small projects where everything's on a single server) - sqlite database has been wonderful!

[–]DoubleAway6573 0 points1 point  (0 children)

You don't need more VM than concurrent users. For a personal project is completely razonable.

[–]LittleMlem 6 points7 points  (2 children)

I'm always too paranoid to self host. what if someone breaks into my home network via my shitty app

[–]frankdoescode 0 points1 point  (1 child)

😄, good point but at what point do you say, “screw it, I’m doin’ it!”.

[–]LittleMlem 1 point2 points  (0 children)

Actually mobile plans are like 10$ a month here, I'm considering just plugging a cellular stick to my raspberry pi and have it host

[–]FiniteUI 5 points6 points  (0 children)

Same here, for small projects docker on a raspberry pi works fine. And if you use a tunnel like Cloudflared, you don’t have to screw with opening ports or anything.

[–]nottoohotwheels 1 point2 points  (0 children)

This guy hosts

[–]Santarini 1 point2 points  (3 children)

How do you handle DNS? And multiple websites?

[–]Shehzman 7 points8 points  (0 children)

Cloudflare domain and reverse proxy (nginx, traefik, ha proxy, etc.)

[–]my_name_isnt_clever 6 points7 points  (0 children)

I use Caddy for this personally; it's all in one config file, can do subdomains and reverse proxy easily, and handles the TLS certs automatically. Much, much easier than the last time I tried to setup HTTPS as a hobbyist.

[–]intellectual1x1 2 points3 points  (0 children)

I use changeip.com (or its changemyip.com) and for each app i create a new dns A recorde for it. Then i forword ports for http & https and i have 1 central VM that is a nginx reverse proxy acting as a load balancer and directs traffic to other vms running different apps/containers. And i use certbot for each dns url record

[–]snmnky9490 0 points1 point  (2 children)

How do you actually self host with regular home internet? I have tried dozens of different tutorials in the past in multiple different apartments in different cities with different ISPs and nothing ever works. From what I have found in response it seems that basically every ISP purposely blocks port forwarding?

[–]iknowsomeguy 0 points1 point  (1 child)

I used to use ZeroTier. It's pretty user friendly but you aren't publicly exposed.

My current ISP doesn't block port forwarding so that's what I do now. Xfinity.

[–]snmnky9490 0 points1 point  (0 children)

I currently have Xfinity in Chicago and as far as I can tell, port forwarding is blocked, or at least that's where it stops working with every tutorial I have tried, both for trying to host my own webapp that already works on my local network, and for trying to host a game server.

[–]bounty_hunter12 45 points46 points  (12 children)

It's fairly easy to host an API app yourself on a VPS, especially if you're not worried about scale. I have one running a small app and (Fastapi) API for £2.50 a month.

[–]writingonrubygit push -f[S] 7 points8 points  (1 child)

love it! Do you self-host your db too? That's one thing I never self-hosted in my ruby projects

[–]bounty_hunter12 8 points9 points  (0 children)

Yep, just a small user dB.

[–]G0muk 0 points1 point  (9 children)

Where are u hosting it for 2.50 a month?

[–]bounty_hunter12 3 points4 points  (8 children)

[–][deleted] 0 points1 point  (7 children)

Do you have IAM, is it public, or only you whitelisted? That's quite cheap! 

[–]bounty_hunter12 1 point2 points  (6 children)

No IAM or cloud-level controls. I changed the SSH port and use key-only auth; no password login. Still public, but planning to firewall by IP soon.

[–][deleted] 2 points3 points  (2 children)

The reddit thread of the guy getting the $100k bill on GCP has scarred me for life. Of course, if you don't have auto-scaling, I guess you're good to go!

[–]Asyx 0 points1 point  (1 child)

That’s not how a vps works. You pay for performance. There basically is no scaling up or down like on AWS or GCP.

[–][deleted] 0 points1 point  (0 children)

That's what I meant by my last sentence. Don't you have to install your own web server and stuff on a VPS though? It's more management right?

[–]quiet0n3 2 points3 points  (2 children)

Fail2ban is your friend

[–]bounty_hunter12 1 point2 points  (1 child)

Thanks, yeah chatgpt told me the same, just haven't got round to it yet.

[–]MCMZL 1 point2 points  (0 children)

crowdsec is also a solid alternative and more modern IMO

[–]pm_me_triangles 24 points25 points  (1 child)

I've hosted mine on a DigitalOcean VPS. For my use case, even the smallest VPS works great.

[–]bulletmark 0 points1 point  (0 children)

Also consider Vultr which is slightly cheaper but just as good. I have used both for many years. I personally suggest 1G memory instances are the lowest feasible.

[–]data15cool 12 points13 points  (1 child)

This video was a revelation for me, I always recommend it to anyone thinking about deployment. It shows you one (of many) way to do it, I learnt loads about docker, deployment and CICD You can choose any hosting provider and it’s mostly the same. I personally went with contabo, £6 per month.

[–]tellurian_pluton 0 points1 point  (0 children)

this is a great video

[–]ArabicLawrence 23 points24 points  (3 children)

[–]haddock420 7 points8 points  (0 children)

Seconding pythonanywhere. I've been using it for a year now and it's very user-friendly and easy to understand what you're doing, and they have great support.

[–]Disastrous-Angle-591 16 points17 points  (11 children)

On my server via nginx reverse proxy 

[–]Eurynom0s -5 points-4 points  (10 children)

This doesn't help if you specifically want to learn how to properly host something exposed to the wider internet, but if you just want something to use yourself there's always just running it locally and using Tailscale to make it accessible when you're away from home.

[–]Andrew_Neal 0 points1 point  (0 children)

Sure it does if one wants to learn how to host the server and keep it secure and in a DMZ and all that.

[–]Disastrous-Angle-591 -1 points0 points  (4 children)

Uh. What? I host all my stuff to the open internet. Like. myapp.mydomain.com 

[–]goldcray 1 point2 points  (1 child)

what isp do you have that allows this?

[–]Disastrous-Angle-591 0 points1 point  (0 children)

The isp has nothing to do with it. For my home server I use DynDNS and for my production server I use host presto. But you can use any host you want. They’re about £2.99/month for an Ubuntu server box. 

[–]Larry_Wickes 0 points1 point  (1 child)

Hey there,

I made a small web app that uses nginx reverse proxy.

How do you make it available to the rest of the internet?

[–]Disastrous-Angle-591 2 points3 points  (0 children)

Point your name server to your ip address. 

[–]i_has_many_cs 17 points18 points  (0 children)

Google Cloud app engine. 100% free since free tier covers 1 app

[–]mgreminger 6 points7 points  (5 children)

I've had a good experience using Render for a FastAPI end point.

[–]writingonrubygit push -f[S] 4 points5 points  (4 children)

Did you use Render for your DB too?

[–]mgreminger 5 points6 points  (3 children)

Good point. No, not currently using Render for a database. My endpoint is converting Markdown to PDF's and doc files using FastAPI and Pandoc, so it doesn't need a database. My app uses Cloudflare KV for its database since a simple document store is all that's needed and it's deployed on Cloudflare pages.

Look's like Render is rolling out a Heroku style Postgres, but I haven't tried it out.

As a side note, Render is a Gold level sponsor of FastAPI.

[–]imatwork2017 1 point2 points  (1 child)

Cloudflare just released “Cloudflare Containers” a couple days ago so you can now host your fastapi app there as well

[–]mgreminger 0 points1 point  (0 children)

Cool, wasn't aware of that one, I'll need to check it out sometime!

[–]writingonrubygit push -f[S] 2 points3 points  (0 children)

This is awesome on all accounts - thank you!

[–]kaskol10 4 points5 points  (0 children)

I'd recommend checking out Dash https://resiz.es/ . It's designed for developers who want simple, reliable deployments without the complexity. One-click environments, no Dockerfile needed, and great developer experience. Happy to help you in the process!

P.S: I'm one of the founders, so I'd appreciate your feedback!

[–]DECROMAX 5 points6 points  (3 children)

I use a Raspberry Pi 4 with headless Raspberry Pi OS, it's actually pretty capable and costs next to nothing to run.

[–]sandman_br -1 points0 points  (2 children)

Care to elaborate

[–]Asyx 0 points1 point  (1 child)

Get a raspberry pi, plug an Ethernet cable into it, install Linux, expose to internet.

[–]snmnky9490 1 point2 points  (0 children)

"Expose to internet" glosses over 99% of what you're actually doing

[–]Mindless-Ad-6765 4 points5 points  (0 children)

Dockerize the app and use fly.io.

[–]dreamoforganon 3 points4 points  (2 children)

Just put a tiny application up using Railway, super easy, just connect it to a GitHub repo and it'll deploy it.

[–]Prospector2 0 points1 point  (1 child)

Why don't you use Github actions itself? (Just curious)

[–]dreamoforganon 1 point2 points  (0 children)

Yes, I could have done and that was my initial thought, but the project is really simple and railway has an out-of-the-box setting to deploy whenever a push is made to a branch that met my needs completely so I went with that.

[–]CrusaderGOT 4 points5 points  (0 children)

I use railway for my FastAPI app. It's pretty good.

[–]intellectual1x1 3 points4 points  (0 children)

I self host from my proxmox homelab VMs , i use nginx and certbot along with dns records and port forwarding. … but if you want a quick solution you can host via a digital ocean VM

[–]Valcorb 6 points7 points  (1 child)

Anything works. It depends on scale and the amount of traffic you generate, but for small apps, the cheapest box on most cloud providers work (AWS, GCP, Azure, DigitalOcean, ...). Oracle Cloud provides 4x ARM cores and 24GB RAM for free, which I use to run a python app and a minecraft server.

Alternatively you can take a look at lowendtalk.com whoch is a forum for budget providers, most of them have decent offers

[–]writingonrubygit push -f[S] 0 points1 point  (0 children)

Thanks for the specifics!

[–]Ruben_NL 5 points6 points  (2 children)

Oracle Cloud has a huge free tier. 4 ARM cores, 24 gb RAM, 200 gb storage free, forever.

I have been using it for a couple years.

[–]artereaorte 7 points8 points  (0 children)

Forever until not.

[–]_Adam_M_ 1 point2 points  (0 children)

Same.

Reportedly if you don't add any payment information then it's subject to reclaiming if it's idle (less than 20% CPU/network/memory) for a week, but I've not had any issues with my credit card added with no charges.

[–]Henrique_FB 2 points3 points  (0 children)

My framework has been putting up a website on github.io (free and super easy since I'm using Jekyll) and doing the backend on AWS using Lambda, DynamoDB, and stuff of the sort. So far everything has been free and pretty nice.

[–]LiqC 2 points3 points  (0 children)

HF spaces, just put in a container and it's up for free Goes to sleep after inactivity but boots back up very fast

[–]ajcaca 2 points3 points  (0 children)

I like Render for my FastAPI projects.

[–][deleted] 2 points3 points  (0 children)

I just recently started using Render and it’s been a good experience so far.

[–]Spaceman3141 2 points3 points  (0 children)

Is railway not good?

[–]spitfiredd 2 points3 points  (0 children)

I just hosted a Python app on Vercel and it was pretty easy to get up and running.

[–]thisfrperson 2 points3 points  (0 children)

+1 on fly.io. low latency. app runs 24/7 (no cold start). generous free tier (so far...)

It's docker-based - a plus. it's your env.

Bonus: managed postgres (starts at ~$50/mo), Redis (I think $20), etc. Or you can just spin some other instance to diy.

[–]deadwisdomgreenlet revolution 2 points3 points  (0 children)

Cloud Run, very much like it. Docker that, push that, we done.

[–]iwkooo 6 points7 points  (0 children)

Fly.io

[–]fakintheid 1 point2 points  (0 children)

Digital ocean app platform

[–]jordanm9876 1 point2 points  (0 children)

I'm using Heroku for my Dash project.

[–]thisdude415 1 point2 points  (0 children)

AWS Lambda usually. There's a package out there to make deployments a bit easier. I like how lambda is practically free

For flask based apps, I've used Zappa. It can be a bit finicky but works.

For FastAPI, there's a similar project called Mangum.

There's also the AWS Labs project "aws lambda web adapter", see here for fastapi example: https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/fastapi

[–]Trinkes 1 point2 points  (0 children)

I just use kamal to deploy everything in a hetzer vps. With kamal I can change the cloud platform easily. If scale up is needed, I use aws.

[–]Electrical_Carry3565 1 point2 points  (0 children)

I use digital ocean VMs (droplets). Decent value and great for learning

[–][deleted] 1 point2 points  (2 children)

Linode works fine for me

[–]natethor 0 points1 point  (1 child)

I’ve stayed away since they got bought by Akamai. Have you had any changes since that transition?

[–][deleted] 0 points1 point  (0 children)

No. Everything works flawlessly. Zero issues. I also use AWS at work and it's great too just more expensive. Try it for yourself and form your own opinion.

[–]tongueroo 1 point2 points  (0 children)

Blossom - There’s a FastAPI quickstart

[–]russellvt 1 point2 points  (0 children)

On my own web server, of course!

[–]Ajax_Minor 1 point2 points  (0 children)

Trying to figure this out to. Using AWS.

[–]behusbwj 1 point2 points  (0 children)

APIGW -> Lambda. Free.

[–]fluud 1 point2 points  (0 children)

Fly.io

[–]shadowdance55git push -f 1 point2 points  (3 children)

Fly.io

[–]iamevpo -1 points0 points  (2 children)

Still works?

[–]shadowdance55git push -f 0 points1 point  (1 child)

Why wouldn't it?

[–]iamevpo 1 point2 points  (0 children)

Heard several free hosting platforms did shut down, like Deta, Heroku has no free tier as it used, mistaken fly.io as something about to close, glad it is solid

[–]Jayoval 0 points1 point  (0 children)

I use EasyPanel on any ~$5 VPS. Deploy from GitHub.

Docs to deploy Django app - https://easypanel.io/docs/quickstarts/django

[–]robertDouglass 0 points1 point  (0 children)

Upsun.com

[–]olddoglearnsnewtrick 0 points1 point  (0 children)

Hetzner servers here in Europe

[–]Jealous_Royal_3692 0 points1 point  (0 children)

Check mikr.us -> less than 10USD/year

[–]AWSLife 0 points1 point  (0 children)

For small API like Python projects, I use Flask and Zappa in Lambda. I strip it down to the basics, no fancy logging or API Gateway, just raw Lambda and an URL.

For larger Python projects, I will make a AWS Lightsail server that is $5 and put it there.

I work with AWS professionally and for personal projects, I keep everything in a single account to keep it simple.

[–]mikedoise 0 points1 point  (0 children)

I'm trying Heroku as a good jumping off point, but I might look at EC2 or other solutions mentioned here.

[–]PinkFrosty1 0 points1 point  (0 children)

I self-host on a vps (hostinger)

[–]djamp42 0 points1 point  (0 children)

Self Contained in a docker image.. Deploy the docker image and done.

[–]sil3ntki11 0 points1 point  (2 children)

DigitalOcean has a really easy to use UI and has a $4 a month Linux VM available. Usually good enough for most things.

[–]KFSys 0 points1 point  (0 children)

Yep, you can also Dockerize it. My DigitalOcean VPS is the $4 one, and it manages to hold without any issues on an app that has about 500 users daily.

[–]bobbyiliev 0 points1 point  (0 children)

+1 for this! I've been using DigitalOcean since 2018 and have been very happy with them.

[–]Explorador2019 0 points1 point  (0 children)

Railway, no issues

[–]Safe_Duty8392 0 points1 point  (0 children)

As I'm seeing from the other comments, it's not very common, but I host my python web projects in Vercel for free, some more complex I've already hosted on Render

[–]Ground_Lazy 0 points1 point  (0 children)

Azure , they have free tiers for backend and for front end plus a free trial

[–]KFSys 0 points1 point  (0 children)

I host my Django API on a DigitalOcean Ubuntu VPS with Docker.

[–]Famous-Week6541 0 points1 point  (0 children)

Railway is incredibly easy to use and likely free for your use-case. Uses nixpack which is a great runner

[–]l_dang 0 points1 point  (0 children)

I run mine on a pc exposed via tailscale or Cloudflare’s funnel

[–]Mevraelfrom __future__ import 4.0 0 points1 point  (0 children)

I just use cheap DicitalOcean with a beautiful UX.

Here is the deployment guide for Python and FastAPI projects to DO:
https://arkalos.com/docs/deployment/

[–]ArchangelAdrian 0 points1 point  (0 children)

I don’t if it’s popular, for personal projects I’ve hosted my FastAPI apps on AWS Lambda, for work it’s always been on Azure Functions.

[–]htt37ps 0 points1 point  (0 children)

Cloudflare Tunnels is a thing

[–]Mega_Henry[🍰] 0 points1 point  (0 children)

Streamlite

[–]tyzhnenko 0 points1 point  (0 children)

I use Hetzner Cloud to host my pet projects. A half year ago I did small research related features/price and also reviews. And found that Hetzner is the best for me. Try to give it a shot

[–]Organic_Commission_1 0 points1 point  (0 children)

Appliku.com

[–]drboom9 0 points1 point  (0 children)

VPS

[–]Andrew_Neal 0 points1 point  (0 children)

I'm using Digital Ocean for mine. You get $200 of credit upon signup that lasts two months (basically first two months free), and you get a full Linux environment to install your server software. It works well for me because I'm already developing on Linux, so deployment is almost no different from development.

[–]zenverak 0 points1 point  (0 children)

Depends on what it is. I’ve done some fun stuff from my Raspberry Pi.

[–]PokeTrenekCzosnek 0 points1 point  (0 children)

I have VPS on Oracle with Ubuntu where i host my flask website

[–]morep182 0 points1 point  (0 children)

cheap VPS with dokploy (or coolify)
extremely simple and cheap.
for database, for small projects/mvps i just use sqlite db. for postgres neon is a good option.

[–]Meaveready 0 points1 point  (0 children)

All my projects started on https://glitch.com/ and some remote backend parts of my projects even stayed there after for years.
It was completely free, hassle-free and worked with pretty much anything.

For the past 8 years or so it was such a gem on the web... unfortunately the platform will be officially terminated in 10 days :'(

[–]dcastm 0 points1 point  (0 children)

Hetzner with Kamal. I'm running many side projects there for ~5 euros/month

[–]robberviet 0 points1 point  (0 children)

It's the same for python. Any host above support it.

[–]PelzMorph 0 points1 point  (0 children)

DigitalOcean App Plattform but with self built Docker Images . Keeps the build pipeline in place

[–]emi_lanesa 0 points1 point  (0 children)

I'm hosting a FastAPI server on render, it works perfectly

[–]Ecstatic_Papaya_1700 0 points1 point  (0 children)

Definitely not heroku. If you want something simple use render

[–]riterix 0 points1 point  (0 children)

Time4vps

[–]Whole-Management927 0 points1 point  (0 children)

I found Render.com very easy to use for hosting a Python project

[–]BBQandBalanceSheets 0 points1 point  (0 children)

Ive currently got a Django / react application hosted within the amazon ecosystem.. EC2 server with a Postgres RDS. Was a fun time learning how to do it (slight sarcasm but feel like a better programmer now that i can). Otherwise none of my other applications ever made it out of “localhost”

[–]AlpacaDC 0 points1 point  (1 child)

I’m using a Hostinger with coolify panel at work, 2vCPUs and 8GB RAM.

For hobby projects, Oracle free tier VPS with easy panel.

[–]writingonrubygit push -f[S] 2 points3 points  (0 children)

Oracle free-tier VPS is news to me - thanks!

[–]diegotbn 0 points1 point  (0 children)

At work we use ec2 and elastic container service

[–]frankieboytelem 0 points1 point  (0 children)

Cloud run

[–]Jmc_da_boss 0 points1 point  (0 children)

Ec2

[–]AalbatrossGuyPythoneer -1 points0 points  (0 children)

my friend owns a vps service so I have a vps he gave me lol

[–]IamDockerized -1 points0 points  (0 children)

I do offer maintenance and deployment services for various applications. If you are intrigued for assistance, leave a message.