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:
- Turning a Raspberry Pi into a NAS storage server.
- Using Samba for file sharing via the SMB protocol (compatible with Windows, macOS, and Linux).
- Configuring a fixed IP address for stable network access.
- Accessing and administering the server remotely via SSH.
The main objective was to understand the basics of network and system configuration under Linux, while obtaining a practical and reusable solution.
Tech Stack
- Hardware: Raspberry Pi + 125 GB hard drive (USB)
- OS: Raspberry Pi OS (Debian-based)
- Protocols: SMB (Samba), SSH
- Language/tools: Bash (configuration scripts), systemd, smb.conf
Concepts used and developed
- Network configuration (static IP address, DHCP)
- Installation and configuration of a network service (Samba)
- Basic security (user management, permissions)
- Use of SSH for remote administration
- Concepts of
Linuxsystems, services, and automatic startup
Implementation
- I started by installing Raspberry Pi OS on the Raspberry Pi's SD card after testing Ubuntu Server
- I then connected via
SSHso that I could administer the system without needing a screen or keyboard - 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
- I connected an old 125 GB hard drive, which I configured to be automatically mounted in the
/datafolder at startup - I then installed and configured Samba for file sharing:
- I shared the
/datafolder 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
- I shared the
- 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.