Build a NAS with Raspberry Pi 4

Hugh Greethead
Hugh Greethead
Published in
3 min readMay 10, 2020

A fun weekend project for those stuck in isolation

What is a NAS?

A NAS — Network Attached Storage, is a storage device connected to a network that allows storage and retrieval of data from a central location for authorised network users. A NAS is essentially like having a private cloud at home, and allows you to share files easily between other users of your network.

This makes a NAS great for someone who has growing storage needs that wants a lower cost (compared to cloud), more private solution and/or has multiple devices at home that would all like to access the same files in a convenient way.

A typical commercial NAS product, like the Synology NAS range can provide a solution for 4–10+ drives typically. However they can cost $1000s of dollars and may be more than what you need when you are first starting out, making the Raspberry Pi NAS solution an attractive low cost solution before deciding whether to invest into a bigger solution.

Raspberry Pi 4 — What is it and why should we build a NAS with it?

The Raspberry Pi 4 is one of the most popular prototyping boards in the world. It is essentially a credit card sized computer, able to run Linux that also has: USB 3.0 & 2.0, Bluetooth, HDMI output, audio, ethernet and wifi functionality (and probably much more that I didn’t list!). The boards typically cost between $35-$100 depending on specs, making them an extremely powerful tool for prototyping and hobbyists alike.

So if you have some spare hard drives lying around, are able to get a Raspberry Pi 4 and are willing to tinker, then this project is suitable for you!

Guide

I was able to follow this guide to implement my NAS, using 2, 2TB Seagate hard drives.

Written version: https://pchelp.ricmedia.com/build-raspberry-pi3-raid-nas-server/

I initially tried to configure with Raid 0 but had issues that were only resolved once I switched to a Raid 1 setup. I also needed to run my drives through an externally powered USB hub as the output from the Pi was insufficient, resulting in the drives powering on/off unable to provide a consistent connection if plugged directly into the provided USB 3.0 ports.

My setup:

  • Raspberry Pi 4 with 4GB Ram
  • Passive cooling Pi 4 case with cooling fans
  • 2 Seagate 2 TB Hard Drives
  • External USB 3.0 hub
  • Ethernet connection

The video guide details how to map the NAS once its setup into your windows folder viewer, as a Mac user, the process is slightly different. The following video provides a simple explanation of how to achieve the same if using Mac.

Now hopefully you are all set! There is a lot more that you can do with a NAS then just simply store files, such as using it to serve media like your own personal Netflix. What you choose to do with it is up to you.

If you run into any problems, feel free to post a comment down below or reach out to me on Twitter and I’ll see if I can help where I can!

Happy hacking.

-Hugh

I am a junior developer in training at CoderAcademy in Sydney, Australia. My interests are in programming, economics, trading and Bitcoin. Follow me on Twitter @hughgreethead

--

--