Ask HN: Always on low power home server

98 points by tails4e ↗ HN
I'd like to build a low power (ideally fanless) server for home automation, data logging, etc, (possibly) pihole, and kodi server, etc running Linux. I've used Rpi in the past, but the sd cards wear out/go bad and I inevitably have to rebuild. Is there a low power/cost way of having a SBC paired with an SSD, or an alternative solution that anyone could recommend?

138 comments

[ 4.4 ms ] story [ 132 ms ] thread
Modern pi4 can boot from other media. The Sd card problem is mostly a thing of the past.
I'd stick with a RasPi. There's a process to set a boot flag to allow booting from USB media. From there you can install Raspbian (or your other distro of choice) to any USB connected storage device. I've been using the same USB drive partitioned and formatted to 1/4th its capacity (to increase available blocks for wear leveling) for 5 straight years without any issues.

https://www.raspberrypi.org/documentation/hardware/raspberry...

Very cool, would like to set up something similar myself!

> to increase available blocks for wear leveling

If you have the time, would you mind expanding on what this means? It sounds something like the pi would automatically fail over to new parts of the usb storage as old parts wear out due to too many reads/writes -- is that correct? Was the 1/4 capacity chosen for a specific reason?

The USB storage firmware itself will do this. ¼ was chosen to give a lot of space for this wear levelling to occur; wear levelling can't use occupied space, so it'd need to move data around a lot if the drive was close to full, which would increase wear.
Wouldn't this also work with a large enough MicroSD?
As I understand it, the firmware for the majority of MicroSD cards is very limited. The physical size and low price point are likely the reason you don't see these more complex features in consumer cards. Also, if I recall, there's nothing in the spec about levelling so you'd probably get some half-arsed buggy implementation anyway.
Thank you for the clarification!
MicroSD cards tend to have much worse durability and IOPS than common USB sticks, and especially, say, an M.2 SSD to USB adapter.
what sort of usb storage?

I've looked at a few common flash drives and none of them support trim, so I'm not sure how the drive would know that the space isn't occupied

Normal SATA SSD + usb2Sata adapter?
Folks, the OP was asking for alternatives to Raspberry Pi, but everyone keeps saying just use Raspberry Pi with a USB hard drive or get some obscure second hand hardware.

I think the best alternative, while staying in the SBC realm, is a RockPro64 by Pine64. These boards have PCI-e slots and very cheap SATA & NVMe attachments. That way you get full performance from your SSD, versus a USB connection. And the boards have a huge number of community supported OS builds available. They are simple to install in a few clicks, with the official Pine64 installer.

The RockPro64 is highly underrated in my opinion. Especially when you consider the flexibility, available attachments & accessories, and wide range of use cases and OS options. A brand new board with 4GB RAM, power supply, and SSD PCI-e interface will run you only around $100 before shipping. Check them out. I have had one for a couple years and I'm super happy with it!

Boards: https://pine64.com/product-category/rockpro64/?v=0446c16e2e6...

Accessories: https://pine64.com/product-category/rockpro64-accessories/?v...

Ultimately, OP was looking for a low power server without relying on a MicroSD. So no, it's not strictly an alternative to a Raspberry Pi because once you boot from USB, MicroSD durability is no longer the issue.
I really don’t mean this in a mean way, but I’d be surprised if the OP didn’t realize he could just jam a hard drive into the Pi with USB.
To be totally fair, this wasn't really a thing until recently
Slap an SSD in an external USB enclosure, connect it to a Pi 4 configured to boot from USB, and you're all set.
I use a Asrock J3355B for my little nas/homeserver it idles at 8W and "spikes" to 15W while decoding movies. It's a bit pricier as a raspi but it has a lot more features. 2 Sata Ports, PCIEX Slot up to 16gb ram etc but most important it is completely silent.
I'd again recommend a Raspberry Pi (ideally 4 with 4GB+ RAM), but with some modifications.

- You can choose an high endurance MicroSD card to maximize its life.

- You can delegate big file storage to something external (a HDD or SSD w/USB 3.0 connection). If you want something small, SanDisk Extreme Pro USB stick is a real SSD with USB-SATA bridge inside and 400MB/sec throughput.

- Armbian writes logs and swap to RAM in a compressed manner and will only commit logs back to disk during restart/shutdown. You can modify Raspbian to do the same I think. Armbian is not present for Raspberry Pi, my bad, sorry.

I'm using Armbian on a OrangePi Zero to run dnsmasq, qbittorrent (humble bundle downloads and ISOs), syncthing and other couple of services. I've delegated storage to an external USB 256GB drive and it's doing fine for now.

