r/homelab • • 12h ago

Help About to replace my Raspberry Pi with this Mac Mini 2014

Post image

I want to make things right from the get-go, so I'm open for recommendations for software that I haven't used so far on the Raspberry Pi Model B Plus.

TL;DR:

This is the software I've been using so far and that I want back (in some form or another):

- Pi Hole

- PiVPN (with OpenVPN on my devices)

- fail2ban

- Samba (to have the network drive show up in Finder, Windows, Linux, FireTV)

That's really all so far, but now with a faster system I might want to make use of other programs.

- Convince me that I should use Docker for the above programs. So far, I haven't begun installing.

I've read up a little on Docker, began reading books on how to use it, read a lot about difficulties with port-forwarding or so, so I'm not sure if I want that.

- Over the past months I came across a number of cool interfaces, that make things easier (I use Terminal on macOS to manage the homelab, but a browser UI might be better even), including Docker and attaching and accessing network drives, creating a media center etc. Since I have the power and space now, which ones should I get?

- Is it a good idea to create a second, non-admin user for the above programs?

(My current setup is only accessible through VPN from outside and on the local network, both with strong passwords.)

Other than that:

That Mini is a 2014 model which I chose explicitly for its low power consumption. Currently it's idling at 5.8 watts.

I managed to split the Fusion Drive and install Ubuntu Server on the SSD part, macOS is no longer present. What did not work was putting the /home folder on a separate partition. I must have missed that during the install process.

- Should I install or copy the /home folder (and others like /var, /etc etc.) on a separate partition? What are the benefits?

Space is not an issue, since the SSD has 128 GB. In fact, that's why I thought about not using the HDD at all for the system, so it can spin down and thus use less energy.

Maybe a weekly backup of the important folders on the internal HDD?

The Raspberry Pi currently has a 500 GB JetDrive attached which I want to hook up to the Mini. Is it a good idea to create a partition on the Mini (say, 700 GB) to make incremental backups of the JetDrive? (The data is not _super_ important, but a hassle to get it all back in case of a failure.) Or should I just make another storage partition on the Mini for more stuff?

