Raspberry Pi File Server

Friday, June 12, 2020
Tags: linux

This is just some quick notes (for myself) of how I recently setup my Raspberry Pi as a file server. The goal was to have a shared folder so that a Sonos could play music from it. The data would be backed via a microSD card plugged into USB.

  1. Update to the newest version of Raspberry Pi OS.
  2. Configure SSH (for headless mode).
  3. Use the local router to find the IP address.
  4. Add a local hostname into the router for the IP.
  5. ssh pi@raspberrypi:
    1. Update everything: sudo apt-get update && sudo apt-get upgrade
    2. Clean-up: sudo reboot then sudo apt-get autoremove && sudo apt-get autoclean
    3. Use sudo raspi-config to update some configuration (passwords, connect to WiFi, etc.)
    4. Mount the USB drive (look down for the fstab directions). (I also had to install support for exFAT at this point.)
    5. Finally, install and configure Samba.

After this the drive should be findable from the Sonos app.

We’ll see how this works after the Raspberry Pi gets rebooted at some point, will it:

  • Have the same IP address?
  • Mount the USB drive properly?