Hey folks! I'm a C++ developer currently building a chess engine and I've set up a bot account on lichess for it. I've got everything running smoothly on my MacBook Air using a Python script that connects to lichess's API. However, I want to move this to a server so my laptop doesn't have to run all the time. I'm looking for a platform where I can simply 'run some code in the cloud'. What options are out there that are affordable or even free? Would using a Docker container be the best way to go? Thanks for any insight!
5 Answers
Not sure why you're looking into 'web dev' specifically. If your script isn't too demanding, a VPS (often marketed as 'cloud server') from companies like Digital Ocean or Linode is the way to go. They often have budget-friendly plans.
For around $5 a month, you can get a VPS from places like DigitalOcean or Linode. It's pretty easy to set up; you just create a droplet (that's what DigitalOcean calls it), access it via SSH, and you can clone your project and run it. You can use Docker or just run it directly, whatever you prefer.
You could create a Python function app on Azure or use AWS Lambda. However, Lambda might not be ideal for constantly running scripts. If your script just needs to run at intervals, a function app could work well, but for continuous execution, you’re better off with a VPS.
A cheap VPS would work great. You can run your Python app using either Docker or systemd, and creating systemd units is pretty straightforward if you go that route.
You might want to consider VPS hosting. There are plenty of providers that offer cheap options where you get a bare-bones server. You can install Python and any other necessary tools to get your script running.

Honestly, Lambda isn’t great for scripts that need to run constantly. You’d be better off with a VPS.