It's not as powerful to run Kodi and other multimedia stuff, but it's a plug and forget matchstick box which makes my life way easier.

> You can choose an high endurance MicroSD card to maximize its life.

You can also use whatever cheap card just for bootup, then immediately change root to a `/` mounted from an SSD.

That's another choice, of course. I'm in my lazy era. I don't tune/fix anything up unless it's broken :)

Since Armbian doesn't write to the SD card too much anyway, keeping the box compact is the more attractive option for me, for now.

High Endurance SD cards are not exactly expensive anyway. With the rise of dash cams and Go Pros, every major manufacturer has clearly labeled HE SD cards.

This sounds interesting. Any guides for how to use as for boot only and how to attach an SSD to a pi? What powers the ssd etc? The last pi I tried was a 3b
Booting from USB with the 3b should be pretty easy, and you probably won't need any sort of USB hub. A name brand portable SSD with a USB interface (not an adapter on a SATA drive or something) should serve you well here.

One thing: the errors you were getting with storage might have been because of an inadequate power supply. Make sure you're using the official Raspberry Pi PS for the 3b.

There is Armbian for the RaspberryPi now? Last time I checked RasPi was explicitly excluded because of non free Broadcom binary blob.
Oh, my mind is playing games to me. You're right. I misremember it. Sorry.

Will update my comment.

To put the money where my mouth is:

1. A little how-to for storing your logs in RAM, a la Armbian style:

- https://github.com/azlux/log2ram (It's still updated)

2. Move your SWAP to ZRAM, again Armbian style:

- https://github.com/foundObjects/zram-swap

This two will improve your SD card life considerably.

Are these useful for a normal laptop's SSD?
Yes, but if it's a relatively modern SSD; this might be overkill.

Take a look to your writing stats with smartctl and how worn is your SSD over time. If it's in good condition, I wouldn't worry.

What's the SSD you're using?

I'm guessing that kind of setup won't be powerful enough for something like hosting a Plex Server to stream x265-content to a chromecast, right?
Stream? Yes

Transcode to a different video codec? No

Maybe a NUC 8i3 with an aftermarket fanless case?
They're not low cost new, but there's a decent number of used Intel NUCs available on eBay and similar sites. They're standard PCs with low power components, so you can stick SSDs and other things into them easily. Since it's Intel platform it's also easier to power manage them with standard tools. Powertop can flip the graphics output, audio, etc. off independently and scale frequency.
I run a Ubiquiti UDM Pro as the router for my home network and slapping a few additional containers (it uses podman) on top like pi hole is doable e.g. using https://github.com/boostchicken/udm-utilities

I use it for pi hole and rclone backups.

It’s not exactly great as a home server if you want total freedom/control but it has a decent ARM SoC, a swappable 3.5“ drive bay and even though it’s got a fan I can’t hear it .

I only use it because it’s obviously running anyway and that was the least expensive way to add some things I wanted to my local network.

Oh nice! It works on the non-pro dream-machine as well.
I'm using the cheapest Synology NAS (DS119j) paired with an SSD. It runs between 10-5 watts.

However it might be a bit limited in terms of computing power to run Kodi and all the other uses you want in parallel.

It has a fan but I have never heard it make any noise.

So depending on your needs it could be an easy "setup and forget" kind of box.

My favorite platform is PC Engines APU 2. Consider something like the apu2e4 with its aluminum case and a msata card. I turn them into routers, media servers, Bitcoin nodes, etc. More expensive than Pies but I’ve had great success with them.

https://www.pcengines.ch/apu2.htm

I deployed one, it is good hardware, but the performance is pretty low, behind an rpi3.

The advantages of x86 aren't really realized because you only have serial port and run of the mill installers aren't all handling it well.

I'd only go for it for router purposes. no way you can run a re-encoder on it for media use.

Think that’s a legit take. Agree 100% about reencoding — I’ve only used it for minidlna and mpd.

I’ve also only run openbsd on apus so haven’t experienced the serial port installer issues. Didn’t know that would be an issue for modern linux. Good for others to be aware of if so.

More generally, you’re probably right that x86 doesn’t matter as much now as five years ago or so.

Deskmini with a low end pentium and an arctic 12lp.

its inaudible (I am sensitive) below 800rpm.

with ram and ssd you are at around 250 bucks.

I have an old NUC5 but its fan is whiny.

