Raspberry Pi Self-Hosting Server

Overview

Long history:  Somewhat of  a consolidation project.  We have had a number of network services running on various RPI's over the years -   Ad blocking, IoT Bridge services, network monitors, media servers, etc.  Somewhat of a rats-nest as playthings come and go.  

ServerPi is an attempt to organize this mess by creating a home server environment that can  be used to host long-standing network services and as a foundation for future self-hosted apps.  Including a friendly web-interface for family/nontechie access.

ServerPi:  Multi Purpose Home Server

Original:   2020, 2021, 2022, 2023

Last Update:  August 2024:  Internal/External.  DietPi Update

Background & Capabilities

ServerPi was initially built to replace our undocumented  NetAidPi, which was a very old RPI (Model B!)  that had been running on the network for quite a long time  (Pi-hole, Murmer and some other services that I didn't even remember!).  

It ultimatly become THE  SINGLE home for our network services, including Apple Homekit  (replacing HomePi), Pi-Hole and many more.

It was ultimatly cloned and is now run on two subnets to limit services offered to IOT devices (Pi-Hole, Homebridge) 

... will likely continue to evolve ...

Level of Difficulty & Prep Time

Some networking knowledge is required (e.g. Static vs dynamic addressing, TCP ports, etc).   Basic Linux administration skills will also come in handy (navigating the filesystem, editing config files, etc).

Simple setup via Dietpi.  Probably <1 hour to get foundational ServerPi up and running. 

Additional time will vary depending on complexity of software installed on top of DietPi.


Hardware

ServerPi was built using spare parts (as usual). 
Current hardware looks a little like this:

Ethernet connect

*Note:  Affiliate Links, I may get kickback from Amazon if you click/buy!

Software

Here's the what/why of our ServerPi:

Step By Step

DietPi Install

Foundational OS Prep (DietPi IS RaspOS) with some handy optimized packages ...

DietPi Software

After boot, run through dietpi-software to setup ServerPi packages ... this was done in stages because major packages had a quite a few dependencies & choices.   Simply an attempt to find sequence that worked best ... 

Stage 1 -Some Foundational software.  Dietpi would install many of these but I like to know/control some of this stuff This also installs web & DB servers and PHP

82   LLMP:  Lighttpd + MariaDB + PHP

152  Avahi-Daemon: Hostname broadcast via mDNS (Zeroconf, Bonjour)    

Stage 2 - A few other HomeNet and Self-Hosting helpers
... Homer, ProFTPD, DietPi-Dashboard and grafana (so it is in only one place on our network)

77   Grafana: platform for analytics and monitoring

94   ProFTPD: Efficient, lightweight FTP server

200  DietPi-Dashboard: Official lightweight DietPi web interface (Rust)

205  Homer: Simple HOMepage for your servER to keep your services on hand

50   Syncthing: Backup and sync server with web interface


Stage 3 - These guys need to be acessible to IOT Devices

211  Homebridge: Bringing HomeKit support where there is none
... Pi-hole otes (so I don't forget).  Our Pi-Hole setup is on phys eth0, not docker.  Static IP

93   Pi-hole: block adverts for any device on your network        

Finally ... a few non-dietpi add-ons

Pull it all Together

Here's whats/where at this point (ports):

A few app touchups:

ProFTPD:   Config @  /etc/proftpd/proftpd.conf.  

DietPi-Dashboard:  Config @ /opt/dietpi-dashboard/config.toml

Grafana:  Connect via http://<ServerPi-IP>:3001

PI-Hole: Connect via http://<ServerPi-IP>/admin

Homer to tie it all together:  Config @ /var/www/homer/assets/config.yml

Homebridge:  

Lighttpd:  Config @ /etc/lighttpd/lighttpd.conf

Samba:  Config @ /etc/samba/smb.conf

Notes & Log

Tweaks/Log

September 2024:  

April 2024:  New Internet connection!  ServerPi gets Speedtest-Tracker and temporary upgrade to RPi4 for Gigabit Ethernet tests.  Breadcrumbs in case I need to revisit:

Later in October .... Have to be careful to watch requirements of Homebridge plug-in's.  Dietpi can't watch over these

October 2023 - Rebuild with fresh Dietpi (Bookworm) because Homebridge is in Dietpi's list of optimized software!

 Sept 2023 - Figuring out Portainer ... using grampsweb (geneology).  Deployed OK (watch for duplicate ports) but ate the PI alive!  

9/3/2023 - Added Avahi so we can find/access serverpi.local 

[*] 152  Avahi-Daemon: Hostname broadcast via mDNS (Zeroconf, Bonjour)