
Which Linux distro should I put on my Raspberry Pi server? - boomerhackr
I am writing a website in python, and I want deploy my website to a raspberry pi 4. I want it to be secure and lightweight. Which GNU&#x2F;linux based OS should I use?
======
hacktember
Just about any of them would do. It's like saying "I want to drive from
Chicago to Minneapolis in a car. Which brand of car should I drive?" Just
about all the car brands will get you there. ;)

At the end of the day, I recommend figuring out your preferred distro if you
haven't already and going from there. Most major distributions like Ubuntu,
openSuSE, and Fedora have Raspberry Pi versions.

If you're asking for optimizations, you'll find them in keeping as few
processes running as possible, and you may get better speeds by hardware means
such as purchasing a micro SD card with faster read-write capability or
getting a cooling fan for the CPU.

Hope that helps, and props to making and running your own website from home!
:)

~~~
ksaj
The car metaphor still leaves a choice between driving a Rolls Royce or a VW
Bug. They'll both get you there, but one is totally miserable in the winter.
Although that is covered in your second paragraph.

If it is the 8G version, it might be worth implementing a ramdisk for the web
server and web logging directories. That way the sdram doesn't get trashed as
quickly, and response will be quicker.

------
ksaj
What people are saying here is generally correct overall. If you are using the
rpi as a server, the distro ever so barely matters. You probably wouldn't want
a gui (why give away half the CPU and a sizable chunk of memory to something
you aren't even going to look at?) and every distro out there has exactly the
same server packages available.

I would install the minimal Raspbian and then add the server applications you
want. Also, don't forget you can completely shut off the HDMI for a tiny bit
of power savings. If you are going to use https, every little bit counts.

The only reason I actually name a distro when normally I'm hugely agnostic, is
because Raspbian is the official distro for Raspberry Pi, and therefor can
always be expected to support rpi's various idiosyncrasies.

------
salawat
Slackware. The thinking man's distribution. Trim it down ultralight purpose
built, or keep it ready to go at a moment's notice. I've got Raspbian on mine,
but once I get the 8 gig version, I think I may just pull the trigger on
Slacking it up.

Then again, I may be completely insane, because I'm humming and hawing around
building a Single System Image out of a pair of them and actually making
something roughly analogous to a laptop to go along with it.

To be frank, you probably shouldn't take my advice. I'm clearly a glutton for
punishment, and it may lead you to the darker corners of computing related
insanity.

~~~
boomerhackr
I am not sure if I'm ready for that. I've been working on installing gentoo
onto a laptop, and I can't get it to boot, so I don't think I want something
that difficult. I like using the command line, but that thing (source based
distros), it scares me.

------
LarryMade2
Tip - if you are going to run the server 24/7 best to use an external
USB=>sata HDD instead of a flash card. Did the flash route and after a while
(multiple resets) the card just died, flash does not go well for unexpected
power cycling. Best to use a mechanical drive better resiliency and recovery.

I used Raspbian (*versions wernt important), mainly I'd choose a distro that
works for the versions of server software that you want to keep updated (i.e.
older=Ubuntu, newer=Linux Mint)

------
giantg2
I would recommend Raspian Lite and install the server packages that you like.
You can secure it similar to any other distro. I think there are checklists
online that tell you how to configure it securely (root/sudo/user, ssh,
permissions to change on specific folders or files).

------
bediger4000
I've put Arch and Raspbian on a Pi. I know Raspbian is The Official Raspberry
Pi distro, but gee whiz, Arch felt a lot more solid. I ended up using Raspbian
to build a 4-node Kubernetes cluster, you just can't do it with Arch.

~~~
boomerhackr
I thought rolling release distros were bad for servers.

~~~
tuananh
it's for homelab. most of stuff we do at homelab is the stuff we tend not to
use on production :D

------
shams93
I'm using ubuntu server 20.04 along with micro-k8s to have a 3 node cluster
for kubernetes at home.

~~~
boomerhackr
I have heard that Ubuntu had spyware that sent information to amazon. Also I
have heard that Ubuntu has a lot of unnecessary software aka bloat. Was that
just desktop ubuntu or also ubuntu server?

~~~
Iolaum
That was the desktop version. I think they changed that "feature" to be opt in
after the outcry.