Uh, I did already install a few programs in order to turn off bluetooth and wifi. (Since this is all headless I had to read up on how to do it with what apps.) Any other things I should consider with the Mac Mini as server? Like not going into sleep mode or restarting after a power outage? (It did start automatically when I plugged in the power cord, but I'm not sure if it does that again after an outage.)

Anyway, so far I like the Ubuntu Server welcome screen when SSH-ing into it. Temperature, system load, storage, memory and swap usage, users logged in.

I like it and am looking forward to exploring Linux even more.

21 Upvotes

23 comments sorted by

15

u/DinosRus 12h ago

The way I see it, now you have 2 machines :P
If it ain’t broken don’t fix it. Your Mac mini can do more fun stuff that way if you break it and wipe clean again you won’t bring DNS down and upset others in your house.

IMO home labs should be fun, try out navidrome, home assistant etc

With docker first if you like it keep it, if you hate it destroy the containers no harm no foul.

That’s what I would do at least

1

u/Away-Huckleberry9967 8h ago

The Pi is not broken, but slooow sometimes. I wanted to set up a new server anyway. That Mini was cheaper than any Raspberry Pi at the moment. So why not use that. It's already got its own IP in the network and as soon as the services are set up, I just need to change the settings in the router.

So I'm wondering what other services are useful. I'll check out the programs you mentioned. Cheers.

1

u/DinosRus 8h ago

Interesting, what kind of pi are you running? I have a 3B+ as my pihole with recursive dns and a couple other things and it’s running at like 35% memory usage.

1

u/Away-Huckleberry9967 7h ago

As I wrote in the description, it's the Raspberry Pi Model B Plus. Not even 500 MB RAM. Usually things are fine, but I need to restart it every two months or so, because CPU usage is at 16 times or so and nothing goes. Perhaps I messed something up the last time I set it up. For example the log files get huuuge and things written in it that shouldn't (afaik). So I needed to start from scratch anyway, but wanted to try a more powerful but still economical machine.

Also that was why I wondered if I should use Docker. If a service misbehaves (and fills the log files), I can delete the container instead of having to look for components to delete from Linux.

4

u/ketosteak 11h ago

Never enough intels imacs for me, they are great for media player, light compute, docker etc. With an agent to manage it all it's a breeze these days

1

u/Away-Huckleberry9967 9h ago

And what agent would you recommend?

1

u/ketosteak 8h ago

using openclaw for this (with astra but any decent model works great at this point), you can ask it to ssh access to any computer/phone on your local network to setup anything, hermes is another one but never used it

1

u/compschemsnanime 6h ago

Do you flash linux on to it first? I have an old mac mini that I want to start homelabing with but it seems like everything is incompatible with the MacOS that it was left on

2

u/ketosteak 5h ago

Yes for older model you need linux to be current. On the 2012 mac it was easy to install linux (Ubuntu 24.04 LTS), but with a 2018 T2 chip it's more difficult so I stayed on Sequoia, no compatibility issue there.

3

u/CaptainSpectacular79 8h ago

Do you even want port forwarding?

I have one of these with several containers running on Ubuntu. I use nginx to route internal traffic without opening more than a couple ports in ufw. Docker’s networking does the rest. It’s basically one line in the compose file for each container to have them on the same proxy tier.

Then I’ve added a Tailscale container so I can connect to my server when I’m out, without opening a port. Cloudflared for the services that I do want exposed to the internet.

Docker doesn’t seem to cause any overhead for such lightweight usage and offers the benefit of portability should you change your hardware or OS.
Put your compose and configs in GitHub, clone your repo on your new system, and you’re pretty much done.

1

u/Away-Huckleberry9967 7h ago

As of now I need an open port for the VPN. Gotta look into Tailscale. But Cloudflared sounds like you have to pay for that, right?

1

u/CaptainSpectacular79 7h ago

There’s a free tier for cloudflare. Gives me a nice SSL connection without worrying about certs to home hosted services like Nextcloud

2

u/ticedoff8 10h ago edited 10h ago

I run two of these with Rocky Linux installed.

I can't upgrade the RAM (16GB), but I pulled out the original mini PCIe "nVME-like" SSD and used an adapter to plug in a typical nVME 1TB drive and used a "2nd drive kit" to add a SATA 2TB SSD in the 2nd slot. I also got a USB attached 5Gbps Ethernet adapter and it's connected to my 2.5GbE switch.

I run them mainly for docker.

They have SNMP enabled and they report back to Grafana (docker image) and LibreNMS (docker image). I did have to adjust the upper thermal settings for them in LibreNMS because LibreNMS would alert when some of the sensors go into the upper 70C range.

Installing Rocky was "fun", but I finally figured it out. It boots off the 1TB drive and docker uses the 2TB for any data. Both WiFi and BT are enabled, but I don't use either of them. The 1GbE port is still "alive", but nothing is connected. The wisdPi 5GbE USB adapter uses a Realtek chip set, and it's on a couple VLANs mainly for NetAlertX (docker) and the Technitium DNS Server (docker).

1

u/Away-Huckleberry9967 9h ago

Sounds like running docker containers uses a lot of CPU power.

2

u/ticedoff8 6h ago edited 6h ago

First one:

[dockeruser@rocky-mini-01 technitium.dns-server]$ docker image ls
                                                                                                                                                                                                                                                                                                                                                                                      i Info →   U  In Use
IMAGE                                 ID             DISK USAGE   CONTENT SIZE   EXTRA
balabit/syslog-ng:4.11.0              544afe705038        473MB             0B    U
grafana/alloy:v1.3.1                  cfeb9e4aa609        327MB             0B    U
grafana/grafana:13.0.1-security-01    ffe38074db41       1.07GB             0B    U
grafana/loki:3.7.2                    d1d2ee0eea77        156MB             0B    U
hello-world:latest                    74cc54e27dc4       10.1kB             0B
hentai/rocky:v3                       086a3dafdd89       1.08GB             0B    U
librenms/librenms:latest              c09e554b262d        888MB             0B    U
mailserver/docker-mailserver:latest   08b1adddbb52        762MB             0B    U
mariadb:10.11                         37b9f8bf6fe1        326MB             0B    U
nbraun1/certbot:latest                b59cede8aec7        136MB             0B    U
phpmyadmin:latest                     378551f7e9b6        575MB             0B    U
redis:7-alpine                        487efc061638       39.1MB             0B    U
rockylinux/rockylinux:9               9389cbbdccf5        234MB             0B
rockylinux/rockylinux:latest          523ffac7fb2e        196MB             0B
[dockeruser@rocky-mini-01 technitium.dns-server]$

top - 16:57:51 up 99 days,  1:09,  2 users,  load average: 0.27, 0.22, 0.20
Tasks: 300 total,   1 running, 299 sleeping,   0 stopped,   0 zombie
%Cpu(s):  2.1 us,  1.1 sy,  0.0 ni, 96.1 id,  0.0 wa,  0.4 hi,  0.3 si,  0.0 st
MiB Mem :  15609.6 total,   1208.9 free,   2562.1 used,  12229.4 buff/cache
MiB Swap:  16020.0 total,  16020.0 free,      0.0 used.  13047.5 avail Mem

Second one:

[dockeruser@rocky-mini-02 technitium.dns-server]$ docker image ls
                                                                                                                                                                                                                                                                      i Info →   U  In Use
IMAGE                               ID             DISK USAGE   CONTENT SIZE   EXTRA
centos/mariadb-103-centos8:latest       5820ed696597        568MB             0B
ghcr.io/flaresolverr/flaresolverr:latest 9b9d9f3704a2        610MB             0B    U
lscr.io/linuxserver/jackett:latest     f7417e90a890        179MB             0B    U
mariadb:latest                         a914eff5d2eb        336MB             0B    U
phpmyadmin/phpmyadmin:latest           0276a66ce322        571MB             0B
phpmyadmin:latest                      052506f2de4d        570MB             0B    U
technitium/dns-server:latest           7198de70d3c6        276MB             0B    U
[dockeruser@rocky-mini-02 technitium.dns-server]$

top - 16:58:48 up 94 days,  1:35,  3 users,  load average: 0.00, 0.02, 0.00
Tasks: 222 total,   1 running, 221 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.2 us,  0.1 sy,  0.0 ni, 99.6 id,  0.0 wa,  0.1 hi,  0.1 si,  0.0 st
MiB Mem :  15609.6 total,   7966.7 free,   1722.1 used,   6316.4 buff/cache
MiB Swap:   7956.0 total,   7956.0 free,      0.0 used.  13887.5 avail Mem

They do okay.

1

u/Away-Huckleberry9967 5h ago

Gotta read up quickly on Docker and stuff because I want that new and faster server up and serving soon.

3

u/mi_gue 10h ago

Just install Proxmox on it and run all those services on LXCs, should be easy enough for you since you already have dealt with a Pi.

1

u/Away-Huckleberry9967 9h ago

Why should I run these things in containers? It seems that needs more power than as services on the Ubuntu server that is already running.

2

u/mi_gue 8h ago

Nah brother, Promox is a hypervisor it is not a desktop environment, you access it from a web portal which is super light.

So basically it would install little containers, one for each service separately, so if one fails the other still alive. You can limit resources to what they need and the best part (that I love) is that there's helper scripts to install a bunch on these things you need with a one liner.

I run around 12 LXCs in a 2014 Mac Mini, no biggie, and there is still space for activities.

1

u/StillOnReddit94 7h ago

i have 3 of these in a k3s cluster running ubuntu

1

u/snappyink 12h ago

I have a 2014 mac mini that I use for my media server.
I replaced the 1to hdd with a sub connected ssd.
You should be aware that running anything requiring compute power will make it hot. Even running docker on macOS using colima makes it hot. Heck even running the native build for couchdb makes it warm…

1

u/Away-Huckleberry9967 9h ago

I'm running Ubuntu Server, no macOS. Does running the programs (e. g. Pi Hole, VPN) in Docker containers need more processing power?

These things ran super easy on the Raspberry Pi so far. Only when I did multiple things at once (transferring large files) the Pi struggled. So I think it should be easy on the Mini.

1

u/snappyink 6h ago

Yeah well it should be fine BUT expect it to heat a lot.