Build an Ubuntu Samba NAS for Australian homes
A network-attached storage device keeps family photos, backups, and project files available from computers, phones, and televisions throughout the house. Building one with Ubuntu Server and Samba turns a spare mini PC into a private file server under your control, without a monthly subscription or proprietary NAS interface.
It is a practical weekend project rather than a single box-and-go appliance. You choose the disks, storage layout, access rules, and backup method, while Samba handles file sharing that Windows, macOS, iOS, Android, and many smart TVs already understand.
This guide uses a wired home network and keeps the system understandable. It avoids exposing SMB directly to the internet and treats RAID, snapshots, and backups as separate tools, because each addresses a different problem.
Match the machine to the job
Start with the files and the number of simultaneous users. A small photo archive used by two laptops does not need a rack of servers. A four-bay enclosure becomes sensible when a household stores several generations of video, large media libraries, or regular backups from multiple computers. A low-power mini PC with four or more CPU cores, 8 to 16 GB of memory, and at least two Ethernet ports is a comfortable starting point.
Give Ubuntu its own SSD when possible, particularly when the data drives are larger than 1 TB. Keep the operating system separate so a damaged file system or failed array can be repaired without reinstalling everything. NAS-rated hard drives are quieter and designed for continuous vibration and duty cycles. Ordinary desktop drives can work, but they are a poor choice for files that cannot be replaced.
Australian conditions deserve consideration before the cupboard door closes. Perth and Brisbane summers can make a poorly ventilated enclosure cook itself, while coastal locations bring humidity and salt. Choose a case with replaceable fans, avoid stacking drives tightly, and position it away from direct afternoon sun. A small uninterruptible power supply is valuable because brownouts and neighborhood outages are part of life in many Australian homes.
Gigabit Ethernet is sufficient for documents and photographs. Use 2.5 GbE or faster networking when moving large videos or making scheduled backups, remembering that the weakest device in the path limits the result. Check that the router has a spare LAN port; some NBN supplied routers do not. A small managed switch costs little and makes wiring easier.
Install Ubuntu and prepare the data disk
Install a supported Ubuntu Server LTS release, such as 24.04 LTS, onto the system disk. Select OpenSSH Server during installation so the machine can be managed from another computer. A wired connection is preferable throughout setup, although wireless can be configured later. Choose a sensible hostname, such as homestore, because it will appear in network browsers and backup logs.
After booting, sign in through the terminal and update the system:
sudo apt update
sudo apt full-upgrade
sudo reboot
Reserve the server’s address on the router after the reboot. DHCP reservations are more dependable than manually editing network settings on Ubuntu and ensure that saved bookmarks continue working when the router renews an address. Record the resulting local IP address, but do not forward its TCP port 445 through the router. SMB has no business waiting for connections from the open internet.
Identify the data disk with lsblk -f. The root disk should already contain the / filesystem, while the new disk may appear as /dev/sdb, /dev/nvme1n1, or another name. Create the storage directory, format only the intended disk, and mount it there:
sudo mkdir -p /srv/nas
sudo mkfs.ext4 /dev/sdX
sudo mount /dev/sdX /srv/nas
Replace sdX with the actual disk identifier and check it carefully; formatting removes all data on that device. Add the disk to /etc/fstab using its UUID, then confirm it mounts correctly after a restart. Two-drive RAID1 can improve availability, but it does not replace a backup and should be established deliberately rather than improvised during the first boot.
Configure Samba without opening it up
Install Samba and its diagnostic utilities from Ubuntu repositories:
sudo apt install samba samba-common-bin
Create a Linux group for authorised users and add personal accounts to it. Samba can use the same names as Ubuntu, which simplifies administration on a household system. Replace alex with the required login and run each command as that user should:
sudo groupadd nasusers
sudo adduser alex
sudo usermod -aG nasusers alex
sudo passwd alex
sudo smbpasswd -a alex
Restart the Samba services after changing group membership. The Samba password can differ from the Ubuntu password, which is useful when one login is reserved for administration. Avoid sharing the entire home directory to everyone. Personal directories and shared folders should have separate, intentional permissions.
Make a backup of /etc/samba/smb.conf, then add a restricted share:
[files]
path = /srv/nas
browseable = yes
read only = no
valid users = @nasusers
create mask = 0660
directory mask = 2770
force group = nasusers
Set ownership on the storage directory to the shared group:
sudo chown root:nasusers /srv/nas
sudo chmod 2770 /srv/nas
The setgid bit keeps new directories group-writable, allowing every authorised member to organise files without making the storage world-readable. Check the resulting configuration before restarting:
testparm -s
sudo systemctl restart smbd
Test the share with smbclient -L localhost -U alex. Current Ubuntu releases negotiate SMB2 and SMB3 by default; avoid re-enabling obsolete SMB1 support merely to satisfy an old device. If the firewall is enabled, permit SSH and Samba, then activate it:
sudo ufw allow OpenSSH
sudo ufw allow 445/tcp
sudo ufw enable
These rules provide access on the local network without publishing the share externally.
Connect the household and use the share
On Windows, open File Explorer and enter the share path in the address bar, for example \\192.168.1.50\files. Map it to a drive letter if it will be used regularly. macOS users can press Command-K in Finder and connect to smb://192.168.1.50/files. Ubuntu’s Files application can use the same address under Other Locations.
Phones and tablets generally need a dedicated SMB client. iOS and Android file managers can store the server address and Samba credentials, making it straightforward to copy photographs after a day out. Create separate accounts for family members when possible. If someone loses a phone, revoke that account without disrupting everyone else.
Australian NBN connections use a mixture of FTTP, HFC, FTTN, and fixed wireless, with different router equipment offered by providers such as Telstra, Optus, and smaller ISPs. None of that changes local sharing: files travel between devices through the home LAN and do not consume internet upload capacity. A NAS in a Perth home running on fixed wireless can still deliver full Gigabit speeds over its wired LAN connection.
Shared folders can hold documents, archived footage, or installers for an offline vintage-computer collection. Keep licence details with third-party media and verify reuse conditions through the provider or a relevant resource such as CCU ART. Plex, Jellyfin, and other media tools can read the same library, provided their service account belongs to the appropriate Samba group.
Build recovery around Australian conditions
RAID improves availability when one disk fails, but every RAID level still contains one copy of the data. Accidental deletion, ransomware, filesystem damage, and theft can affect every member simultaneously. A NAS without an independent backup remains a convenience, not a recovery plan.
Use the 3-2-1 approach: keep three copies, on two types of storage, with one copy away from the building. An external encrypted disk can hold nightly snapshots and be disconnected after each run. Another option is encrypted backup software sending revisions to a reputable cloud or off-site location. Test restoration periodically; a completed backup job only proves that software ran, not that the files can be recovered.
Australian heat, dust, storms, and power instability make monitoring particularly important. Check SMART reports, run filesystem checks during maintenance windows, and replace failed drives promptly. A UPS can keep the server running long enough to shut down cleanly, but remember that its batteries also age and require testing. For drives holding irreplaceable memories or family video, use surge protection suitable for Australian 240-volt mains equipment and avoid relying solely on a multi-outlet adapter.
Snapshots provide rapid rollback from accidental changes. They require a deliberate choice of filesystem, such as btrfs or ZFS, along enough memory and planning for restoration. For a modest first build, scheduled backup software may deliver better protection without adding storage complexity. Whatever the choice, document the recovery-key location, network address, account names, and disk replacement procedure while the system is working properly.
A dependable NAS should be quiet, boring, and recoverable, with controlled access over the home network and another copy beyond the server. The next concrete step is to create a DHCP reservation for the Ubuntu machine in the local router.