2nd hand ThinkPad. Rock solid, usually silent, with battery backup, keyboard and display.
I’m also interested! It would also be great if knowledgeable people comment on cheapest options. RPi options typically end up around $100. There once was the CHIP computer for $10 that included storage, wifi (but not ethernet), for example, but not anymore. Quantity has a quality of its own and all that...
Most routers have an OS and a hard drive. Can you take control of your router? Or, a good way to save on the overall cost, is to return the router rented to the provider, and have a router-computer.
you can attach a SSD to a RPI, but the USB interface will make it less fast than it could be
I've used a few cheap Chinese "mini PC" as found on Amazon. The model with an Atom quad core is fine for light uses (and with the built in dGPU can hardware encode with Plex, albeit not h265 10bit).

The current one I have is an Ace PC with a Pentium Quad Core - it does have a fan, but it hardly ever comes on, and it has 2.5" sata drive support in addition to the 120GB eMMC flash on board. I've got a 1TB 860 Evo in there and it's a fine lightweight server for file storage, plex, nextcloud and InfluxDB which is monitoring the various routers and computers on the network.

I left the RasPi behind for a 2nd hand Lenovo m93p tiny for about $100. (An alternative HW would be the Dell Optiplex 9020 micro). You can upgrade the RAM on these and they use standard SSDs.

I'm booting the Proxmox VM environment and it's currently running a VM and a LXC container, with lots of future opportunities.

Proxmox allows you to reserve a vm's access to the USB ports, which comes in handy if you want to attach a Zigbee stick to a virtualized home automation server.

I second that. I'm running the same machine, but without virtualization.

It's mostly idle and very power efficient, which was very important to me cause power is 35c$/kWh. Chose the version with i5-4590T.

Works out great so far.

You can add the Fujitsu Esprimo Q910/Q920 to the list of alternatives. There are many cheap options on eBay.

I also run Proxmox, with a few LXC containers and full KVM virtual machines, including a reverse proxy that routes traffic to them —- it’s great!

In the same form factor, there is also the HP EliteDesk 800 micro.
rpi can now boot from ssd via usb. but i would recommend against using rpi.

cheap, used nuc or dell / hp mini pc would be better. the power usage difference is negligible

i have few NUCs at home (5) + few rpi (3) and while it works, the support for ARM is still bad.

https://i.imgur.com/TQ0VnDJ.png

Check out reddit.com/r/homelab

I personally don't think fanless cuts it. I have an APU2 as router but don't try to use it for anything that needs CPU.

I have a Asus Ryzen PN50 as a container host for home services like media, shares, backups.

It's relatively low power, it's worth its price but it has a fan. So I keep this on a shelf in a closet out of the way.

For some Europeans: fly to US, buy Mac Mini with M1 chip for $699.

For some other Europeans: go to country with lax tax policy, fly to US, buy Mac Mini with M1 chip for $699.

You'd be set back by about 579 euro. In my country, the Mac Mini is 799 euro. So the difference is 220 euro. So if you wanted to visit the US, then it might be worth it.

The tricky part: figuring out how to do this legally. It's probably not possible where I live, but I'm sure some European countries are more relaxed with their import tax policies.

Seems a lot easier to just pay the taxes than to fly around the world in a pandemic?
I think it depends. If you decide to stay there for a month in a remote area, then you're probably doing the world a favor by not being a vector.
I'd argue that staying at home is doing the world a bigger favor, both in terms of air pollution and in terms of "being a vector". For most people it also doesn't make sense to sit around on a flight to save a couple of bucks, their time is usually more valuable than that.
I run Alpine Linux in Diskless Mode on a Raspberry Pi Zero W. Diskless means it loads the OS from SD-card into RAM on boot and then runs from there, preventing wear. I use USB for writable storage only for the (few) applications I run that require it. It suffices as a basic NAS and consumes very little power.
Intel NUCs or similar clones Lenovo ThinkCenter Tiny or HP ProDesk Mini are good candidates. They are not worth their retail price but are often sold very cheaply on second-hand markets like eBay. I have one. Very quiet things and can handle a dense amount of workloads. Memory, storage and mini PCI devices are all upgradeable.

These things consume around less than 8W at idle, so obviously they are not as low power as the RPi. But if you need to handle a lot of beefy services on the same machine then the power-performance ratio of these machines may be more attractive.

I use a mini-ITX board (GA-C1007UN), which has an embedded Celeron CPU and two GbE ports. It serves me for almost five years now as a home server, router and Wi-Fi access point. The downside is that it requires an ATX power supply and is not completely silent.