Hey folks,
I’ve created a Telegram bot using Python. It’s pretty simple – it just grabs some info from a Google Sheet and makes charts. I’m the only one using it, and not very often. Maybe like 20 times a day tops.
The thing is, I need it to run all the time because of how it’s set up. I don’t want to keep my computer on 24/7 for this.
I’m hoping to find a totally free hosting option. I’ve checked out a few places, but they all seem to have some issues:
- Some used to offer free always-on hosting, but don’t anymore
- Others need a credit card, which I’d rather avoid
- And some free options make the bot sleep after a while
Anyone know of a good place to host this kind of bot for free? It doesn’t need much, just somewhere it can run all the time without costing anything or needing my credit card info.
Thanks for any ideas you might have!
hey, have u tried pythonanywhere? its free tier might work 4 ur bot. it lets u run python scripts 24/7 without sleepin. no credit card needed, just sign up. might have to refresh every few months to keep it goin, but thats not too bad. worth checkin out!
I’ve been in a similar situation, and I found Heroku to be a solid option for hosting small projects like your Telegram bot. While their free tier isn’t as generous as it used to be, they still offer a decent solution that might work for you.
With Heroku’s free plan, you get 550 dyno hours per month, which is enough to run a single dyno 24/7. The catch is that your app will sleep after 30 minutes of inactivity. However, there’s a workaround: you can use a free service like UptimeRobot to ping your bot every 25 minutes, keeping it awake.
The setup process is straightforward, and you don’t need a credit card. Just be aware that you might need to verify your account with a phone number. It’s not perfect, but it’s served me well for small projects without breaking the bank.
Another tip: consider optimizing your bot’s code to reduce resource usage. This can help you stay within free tier limits on various platforms.
Have you considered using a free tier on a cloud platform like Oracle Cloud Free Tier? They offer always-free resources that might suit your needs without requiring a credit card. You get 2 AMD-based Compute VMs and up to 4 Arm-based Ampere A1 cores, which should be more than enough for your low-traffic bot.
Another option worth exploring is Google Cloud Platform’s free tier. While it does require a credit card for identity verification, they offer a $300 credit for new users and some always-free products that could potentially host your bot.
These platforms can be a bit complex to set up initially, but they provide reliable, always-on hosting that fits your requirements. Just be sure to monitor your usage to stay within the free limits.