Skip to main content

Hardware & OS

The Pi

This station runs on a Raspberry Pi Model B+ — an ARMv6 single-core board with 512MB of RAM, originally released in 2014. It handles continuous audio streaming, a Python API server, Nginx, and cron jobs without breaking a sweat. Any Pi will do; newer models give you more headroom.

OS: Raspbian 12 (Bookworm). Install the Lite image — no desktop needed.

Setting Up Raspbian

Download the Raspberry Pi Imager and flash Raspbian Lite to a microSD card. Before writing, use the Imager's advanced options to:

  • Set a hostname
  • Enable SSH
  • Configure your Wi-Fi credentials (or plan to use ethernet)

Boot the Pi, find its IP on your router, and SSH in:

ssh pi@<your-pi-ip>

Run the standard first-boot steps:

sudo apt update && sudo apt upgrade -y
sudo raspi-config # set locale, timezone, expand filesystem

Mounting the NAS

The music library lives on a NAS, mounted over SMB (Samba). Install the CIFS utilities:

sudo apt install cifs-utils -y
sudo mkdir -p /mnt/music

Create a credentials file so your NAS password isn't sitting in /etc/fstab:

sudo nano /etc/samba/credentials
username=YOUR_NAS_USERNAME
password=YOUR_NAS_PASSWORD
sudo chmod 600 /etc/samba/credentials

Add the mount to /etc/fstab:

//YOUR_NAS_IP/path/to/Music /mnt/music cifs credentials=/etc/samba/credentials,uid=mpd,gid=audio,file_mode=0644,dir_mode=0755,iocharset=utf8,_netdev,x-systemd.automount 0 0

Key options:

  • uid=mpd,gid=audio — MPD needs read access to the files
  • _netdev — tells systemd to mount after the network is up
  • x-systemd.automount — mounts on first access rather than blocking boot

Test the mount:

sudo mount -a
ls /mnt/music
tip

If the mount fails after a power cut, run sudo mount -a to remount. A watchdog script can automate this — covered in Operations.