Raspberry Pi NAS with NTFS Drive – Simple Home Server Guide
If you have an unused older Raspberry Pi 2 at home and a spare external SSD or HDD and you’re not sure what to do with them, you can turn them into a simple NAS server.
Raspberry Pi is often used as a small home server, and one of the most common use cases is a simple NAS – that is, network storage that can be accessed by various devices on the home network.
This guide is written to work on common Debian-based distributions and is usable for both Linux and Windows.
Set Up Remote Desktop First
Before you start the actual installation of the NAS server on Raspberry Pi 2, it is very sensible to set up a remote desktop first.
For example, according to a guide like: Raspberry Pi 2 Remote Desktop.
This will save you time, nerves, and in practice also unnecessary mistakes that often arise when working purely via the terminal or when constantly reconnecting a monitor, keyboard, and mouse.
Remote desktop allows you to control the Raspberry Pi from another computer just as comfortably as if you were sitting directly in front of it. All configuration, package installation, and possible troubleshooting can then be done clearly in a graphical environment, which is especially useful during the initial setup of a NAS server.
Why Remote Desktop Is Important Before Setting Up a NAS
When installing a NAS server, you will deal with multiple steps at once – disk setup, folder sharing, user permissions, network services, or automatic startup after system boot. If you do not have graphical remote access at this stage, every small change means unnecessary delays.
Thanks to remote desktop, you can:
-
manage the Raspberry Pi from anywhere on the network,
-
conveniently copy commands and configurations,
-
quickly resolve errors without restarting the entire setup,
-
keep the NAS server under control even after its final placement in a case or rack.
Practical Benefits for Long-Term Operation
A NAS server is not a device you physically return to every day. Once it is running, it is usually hidden somewhere in a corner, near the router, or in a technical room. That is exactly why remote desktop is an ideal tool for later administration, updates, or system status checks.
If you already have a working remote desktop, for example using VNC Viewer, you will have a much easier start in the world of a home NAS server and avoid situations where you have to reconnect a monitor again just because of a minor adjustment.
Setting up remote desktop before installing the NAS server is not an unnecessary extra step, but a practical foundation.
Once you have access to the Raspberry Pi remotely in a graphical environment, the entire NAS setup process becomes clearer, faster, and less prone to errors.
Only then does it make sense to continue with the installation of the NAS server itself and the configuration of the storage.
Continuation – Complete Setup
Here is the complete procedure to make Raspberry Pi work as a home NAS:
An NTFS drive + Samba with password protection + automatic mounting after reboot, compatible with Debian, Ubuntu, and Windows.
Variant: an external drive connected via USB in an external enclosure.
The shared folder is named (movies).
You can name it according to your own needs.
In this setup, the NTFS disk is mounted automatically after system startup and shared over the network using Samba, allowing secure access with a username and password from both Linux and Windows systems.
1.) Connecting the External Drive
Connect the drive to a USB port on the Raspberry.
Find out where it is mounted:
lsblk -f
Example output:
sda1 ntfs movies 25E0-... /media/hdddata/movies
Create the mount directory if it does not exist:
sudo mkdir -p /media/hdddata/movies
Set permissions (for a home network):
sudo chmod -R 777 /media/hdddata/movies
2.) Installing Samba
sudo apt update
sudo apt install samba samba-common-bin
3.) Creating a Samba User
sudo smbpasswd -a hdddata
sudo smbpasswd -e hdddata
Set the password as you like
hdddata → user for accessing the share
4.) Editing the Samba Configuration
Open the configuration file:
sudo nano /etc/samba/smb.conf
4a) Global Settings
Make sure that [global] contains:
[global]
workgroup = WORKGROUP
server string = Raspberry Pi
netbios name = RASPBERRYPI
map to guest = Bad User
client min protocol = SMB2
server min protocol = SMB2
max protocol = SMB3
4b) Disk Sharing
Add this to the end of the file:
[movies]
path = /media/hdddata/movies
browseable = yes
writeable = yes
guest ok = no
valid users = hdddata
create mask = 0770
directory mask = 0770
Save: CTRL+O → Enter → CTRL+X
Restart Samba:
sudo systemctl restart smbd nmbd
Check status:
sudo systemctl status smbd
sudo systemctl status nmbd
Both should be active (running)
5.) Automatic NTFS Mount After Reboot
Open /etc/fstab:
sudo nano /etc/fstab
Add the NTFS disk line:
/dev/sda1 /media/hdddata/movies ntfs-3g defaults,nofail,x-systemd.automount 0 0
- x-systemd.automount → mounts the disk on first access
- nofail → the system boots even if the disk is disconnected
Save the file (CTRL+O → Enter → CTRL+X)
Verify mounting immediately:
sudo mount -a
lsblk
The disk must be mounted at:
/media/hdddata/movies
6.) Automatic Samba Start on Boot
sudo systemctl enable smbd
sudo systemctl enable nmbd
Samba will start automatically after every reboot of Raspberry Pi.
7.) Connecting From a Computer
Linux (Debian / Ubuntu)
In the file manager:
smb://192.168.50.52/movies
Login:
- user: hdddata
- password: the one you set
Terminal:
gio mount "smb://hdddata@192.168.50.52/movies"
Windows
In File Explorer:
\\192.168.50.52\movies
Login: hdddata + password
Tip: You can use raspberrypi.local instead of the IP address, but avahi-daemon must be installed.
Test After Reboot
Restart the Raspberry:
sudo reboot
Verify the disk:
lsblk
Connect from your computer via Samba – the disk should be visible immediately.
This completes the setup: your NTFS disk on Raspberry Pi is accessible via Samba with a password, automatically mounted on boot, and fully functional for Debian, Ubuntu, and Windows.
Samba: Wiki
When a NAS on Raspberry disconnects disks from the network by itself after a few minutes of inactivity:
Fix Raspberry Pi NAS Network Dropouts


