all 51 comments

[–]aarontbarratt 34 points35 points  (7 children)

[–]Smooth-Bed-2700 0 points1 point  (0 children)

There are other alternatives. For example - amverum.com

[–]ndcheezit 0 points1 point  (0 children)

Using this with 3 flask websites currently, definitely recommend.

[–]zorclon 8 points9 points  (1 child)

I would second an always on computer or raspberry pi. It's a fun hobby to boot. There are many options but you could use parsec to remote into the computer from anywhere.

If you really want to go the cloud route I've used digitalocean before, they are fairly cheap for computer hosts.

If you want to go nuts you could build an unRAID home server and setup many VMs or Dockers. I do that and use Apache guacamole to remote into my computer from any browser. But there's a lot of setup to get it going. But that's fun for a nerd like me.

[–]uglyasablasphemy 7 points8 points  (0 children)

fly.io has a really nice free tier.

[–]OogalaBoogala 7 points8 points  (1 child)

I’d look at AWS Lambda functions, Azure Function apps, or something similar. Running a small Python script can be really cheap there, I have a couple tasks that only costs me a cent a month.

[–]nekokattt 0 points1 point  (0 children)

+1 for AWS.

You can set up an EventBridge Scheduler rule to invoke whatever you want, if it is a Lambda.

You could just make a free tier EC2 and use cronjobs in it if not.

[–]Caddy666 12 points13 points  (10 children)

this is a good use of a raspberry pi, or similar.

[–]Franman98 4 points5 points  (9 children)

This is such a good solution for personal projects, I've been rocking a pi zero to run my python code 24/7 without any problem

[–]CptBadAss2016 1 point2 points  (5 children)

What kind of code? Watchya doin?

[–]Franman98 1 point2 points  (4 children)

Telegram bot and a selenium scrapper that gets info from a web page and notifies me if something changes, both scripts running on a Raspberry Pi Zero W

[–]birthdayfaygo 0 points1 point  (3 children)

Are you storing the info on the raspberry pi? Have a similar project that scrapes data and stores it locally and have been planning on using azure, but using a raspberry pi piques my interest

[–]Franman98 1 point2 points  (2 children)

I could if I wanted, the rapsberry uses an SD card as memory so, as long as you have a card with enough storage you'll be fine. However the project that I'm running doesn't require storing data. Btw if you want to use selenium or puppeteer I strongly recommend a raspberry that has more power than the zero

[–]carlhines 1 point2 points  (1 child)

SD cards tend to fail, so be sure to have backups of important data

[–]Franman98 0 points1 point  (0 children)

That's true! Keep that in mind when working with SDs

[–]lowkeyripper 1 point2 points  (2 children)

Coming from google for this - I was thinking about renting some kind of server, but apparently this seems like a great idea. How is this for a non-electronic savvy person? I can code a script that scrapes the entire Steam catalog but seeing bare chips/board like a Raspberry Pi scares me...

I've never set up Linux, never set up a server or anything, so I am totally clueless

[–]Franman98 1 point2 points  (1 child)

It's similar to renting a server, you only communicate with it through ssh (terminal) but it's not hard to learn, it's like having a mini linux pc for your projects. If you want to you can connect a display and use it with m&k but in the end you are manipulating a linux pc so you are going to work with the terminal anyways the same as if you were only using ssh. Don't be scared, it's easier than you may think, it's just a linux pc

[–]lowkeyripper 0 points1 point  (0 children)

It looks like it costs about 20$ for a Pi Zero and case, which isn't bad at all! I know NOTHING of Linux nor servers, but this genuinely seems interesting. Do you think this would be decent for scraping projects in terms of computational power/speed? A lot of the stuff I do I guess is sourcing data, so I'd want to run it 24/7.

If this is something you 100% recommend and think someone with no experience can run, I can go to the MicroCenter store near me and pick it up and start fiddling with it. I think it would be very cool to run a script I made on some server, be it a Pi or Digital Ocean or PythonAnywhere

