💾 Archived View for republic.circumlunar.space › users › johngodlee › posts › 2023-12-24-rpi_server.… captured on 2023-12-28 at 16:14:44. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
DATE: 2023-12-24
AUTHOR: John L. Godlee
When we lived in London we had an old HP Compaq Elite 8300 desktop tower that we used as a home server. The server ran Ubuntu minimal server 18.04 with an ethernet connection to the WiFi router. I used the server to back up important documents, and used Samba to connect our laptops to access music, movies etc.
The server was very convenient for me, but it was a bit awkward for others to connect to if they weren't familiar with network shares or SSH. Additionally, the server was quite power hungry. I set it up to wake on LAN, but this meant I was the only one in the house who could turn it on.
In our new flat I aimed to upgrade the home server setup to reduce power consumption, increase storage capacity, and improve accessibility for less techy people.
The RPi is connected to the router via a short ethernet cable, and to the SSD via USB. The RPi boots from a 64 GB Micro SD
I used zipties to mount the three bits of hardware onto a section from a plastic crate, the kind used to hold fruits and vegetables.
To play music in the living room I connected the RPi to a Yamaha CRX-M170 micro Hi-Fi system via a 3.5 mm to phono cable. Unfortunately, the 3.5 mm jack in the RPi 4 is terrible. The sound comes through very tinny with lots of interference. To get decent audio quality I had to buy an IQaudIO DAC Pro hat for the RPi. The DAC Pro connects via the GPIO pins to the RPi.
TODO => https://johngodlee.xyz//img_full/rpi_server/server.jpg Server setup mounted to plastic tray.
We don't have internet in our new flat, instead we just use our phones. The GL-A1300 router has a USB port that can connect an Android phone and use it for USB tethering. On the rare occasion that we need to connect the home LAN network to the internet we can tether a phone, but mostly we can remain offline.
The RPi runs Raspberry Pi OS Lite version 2023-12-05. This version of the OS doesn't include a desktop environment and works well as a server.
I installed Jellyfin to serve media from the RPi to all our devices. Jellyfin has an app for Android that works quite well, and a web app that is accessible over the local network that works well on laptops. Jellyfin can cast directly to a TV using DLNA.
I installed Mopidy to play music on the Hi-Fi from the RPi. I installed the Mopidy Jellyfin extension, which allows Mopidy to use the Jellyfin music library. I also installed the Mopidy MPD extension, which allows MPD clients to connect to the Mopidy instance. I installed the Mopidy MusicBox extension to provide a web client music player. I ran into a problem where Raspberry Pi OS wouldn't let me install any python packages via pip, including the Mopidy Jellyfin extension. All I had to do to fix the issue was to delete this file:
sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
It took me some time to figure out how to get Mopidy to play radio URL streams. TODO
I installed Samba to make it easier for others to add media from their devices, and I installed qBittorrent to download media directly onto the server when it's connected to the internet.