Page cover image

Creating a Raspberry Pi NAS: Comprehensive Documentation

Overview

Transform your Raspberry Pi into a Network Attached Storage (NAS) device, ideal for on-the-go storage solutions or as a home NAS.

This documentation will guide you through setting up the Raspberry Pi as a NAS and installing Plex Media Server for media streaming.

Requirements

  • Raspberry Pi 4 (4GB or 8GB RAM recommended)

  • Power adapter, SD card, SD card reader

  • Case (optional but recommended)

  • USB hard drive or SSD

  • Raspberry Pi Imager software

Part 1: Setting Up Raspberry Pi as a NAS

Step 1: Prepare the SD Card

  1. Insert the SD card into your computer using the USB adapter.

  2. Use the Raspberry Pi Imager to flash the Raspberry Pi OS Lite onto the SD card.

  3. Enable SSH in the Imager's advanced options (Ctrl+Shift+X) for headless setup.

Step 2: Booting and Accessing the Raspberry Pi

  1. Insert the SD card into the Raspberry Pi, connect it to the network via Ethernet, and power it up.

  2. Find the Raspberry Pi's IP address from your router's DHCP client list.

  3. SSH into the Raspberry Pi using its IP address.

Step 3: Update and Upgrade the Raspberry Pi

sudo apt update && sudo apt upgrade

Step 4: Install OpenMediaVault

  1. Execute the OpenMediaVault installation script:

sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
  1. Access the OpenMediaVault web interface by navigating to the Raspberry Pi's IP address in a browser.

Step 5: Configure OpenMediaVault

  1. Change the admin password in the web interface.

  2. Mount the USB hard drive through the web interface under Storage > Disks and File Systems.

  3. Create a shared folder and assign privileges.

Step 6: Enable Services

  1. Enable SMB/CIFS and NFS services in the web interface under Services.

  2. Add the shared folder to each service.

Part 2: Setting Up Plex Media Server

Step 7: Install Plex Media Server

  1. Install required packages:

sudo apt install apt-transport-https
  1. Add Plex's repository to the system's software sources.

  2. Update the package list and install Plex Media Server:

esudo apt update
sudo apt install plexmediaserver

Step 8: Accessing Plex Media Server

  1. Navigate to http://[Raspberry Pi IP]:32400/web in a browser to access the Plex setup wizard.

  2. Follow the on-screen instructions to configure Plex, adding your NAS's media folder as a library.

Best Practices:

  • Always keep your Raspberry Pi and applications up to date.

  • Secure your devices with strong passwords and consider network security.

  • Regularly back up your data and Raspberry Pi SD card.

Optional Enhancements:

  • Consider using a Geekworm kit for integrating an internal SSD with your Raspberry Pi for a more compact NAS solution.

  • Explore additional OpenMediaVault plugins for enhanced functionality.

By following these steps, you'll have a portable and efficient NAS solution powered by your Raspberry Pi, capable of serving as a Plex media server and providing robust storage capabilities.

Last updated

Was this helpful?