News for hackers. Stuff that matters.
Re:Build your own private WireGuard VPN with PiVPN by ye-olde-sysrq on Friday May 05, 2023 @11:17AM (#35830328)
I run wg-easy https://github.com/WeeJeWel/wg-easy for this sort of thing. I use the docker container, and it's great. "Just works".

Also, unrelated, I just decided I don't like the sentiment of "PiMyProjectName" branding. I know most projects don't just run on a Pi, and that the intent is to say "you can self-host thing", but at this point if you want to run a home server sort of thing, just buy some cheap 100-200 dollar minipc thing. That's how much you'd pay for a Pi now anyway, and it comes with such great features as:

* just establishing an ssh connection doesn't take multiple seconds

* the ethernet doesn't go over a usb hub

* it doesn't run on an sd card that is going to fail within a year

I'm pretty dismissive of ARM chips for homelab stuff at this point. There's super cheap minipcs with "real" processors that will just destroy even an expensive ARM board.

Pi's shine with their ability to run both a real/full Linux and also do gpio type stuff that otherwise is usually an arduino board. I don't have anything against low-level programming but damn is it just a lot more fun to do in python. I love the Rpi zero w 2 products for this, just enough juice to run wifi and a python loop, plus the gpio pins. Too bad they've been sold out for literally years.

Re:Build your own private WireGuard VPN with PiVPN by lxgr on Friday May 05, 2023 @11:47AM (#35830804)
> I run wg-easy https://github.com/WeeJeWel/wg-easy for this sort of thing. I use the docker container, and it's great. "Just works".

This looks great, thank you! My current home router(s) fortunately support Wireguard natively, but I'll look into this if I'm ever again forced to use a shitty CPE.

> I'm pretty dismissive of ARM chips for homelab stuff at this point. There's super cheap minipcs with "real" processors [...]

What makes an ARM SoC a "non-real processor"? I'm typing this on a laptop with an ARM CPU, and it's the fastest hardware I've ever worked on.

Re:Build your own private WireGuard VPN with PiVPN by askiiart on Friday May 05, 2023 @12:01PM (#35831086)
Sure, some stuff doesn't run on ARM, but a lot does. Plus, you can get decent ARM processors for cheap, whereas for the same price the best you'd get would be a Celeron.
Re:Build your own private WireGuard VPN with PiVPN by sgtnoodle on Friday May 05, 2023 @03:43PM (#35834223)
The "decent ARM processors for cheap" seem comparable to a Celeron performance-wise, don't they?
Re:Build your own private WireGuard VPN with PiVPN by jmole on Friday May 05, 2023 @11:48AM (#35830808)
I’ve been curious about the performance gap here – you can open htop on a pi 4 and see that CPU utilization is relatively low, ~33% out of 400%, something like that, and yet some operations seem like they take 5-6x longer than they ought to on a “normal” computer.

Is it all down to the file system? Is the CPU just in interrupt overload all the time? I wish I had a better understanding of the issue here.

Re:Build your own private WireGuard VPN with PiVPN by znpy on Friday May 05, 2023 @12:02PM (#35831108)
What do you expect from a computer that’s completely powered with less than 10W?
Re:Build your own private WireGuard VPN with PiVPN by AnthonyMouse on Friday May 05, 2023 @12:56PM (#35832008)
CPU load metrics are averages, typically over e.g. a second. Many operations take less time than that. If something takes 300ms on a Pi and 50ms on a PC, the Pi is six times slower in observed latency but will still only show <33% CPU utilization when averaged over a second. Some of the metrics are over even longer periods of time. The Linux load average metrics are 1 minute, 5 minute and 15 minute. You can have your ssh handshake take 20 full seconds with a CPU core at 100% and still see a 0.33 load average. And having three more cores available does nothing even when the system is busy if the application is single-threaded.

The small boards also typically have much slower I/O and less memory. On a PC with 16GB of RAM running as a server, usually the whole OS will end up cached in memory. A Raspberry Pi with less RAM is more likely to have to evict from the page cache, and then read it back from a slow SD card.

Re:Build your own private WireGuard VPN with PiVPN by yonatan8070 on Friday May 05, 2023 @11:49AM (#35830824)
The Pis shine primarily in terms of power consumption, under load, a mini PC could cosume 50W, where a Pi (and other ARM boards) will do an absolute maximum of 15W. And if you have multiple devices that run 24/7, that could be a significant saving
Re:Build your own private WireGuard VPN with PiVPN by vanilla_nut on Friday May 05, 2023 @12:40PM (#35831771)
Additionally, my home Pi4 sits in a metal case that acts as a heat sink so I don't have to use a fan at all. That translates to:

- additional energy savings

- more or less eliminated need to clean out dust or eventually replace a fan

- no fan noise, a massive boon if you live in a small apartment and don't have a closet or basement you can toss the server into for noise insulation

I suppose if I did serious number crunching on my home server, I'd need something beefier... but I've been running a VPN, a Minecraft server, a streaming media server, and a DNS server on my Pi4 for more than 3 years now. Only during media scans do I feel any slowness.

Re:Build your own private WireGuard VPN with PiVPN by sedatk on Friday May 05, 2023 @01:31PM (#35832489)
There are fanless mini PCs too: https://news.ycombinator.com/item?id=35831087
Re:Build your own private WireGuard VPN with PiVPN by Lendal on Friday May 05, 2023 @12:01PM (#35831087)
Just have to pay attention and be picky while shopping for the mini pc. Yes most of them are way over 15W but you can find them under 15W. My Quieter3Q for instance is fanless & runs on a Celeron in just 15W. I love it, but one annoyance is, it does not come back on by itself after a power interruption.
Re:Build your own private WireGuard VPN with PiVPN by paol on Friday May 05, 2023 @12:21PM (#35831478)
> it does not come back on by itself after a power interruption.

Most BIOSes have an option for that. Did you check?

Re:Build your own private WireGuard VPN with PiVPN by AnthonyMouse on Friday May 05, 2023 @01:16PM (#35832315)
The trouble there is if you're actually compute bound, the Pi's performance is also a lot worse, and if you're not, you should be comparing the idle power consumption. There are plenty of PCs that idle at under 10W.

PCs also support arbitrary amounts of memory, so you can often avoid needing multiple devices by using virtualization.

Re:Build your own private WireGuard VPN with PiVPN by prmoustache on Saturday May 06, 2023 @04:27AM (#35839360)
Also, if you start piling up PIs because one won't have enough compute power and memory, you are likely to habe a lower electric footprint with a single nuc and virtualization or containers.
Re:Build your own private WireGuard VPN with PiVPN by tlamponi on Friday May 05, 2023 @01:50PM (#35832751)
But the Pi also needs to run much longer under full load to achieve the same as a modern mini PC, so it might be still canceled out in terms of total power use.

Raspberry Pi chip sets are always older (less efficient lithography/structure size) ones, as they take over the ones currently being phased out for industrial use (so they get them cheap). Those have a hard time to compete with e.g., a modern Intel N100 CPU which has a TDP of 6W but at the same time 4 cores with a max freq. of 3.5 GHz and can even use DDR5 (or LPDDR5 for low power) and is available in many form factors, often fanless with a metal body as cooler at about 150€ (if lucky) to 200€ and those models then even including (often multiple) 2.5Gb Ethernet ports and NVMe M.2 slot.

That makes it at least for me an easy choice, and I am indeed looking out for using less power but still getting stuff done somewhat quickly.

Re:Build your own private WireGuard VPN with PiVPN by zamadatix on Friday May 05, 2023 @02:01PM (#35832914)
Like others have said, the PCs you're looking at might be mini in form factor but specced more traditional desktops. There there are plenty of mini PC options that compete at 15 watts and lower range. One example I use is https://www.amazon.com/Computer-Windows-Dual-Band-Bluetooth-.... This gets you built in 128 GB eMMC, dual display output, more USB 3, about the same overall CPU performance but significantly higher single core scores, an open native SATA slot, Similarly there are boards even cheaper than this passively cooled, and will pull less than 15 watts under load as measured from the wall while being in a preassembled case.

The best part is it's easier to scale to your needs. E.g. if a single $200 box can get the latest generation CPUs that will absolutely demolish these cheap ARM boards in perf/watt, come with PCIe m.2 drives, support higher RAM limits, and have GPUs that are more on the usable side of things. As a result it can do the work of multiple devices (if you don't need them to be physically separate of course) and will last significantly longer in terms of usability.

Re:Build your own private WireGuard VPN with PiVPN by vladgur on Friday May 05, 2023 @05:30PM (#35835372)
Wow thanks for sharing. That’s a pretty amazing box, curious what it’s TDP and noise characteristics are
Re:Build your own private WireGuard VPN with PiVPN by zamadatix on Friday May 05, 2023 @05:57PM (#35835600)
Wattage for the whole thing is as mentioned, TDP of just the CPU is 4 to 6 watt (configurable). This particular one has a fan which will kick in if you run it hard for long periods, for truefanless I'd suggest the B1 instead. Or if you go for the splurge.
Re:Build your own private WireGuard VPN with PiVPN by mixmastamyk on Saturday May 06, 2023 @12:09AM (#35837884)
Any recommended without Windows around that price?
Re:Build your own private WireGuard VPN with PiVPN by mcsniff on Saturday May 06, 2023 @01:36AM (#35838369)
I've been using a few mini PCs for things where I needed a headless system, but wanted x86_64 and a little more performance and reliability than a Pi, I settled on N3350 devices like the N4 by TrigKey or the Beelink T4.

Everything I need is supported by Ubuntu server. Excellent little machines.

Re:Build your own private WireGuard VPN with PiVPN by zamadatix on Saturday May 06, 2023 @06:01AM (#35839850)
It'll run anything but if you want to avoid paying the "windows tax" out of principal the best way I've found is to buy one from Ali Express or the like. If you're in the market for the slightly higher end options they also have more varied fabless systems there too. Most of the stuff you find on Amazon is geared towards your average consumer looking for a cheap PC so come with Windows.
Re:Build your own private WireGuard VPN with PiVPN by ElectricalUnion on Friday May 05, 2023 @05:15PM (#35835234)
If you need to pull 50W from a mini PC constantly, you probably can't run that same load (without horrible latency, throughput and stability issues) on a 15W ARM SBC to begin with.
Re:Build your own private WireGuard VPN with PiVPN by victor106 on Friday May 05, 2023 @11:58AM (#35831028)
> I'm pretty dismissive of ARM chips for homelab stuff at this point

What about Mac Mini? The latest version runs on M2

Re:Build your own private WireGuard VPN with PiVPN by Lendal on Friday May 05, 2023 @12:06PM (#35831199)
The Mac Mini is pretty tempting, but I wanted something even lower-power. 15W is possible for Celeron mini pcs. They are around. I ended up getting a Quieter3Q which is a Celeron-based 15W, fanless and cheaper than a Mac Mini.
Re:Build your own private WireGuard VPN with PiVPN by AnthonyMouse on Friday May 05, 2023 @01:09PM (#35832208)
The cheapest M2 Mini is $600. That's generally overkill for personal servers. They also have an unknown reliability record, and the older Mac Minis had a tendency to eat storage devices by limiting "fan noise" until temperatures were at the upper threshold of the spec. In the new ones the storage is permanently attached, which is... worrying.

One of the better options if you don't need a lot of internal storage is old laptops. They're cheap, low power, have a built-in monitor and keyboard and you don't need a separate UPS (who cares if the internal battery "only" lasts an hour).

Re:Build your own private WireGuard VPN with PiVPN by codetrotter on Friday May 05, 2023 @12:10PM (#35831259)
> it doesn't run on an sd card that is going to fail within a year

The Raspberry Pi Compute Module 4 has variants with eMMC, which is better than using an SD-card.

Additionally, there are adapters to use NVMe drives and you can boot from them. I’ve done so with a few RPi CM4, to varying degrees of luck. One of them works perfectly, another one did not. Currently waiting for more of the same adapter I used for the first one and hopefully this will allow the additional ones to work as well as the first one is doing.

Re:Build your own private WireGuard VPN with PiVPN by sgtnoodle on Friday May 05, 2023 @01:47PM (#35832709)
The Pi 4's Ethernet is pci-e now, and its USB3 ports are as well. The USB2 ports are still terribly inefficient.

About 8 years ago, I switched my home server from a pi to an Intel baytrail based system. I put it all together myself in a cube shaped case. It is passively cooled and runs off a 12V 2A power brick. I filled the space for the PSU with two 3.5" hard drive hot swap bays. I keep one drive in and synchronized to my desktop over the network, and pop another one in when it's time to make a cold backup. It's served me very well.

Re:Build your own private WireGuard VPN with PiVPN by bombcar on Friday May 05, 2023 @01:57PM (#35832856)
If you need Pi like but not specifically a Pi check out the Rock5B: https://www.sevarg.net/2023/01/01/battle-of-the-boards-2023/
Re:Build your own private WireGuard VPN with PiVPN by joshbaptiste on Friday May 05, 2023 @02:19PM (#35833170)
Alternative SBCs I've been looking at are the Orange PI 5, Khadas VIM1S, NanoPi R6S

https://hackerboards.com/

Re:Build your own private WireGuard VPN with PiVPN by all2 on Friday May 05, 2023 @06:56PM (#35836103)
You might also take a look at https://ameridroid.com. They have a bunch of boards. The brand I'm a fan of is ODroid.
Re:Build your own private WireGuard VPN with PiVPN by slowmotiony on Saturday May 06, 2023 @05:09AM (#35839567)
The VIM1S seems almost perfect for home use, too bad it's only got a 100mbit network interface. The Nanopi R6S is more interesting but the price is crazy, it's over 200 euro on Amazon. Then again, the raspberry pi is also over 150 euro, i wish these SBCs would not be so damn expensive.
Re:Build your own private WireGuard VPN with PiVPN by txdv on Friday May 05, 2023 @02:06PM (#35832987)
Yeah, I agree, I am a geek though and wanted a linux machine with arm so I could do some assembly hacking on it (nothing serious). Just the general geek factor I think makes a lot of people buy it.

I use the Argon case with ssd over usb, since the sd cards failed like after 2 weeks. For me it is perfect, I get to host all my minimal things (vpn, ssh over it, host photos, videos, run a few services) and it is like super energy efficient, although that efficiency is more of an ego boost than actual use.

I think there are a lot of atom mini pcs which have normal ethernet and m2 connectors that are a better alternative.

Re:Build your own private WireGuard VPN with PiVPN by manmal on Friday May 05, 2023 @02:15PM (#35833129)
Indeed. You can build a power saving PC with eg a used Fujitsu D3401 board and a used Skylake or Kaby Lake CPU, or just get a used Esprimo P756/757 tower (E90+ for lower idle power) for 100 bucks or less. Those should idle at ca 15W (without spinning HDDs). And you can put in 4+ SATA HDDs, which is way more reliable than using an USB enclosure. Works great as an Ubuntu/ZFS server or with unRAID. Beats any Synology NAS in almost every metric.
Re:Build your own private WireGuard VPN with PiVPN by 0xcde4c3db on Friday May 05, 2023 @02:48PM (#35833580)
> just get a used Esprimo P756/757 tower (E90+ for lower idle power) for 100 bucks or less

Are these still readily available somewhere? All I can find are a tiny handful of $300+ listings and RAM upgrade spam.

Re:Build your own private WireGuard VPN with PiVPN by manmal on Friday May 05, 2023 @03:10PM (#35833858)
I bought a P765 tower last week for EUR 90 (incl shipping) off a German eBay listing (commercial, so I can even deduct VAT). Not sure about other parts of the world, sorry!
Re:Build your own private WireGuard VPN with PiVPN by 1vuio0pswjnm7 on Friday May 05, 2023 @05:34PM (#35835412)
Missing in this pitch for "minipcs" are some actual examples of minipcs. What are people supposed to buy. For example, PCEngines or Soekris.

What is conveniently overlooked in these neverending^1 HN comments that dismiss RPi as "inferior" is that (a) RPi is a brand, (b) people are familiar with and trust the brand and (c) when everyone is doing their projects on the same hardware it avoids compatibility disclaimers like "This is project is tested on X. It may or may not work on Y." It obviates consideration of "hardware compatibility". With the RPi people know what hardware to buy. Even if the hardware is overpriced or underpowered, synergies are created when everyone is using the same computer. IMHO, one cannot discount the value of that.

1. Eleven years and counting

Re:Build your own private WireGuard VPN with PiVPN by marwatk on Friday May 05, 2023 @05:49PM (#35835527)
I love these things:

https://www.aliexpress.us/item/3256804116114245.html

There are a few suppliers, but the 4x Intel NICs open up lots of possibilities. They're very lower power, but still fast enough to handle a lot of traffic.

I run VMWare ESXi on mine and use openwrt for my router on two ports and then a general purpose server in another VM.

Re:Build your own private WireGuard VPN with PiVPN by pbnjeh on Saturday May 06, 2023 @04:00AM (#35839206)
I have a couple of N5105 boxes I got off of Amazon on sale, but I haven't put them into use, yet.

I've never bought off of AliExpress. I'm in the U.S. Do people take precautions when ordering from them? I'm not so worried about the products, themselves. I'm worried about the use and security of my financial data.

Worried as in, I just don't know whether they are safe stewards. No experience, no one to ask. Except maybe you guys. Give them my credit card #? Generate a one time #? PayPal?

Sorry to go a bit OT, but this is yet again where I've been tempted to order from them.

Re:Build your own private WireGuard VPN with PiVPN by nprateem on Saturday May 06, 2023 @04:42AM (#35839424)
Just use a 1 time card and reinstall the OS.
Re:Build your own private WireGuard VPN with PiVPN by ChuckNorris89 on Saturday May 06, 2023 @09:54AM (#35841407)
Why stop at reinstalling the OS? You also need to throw away the PC in the dumpster of another neighborhood or city and at least use an angle grinder on the NIC and SSD. Don't forget to wipe off the fingerprints beforehand.
Re:Build your own private WireGuard VPN with PiVPN by nprateem on Sunday May 07, 2023 @07:02AM (#35850150)
No, that's excessive. I always just unsolder and replace every component, but I thought that went without saying.
Re:Build your own private WireGuard VPN with PiVPN by ciupicri on Saturday May 06, 2023 @09:54AM (#35841412)
Wgat about the firmware? Stuff like Intel ME.
Re:Build your own private WireGuard VPN with PiVPN by alsobrsp on Sunday May 07, 2023 @08:31AM (#35850779)
I buy from AliExpress often. Most recently a batch of anodized metal business cards, before that a bunch of home automation sensors. I could get the same sensor from Amazon for a lot more money, I did get one for a test piece before buying 16 of them.

My experience has always been a good one. Just be prepared to wait a while for delivery, the business cards were about three weeks.

Re:Build your own private WireGuard VPN with PiVPN by regularfry on Saturday May 06, 2023 @08:27AM (#35840693)
It's more that all the instructions you'll find assume raspberry pi os as it is the hardware. If there was more diversity of OS in everyday use you might see more fragmentation.
Re:Build your own private WireGuard VPN with PiVPN by 1vuio0pswjnm7 on Saturday May 06, 2023 @05:30PM (#35845516)
One of the other aspects of the RPi I think deserves more credit is the ability to easily boot into a variety of OS. Ideally I prefer to boot from USB or the network, but SDCard is still better than nothing. For some strange reason people try to use an SDCard in r/w mode after boot, treatng it like primary storage. IME, that is a recipe for failure. I prefer to boot to RAM. Then I might mount external storage device if I need it, but certainly not an SDCard.

Now, maybe the setup I choose is more difficult on one OS than on another. This is where RPi shines, IMO. As a project creator, I can use an OS I choose from among a variety that have been ported to the RPi, including non-popular ones, and I know every RPi user can easily run it because it's been already been pre-installed on SDCard; the RPi is not OS-specific. No pre-installtion of OS! (This pre-installation practice enabled Microsoft to stifle competition and hold back progress in computing for decades.)

Prior to RPi, many SBC only had GNU/Linux as an OS choice because that's what's popular. For example, prior to the RPi port running Plan9 required careful hardware purchasing choices. Choosing RPi, a well-known brand, is arguably much easier.

Re:Build your own private WireGuard VPN with PiVPN by MallocVoidstar on Saturday May 06, 2023 @04:25AM (#35839345)
I bought a used Lenovo mini-pc for ~$40 and it is significantly more capable/reliable than the Pi 3 it replaced. If I need non-server stuff (I2C, GPIO) I stick to microcontrollers now.
Re:Build your own private WireGuard VPN with PiVPN by regularfry on Saturday May 06, 2023 @07:02AM (#35840148)
Teeny tiny detail:

> just establishing an ssh connection doesn't take multiple seconds

That's almost certainly power saving on the WiFi. Annoying but fixable. Seems to be on by default, and a `/sbin/iwconfig wlan0 power off` line in rc.local should fix it.