Hacker News new | ask | show | jobs
by navanchauhan 2171 days ago
I might just self-host Gitea on my Pi today
2 comments

I was going to warn you about SD card corruption, but then I realized even this is probably more reliable than GitHub at this point.
You can always just sync to multiple destinations like gitlab, bitbucket, github etc :).
I personally haven't experienced any SD card corruption, even though I am running a Maria-DB instance, Home-Assistant instance and a Pi-Hole instance on a Pi Zero with a 32 gig SD Card ( 23 days uptime as of writing )
It typically kicks in after a few months depending on the stuff you're running and type of SD Card. SD Cards aren't really designed for the type of read/write patterns a 24/7 Raspberry Pi server would entail.
I've had 2 sd-cards go corrupt (read-only, any writes were lost). Had a mariadb instance running on it as well. It will hold for for some time, but eventually, the card will give up.
Oh no! What will you recommend as a long term solution? I have ordered a Pi 4, should I use an USB Flash Drive / HDD / SATA SSD?
The advice is to buy a quality SD card and backup data that shouldn't be lost to a more reliable location. S3 bucket, a local NAS or something like that. The general idea with Pi's and IoT devices is to act more as input point for data or programmable controllers rather than reliable networked storage or server space.

also Pi4 now supports boot from USB: https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb

Since the Pi4 can boot from USB now (might still be in beta, not sure if it's fully released), I would get a USB3 to M.2 adapter, buy a decent M.2 drive, and use that. It'll take up more space than the SD card, obviously, but not that much more.
You can even get SSD based USB sticks like the Sandisk Extreme Pro 3.1: https://www.amazon.com/dp/B01N7QDO7M

I bought one to run Windows on my Retina MacBook Pro. I only need Windows for gaming when visiting friends, and it works flawlessly for that purpose.

You can use a USB hard drive and just save to it while still booting and running on the SD.

Check speeds when you get it to see what works for you best.

Honestly throw the thing in a bin and use an old mini pc instead. Lenovo thinkcentre tiny. You can pick them up on eBay for about the same as a fully equipped pi.

Pi is 100% not suitable for 100% duty work. It’s just a toy.

As someone who's been running a media server and home automation server on his Pi 24/7 for 3 years now, I beg to differ.
That's 27W (idle), compared to the Pi 4's 3.4W (idle).

That's an additional 145kg of CO₂ per year (2018 US average).

I run a cosy Gitea hosting service over at https://hostedgitea.com/ for those who want their own private Gitea box without the hassle of deploying or maintaining it. Basically I handle all that for you myself. Just starting out but happy to get feedback!