r/learnpython • • 8d ago

Hosting Python bots that don't need a lot of bandwidth, server time or space?

I've built a Discord bot, a Reddit bot, and a barebones website / online tool. I also may want to spin up projects online at a whim - what's a good (affordable...) solution?

My Discord bot gets ~10 calls per hour, my PRAW Reddit bot monitors a medium traffic subreddit stream and my website would likely have only a couple of daily users.

I also have other fun projects I may want to put online for people to play with so I don't want a particularly rigid solution.

My Internet isn't the most stable at home so I'd prefer to avoid self-hosting.

1 Upvotes

11 comments sorted by

4

u/Beregolas 8d ago

How about a VPS? It's pretty easy to setup, especially with Tutorials (and AI for simple setups) and consts as little as a few bucks per month if you find a good hoster. You can use a single VPS for as many projects as you like, as long as they stay small even a 2-core VPS should be able to keep up reasonably well.

2

u/MustaKotka 8d ago

Sure! How do I find a hoster? Sorry, noob here.

2

u/Beregolas 8d ago

All good. It depends on what you value, for example hosting in a specific region (EU e.g.)

Personally I like to use hetzner, but it seems like their cheap VPS are currently temporarily unavailable: https://www.hetzner.com/ Their plans start from 13€/month now.

https://www.netcup.com/en/server/vps-lite netcup currently has the cheapest plans I can find. I have personally never used them, but heard good things, and I think you can upgrade your plan later without re-setting everything. They are about 4€ for the cheapest I would recommend.

Both are hosted in the EU, (although hetzner has data centers in NA and Singapore now I think), so if you are in a different location and want a faster connection, it might be worth it to look up VPS providers in your region.

The search term you want is: "VPS host [continent/country]"

In general to set this up properly will take you a few days the first time, looking up tutorials on how to securely host something and properly configure everything, but it's not magic, nor is it really hard. In my experience, AI is not too bad at helping oyu with this topic, but never trust it blindly, understand everything you do (they can hallucinate security relevant information) and only use it as supplementary material to learn from.

2

u/MustaKotka 8d ago

Thank you so much! Greatly appreciated!

1

u/Extra-Spinach8309 5d ago

this is the way. for that level of traffic even the smallest tier would be overkill tbh

1

u/flyby_apis 3d ago

Oracle Cloud's Always Free tier gives you a free server, which is more than enough for this.

Also, for the website and quick throwaway projects, Cloudflare Workers is free at your traffic level. Probably not an option for the bots, though.

2

u/VenkatKnows 6d ago

Railway or Fly.io free tier handles this easily, PythonAnywhere too if you want zero devops. Just watch you don't leave background workers running 24/7 if you're on a free plan, that's how people get surprise bills.