Network Attached Storage (NAS)

TL;DR

Context

I wanted a small, low-power, inexpensive file server that I could access on my home network. The goal was to use existing hardware (a Raspberry Pi and an old 125 GB hard drive).

Description and goals

The project consisted of:

The main objective was to understand the basics of network and system configuration under Linux, while obtaining a practical and reusable solution.

Tech Stack

Concepts used and developed

Implementation

  1. I started by installing Raspberry Pi OS on the Raspberry Pi's SD card after testing Ubuntu Server
  2. I then connected via SSH so that I could administer the system without needing a screen or keyboard
  3. I configured a fixed IP address directly on the router so that the Raspberry Pi would always have the same address on the local network
  4. I connected an old 125 GB hard drive, which I configured to be automatically mounted in the /data folder at startup
  5. I then installed and configured Samba for file sharing:
    • I shared the /data folder with subfolders for each user.
    • I created a dedicated Samba user for each user, giving each one exclusive access to their folder and to a shared folder
    • I checked and adjusted the permissions to ensure secure access
  6. Finally, I tested sharing from several devices (Windows and Mac) to make sure everything was working properly.

Obstacles encountered

Ubuntu Server did not work properly on this Raspberry Pi model; I had compatibility and system installation issues. Installing Raspberry Pi OS bypassed these problems.

Results

The NAS is functional, accessible on the local network, and starts automatically at boot time. It allows me to easily store and share files between my devices. Above all, the project has allowed me to strengthen my skills in Linux administration and network configuration.

Code

The project does not include any application code, but several simple configuration scripts and Bash commands.