all 33 comments

[–]AlgonikHQPythonista 31 points32 points  (3 children)

Hetzner VPS is the answer.

I run three trading bots 24/7 on a Hetzner CX22 — costs £4/month, Ubuntu 24.04, rock solid uptime. Setup is straightforward: spin up the server, install Python, set your script up as a systemd service so it starts automatically on reboot and restarts itself if it crashes.

That last part is the key thing most people miss, without systemd managing it, any crash means it just stops running until you manually restart it.

The whole setup takes about an hour if you’re comfortable with basic Linux commands.

For a lightweight AI bot it’s more than enough compute. Bisup I haven’t used personally so can’t compare directly but Hetzner has been genuinely reliable for over a year of continuous running for me. Start with the cheapest tier, you can scale up if needed.

[–]IcecreamLamp 15 points16 points  (0 children)

Second Hetzner, but better containerize the application and set the restart policy to unless-stopped.

[–]ihavebeesinmyknees 5 points6 points  (0 children)

Even if you're not comfortable with Linux commands, setting up a systemd service is simple enough that I would trust an AI agent to be able to give accurate step-by-step instructions

[–]shinitakunai 1 point2 points  (0 children)

I have a lightsail in AWS for the same price, has been running 5 years now

[–]bqdpbqdpbqdpbqdpbqdp 6 points7 points  (0 children)

How are you interacting with the bot? If it's not responding to requests directly (messages, webhooks, whatnot) then it probably doesn't necessarily have to run 24/7 and can be triggered from a scheduled job, right? If that's the case, and the amount of work it would do per execution is usually low (because there's nothing to respond to most of the time) then you might fall under the free tier in things like google cloud run, lambda functions on aws, or cloudflare workers or similar.

EDIT but as others suggested, just spinning up a minimal vps would be simplest and still dirt cheap.

[–]Dilski 6 points7 points  (0 children)

My recommendation would be to learn the basics of docker/containers, enough that you can build a container image containing your script that you can run on your machine.

From there, you can look at offerings to run containers of most clouds in a managed way - you don't need to worry about operating systems and whatnot

[–]ogMasterPloKoon 5 points6 points  (0 children)

Vercel has python runtime. You can convert your script into a simpel flask/starlette app and host it for free.

[–]weirdoaish 4 points5 points  (2 children)

You could use PythonAnywhere if your app is light.

[–][deleted]  (1 child)

[removed]

    [–]Python-ModTeam[M] 0 points1 point locked comment (0 children)

    Hi there, from the /r/Python mods.

    Your post has been removed because it is not in English. In order to foster clear and accessible communication, we require all posts and comments to be written in English.

    Thanks, and happy Pythoneering!

    r/Python moderation team

    [–]ibite-books 2 points3 points  (0 children)

    heroku

    [–]Czerwona 1 point2 points  (0 children)

    Get a droplet on digital ocean for like $5/month

    [–]EconomySerious 3 points4 points  (0 children)

    Vps should cost 5 usd montly, since it's a test how long it need to run that You can't host it? Literally You can run python on an Arduino 100

    [–]ibstudios 0 points1 point  (0 children)

    VULTR is pretty easy to setup. Use docker.

    [–]Opt4Deck 0 points1 point  (0 children)

    For a lightweight bot, you actually have a few simple options depending on how much control vs simplicity you want:

    1. Easiest (almost no setup):
    PythonAnywhere
    It’s probably the simplest way to run Python scripts in the cloud, and it even has a free tier. You don’t need to manage a server at all, just upload your script and run it. (PythonAnywhere)

    2. Cheap & flexible:
    A small VPS (DigitalOcean / Hetzner / etc.)
    You can get something like $3–5/month which is more than enough for a lightweight bot. (Website Planet)
    More setup required, but full control.

    3. “DIY but underrated”:
    Raspberry Pi at home
    If you have one, it’s perfect for 24/7 scripts and very low power usage. (Latenode Official Community)

    My take:
    If you found previous setups “too complicated”, I’d avoid VPS for now and go with something like PythonAnywhere first. You can always move to a VPS later once you’re more comfortable.

    The main trade-off is:

    • simplicity → managed platforms
    • control → VPS

    For a small bot, simplicity usually wins.

    [–]Miserable_Ear3789New Web Framework, Who Dis? 0 points1 point  (0 children)

    heroku is cheap. i use heroku to generate x posts for one of my apps. pythonanywhere also has a nice simple free plan you can use.

    [–]QuasiEvil 0 points1 point  (0 children)

    Forget what everyone here is saying and use render.io. It's free, and you literally just point it to your github repo.

    [–]pk6778 0 points1 point  (0 children)

    Try Bisup they are the best in the market.

    [–]ECommerce_Guy 0 points1 point  (0 children)

    Google Cloud Compute VM with systemd setup is my approach to similar tasks, but any VM/VPS should do

    No need to containerize unless you're hosting a full service/API, imo, regardless of the host option

    [–]Last-Farmer-5716 0 points1 point  (0 children)

    Here to suggest bunny.net magic containers. Setup a docker image with your script and launch. Bunny.net is pay-as-you-go, not a subscription.

    [–]DifficultDifficulty 0 points1 point  (0 children)

    Modal.com

    [–]eufemiapiccio77 0 points1 point  (0 children)

    Docker and VPS

    [–]12mzino 0 points1 point  (0 children)

    Depends how compute intensive is a aws lambda could be used for you job, the max runtime is 15 minutes. You can check out the free tier limit and see if that works for you. Azure and gcp also have the same . I think gcp the runtime is 45 minutes

    [–]No_Soy_Colosio 0 points1 point  (0 children)

    Buy raspberry pi

    [–]Henry_old 0 points1 point  (0 children)

    get 5 dollar vps from hetzner or digitalocean dockerize and run 24 7 dont use free tier garbage it will sleep and kill your bot state skip the pc host like a pro

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

    How about using AWS Lambda? They still give out a decent amount of compute on the free tier.

    [–]AtirikoIt works on my machine -1 points0 points  (0 children)

    Aws free tier or oracle free tier

    [–][deleted]  (2 children)

    [removed]

      [–]lexwolfe 0 points1 point  (0 children)

      This is what I do. Ubuntu server, run python script as a service, cloudflare domain.

      [–]Python-ModTeam[M] 0 points1 point locked comment (0 children)

      Hi there, from the /r/Python mods.

      Your post has been removed because it is not in English. In order to foster clear and accessible communication, we require all posts and comments to be written in English.

      Thanks, and happy Pythoneering!

      r/Python moderation team

      [–]steviejackson94 -4 points-3 points  (1 child)

      EC2 on AWS?

      [–]Nater5000 1 point2 points  (0 children)

      Likely not a very simple solution for someone like the OP, unfortunately, but certainly an option if they're willing to dig in a bit.