A tiny file server is not glamorous until you need a document that is on the wrong computer. A Raspberry Pi NAS gives your household one predictable place for shared files, project exports, and media, without leaving a desktop running all day.
Start with a small authenticated Samba share. Prove that you can create, read, and recover a file before making it the home of anything irreplaceable.
Pick storage with a purpose
A Pi 4 or 5, Ethernet, a suitable power supply, and a USB SSD make a practical starting combination. A separately powered enclosure can help when a drive's power demand exceeds what your setup can reliably provide.
This first exercise uses a folder in your account on Raspberry Pi OS. It deliberately does not format a drive. For a larger NAS, follow Raspberry Pi's linked storage guide to mount your chosen data disk persistently, then adapt the share path after checking its permissions.
Remember the distinction: a NAS makes files available; a backup gives you a separate recoverable copy. Moving your only copy onto a Pi does not create a backup.
Create a private share
Run these commands as your normal Raspberry Pi OS account. The directory permissions allow its owner access while keeping other local users out. The Samba password can differ from your SSH password.
sudo apt update
sudo apt install samba samba-common-bin
mkdir -p "$HOME/pi-share"
chmod 700 "$HOME/pi-share"
sudo smbpasswd -a "$USER"
printf 'Share path: %s/pi-share\nAccount: %s\n' "$HOME" "$USER"
sudo cp -n /etc/samba/smb.conf /etc/samba/smb.conf.before-openpi
sudo nano /etc/samba/smb.conf
Append the following block. Replace both YOUR_USER values with the account printed above, and use the actual share path if your home directory differs. This configuration belongs in the file, not in a terminal prompt.
[PiShare]
path = /home/YOUR_USER/pi-share
browseable = yes
read only = no
guest ok = no
valid users = YOUR_USER
create mask = 0600
directory mask = 0700
Check the configuration before restarting the service. If testparm reports an error, fix the file first.
testparm -s
sudo systemctl restart smbd
systemctl is-active smbd
hostname -I
Connect from another device
On macOS, use Finder → Go → Connect to Server and enter smb://PI_ADDRESS/PiShare. On Windows, enter \\PI_ADDRESS\PiShare in File Explorer. On iPhone or iPad, use the Files app's Connect to Server action. Sign in using the Samba account you configured.
Create a disposable text file through the share. Open it on another client, edit it, and check that the change appears. Then delete the test file. This exercises actual read and write permissions instead of just discovering a server on the network.
Grow beyond the first folder
Before moving the share to an SSD, confirm where the disk is mounted with findmnt and inspect its capacity with df -h. Use a persistent mount based on the filesystem's identity, not a device name that may change after rebooting.
Plan what happens when the drive is missing. A service can otherwise write into an empty mount-point directory on the system card. Test one reboot with the expected drive attached and verify that the share still reaches the intended filesystem before transferring a large library.
Keep it recoverable
Maintain a second copy on another device, and occasionally restore a sample file from it. Back up the Samba configuration as well as the data. Keep SMB private to your LAN or a carefully configured private network; it does not need a public router port.
If sign-in works but writing fails, check the Linux directory permissions and Samba's valid users value. If transfers stall, investigate power, USB connections, and storage errors before tuning network settings. For read-only access to a video library, the next project is a Jellyfin media server.
Sources and further reading
Researched from the official documentation linked above on September 10, 2026. Setup examples are starting points and have not been hardware-tested by Open Pi. Check your board, OS, and the project’s current instructions before installing.