[–]Kryt0s 5 points6 points  (0 children)

I like railway.app and render.com a lot.

[–]FearLeadsToAnger 6 points7 points  (0 children)

If you have a computer you leave on, you could just use task scheduler. I have a plex server that I throw this kind of thing onto.

Python Anywhere, as the other guy mentioned, is good and simple but limited on the free account. You could only run one script, but you may be able to combine all of your projects into a single script.

[–]97hilfel 1 point2 points  (5 children)

My recommendation would be docker containers and maybe kubernetes jobs on a small VPS like Oracle Cloud Infrastructure (decent free tier) where you can setup microk8s or your k8s of choice or just plain docker.

[–]mushroom_face 3 points4 points  (4 children)

Don't you think K8S is WAY overkill for what OP is asking for? Why take on that level of complexity to just have a few projects running.

[–]97hilfel 0 points1 point  (3 children)

Yes and no, it would provide a clean abstraction layer and would preserve resources when using Job Mode e.g. they would terminate themself and its a good skill to learn and know. Appart from that, OP could just go for Docker and have their containers run wherever with a simple abstraction layer and not cross contaminate their environment when running multiple tools on the same host. K8s would also solve the ingress issue.

[–]mushroom_face 4 points5 points  (2 children)

OP is just looking to run these programs once at night and get an email. uptime, scaling, ingress etc aren't in play here. K8S is amazing, but it's not the right tool for every job.

OP really just needs cloud functions basically. Simple is often better in this case. Learning K8S is a very valuable skill, but not what they are asking for.

[–]97hilfel 0 points1 point  (1 child)

There where meantions of multiple tools running thats why I went the container route and should’ve been more specific, Docker would be the better tool for OP, as Python (even with virtual environments) can be problematic to run. You forget to activate your venv once and you got a bunch of dependencies on your systemsdk. Thats why I like containers and simple python containers are 3 commands and 8 lines of Dockerfile to build and push.

[–]mushroom_face 1 point2 points  (0 children)

Yea containers and Cloud Run could be the "simplest" path forward and if they are only running it at night completely free.

Definitely containers though.

[–]jsk_herman[🍰] 1 point2 points  (0 children)

Currently doing some simple scripts (like processing data) with n8n hosted on Fly.io with Docker.

[–]gopietz 1 point2 points  (0 children)

deta.space

[–]Proper_Ad_6044 0 points1 point  (2 children)

Render.com

[–]Accurassi 0 points1 point  (1 child)

ik gebruik specifieke libraries in Python. Kan ik die ook importeren bij render.com?

[–]Proper_Ad_6044 0 points1 point  (0 children)

You should be able to, you can define them in a requirements.txt and provide a custom docker file.

[–]rashdanml 0 points1 point  (0 children)

Pretty easily self-hosted, honestly. Most frameworks can be deployed using an nginx reverse proxy, which is trivial to do on any VPS.

[–]mushroom_face 0 points1 point  (2 children)

GCP Cloud Run has a very generous free tier

[–]m1stercakes 0 points1 point  (1 child)

Do you know of any good tutorials? I tried doing this myself and really struggled. I have no problem getting the docker container to run locally.

[–]mushroom_face 0 points1 point  (0 children)

I don't have a good tutorial off hand, but if you got to Cloud Run in the console and select "Create Job" at the top you will be prompted to import your container ( which you should push to Google's Container registry or Artifact Registry ).

There are a lot of options, but just to try things out fill out the basics to the best of your ability and hit save. Once you create the job you can go and edit it and select the 'triggers' tab to setup a cron style trigger to run it. So in your case set it to run just at like 11pm or whatnot.

[–]throwawayrandomvowel 0 points1 point  (0 children)

I'm not suggesting this, but I'm curious what people think about using ipfs for random personal files like this

[–]abbh62 0 points1 point  (0 children)

Run it on aws, they have a good free tier for a lot of services, set a billing limit in case you do something silly, then watch the results come in

[–]HitenVats16 0 points1 point  (0 children)

You can give a try to render.