For this mini project, we will use a Raspberry Pi and install Plex Media Server.
Required Hardware 📦
- Raspberry Pi with at least 2GB of RAM
- Micro SD Card (8GB or larger recommended)
- Power supply for Raspberry Pi
- WiFi network to connect to
With the hardware ready, let’s get started! 🚀
Installing Raspberry Pi OS Lite
- Download the latest Raspberry Pi Imager from https://www.raspberrypi.com/software/
- Insert a blank microSD card into your Mac
- Open Raspberry Pi Imager and select « Raspberry Pi OS Lite (32-bit) »
- Choose the microSD card as the storage destination
- Check the « Set username and password » box and enter your desired username and password
- Check the « Enable SSH » box to allow remote connections
- Click « WRITE » to flash the microSD card
Headless WiFi Setup
- Once the write is done, re-insert the microSD card
- In the mounted « boot » volume, create an empty file named « ssh » (no extension) to enable SSH
- Create a «
wpa_supplicant.conf
» file with the following content, replacing « networkname » and « password »:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="networkname"
psk="password"
}
- Eject the microSD card and insert it into your Raspberry Pi Zero W.
SSH Connection
- Power on your Raspberry Pi Zero W, it should connect to WiFi
- Open the Terminal utility
- Type
ssh pi@raspberrypi.local
and press Enter (default password is « raspberry ») - You’re now connected to your Raspberry Pi Zero W via SSH! 🥳
Installing Plex Media Server
- Update packages:
sudo apt update && sudo apt upgrade -y
- Install dependencies:
sudo apt install gnupg2 -y
- Add Plex public key:
wget -qO- https://downloads.plex.tv/plex-keys/PlexSign.key | sudo tee /etc/apt/trusted.gpg.d/plex.gpg > /dev/null
- Add Plex repo:
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
- Install Plex Media Server:
sudo apt update && sudo apt install plexmediaserver -y
- Start the server:
sudo service plexmediaserver start
- You can now access http://raspberrypi.local:32400/web to set up Plex! 🎥
And there you have it, you’ve successfully installed a Plex media server on your Raspberry Pi Zero W by remote programming from macOS! 🎉 The steps are similar for installing other media servers like Emby.