Wi-Fi & Home Networking

Setting Up a NAS for Home Backups and Files

Choose drives and redundancy, share folders, schedule backups and keep a home storage box safe from loss.

Key takeaways

  • A NAS gives every device in the house one place for shared files and automatic backups.
  • RAID keeps the box running when a drive fails, but it does not replace a backup.
  • Wire the NAS to the router, use separate user accounts and turn on snapshots where available.
  • Keep an offsite or offline copy of anything you cannot replace, and test restoring it.

A NAS, or network-attached storage, is a small always-on computer whose job is to hold files and share them across your home network. Setting one up means picking a device and drives, wiring it to your router, creating users and shared folders, pointing your computers' backups at it, and then keeping a second copy of the important data somewhere else.

That last step matters most. A NAS is a very good backup destination, but a single box in your home can still be lost to theft, fire, a power surge, a mistake or ransomware.

Decide what it is for

Write down the jobs before shopping, because they drive every other choice.

  • Computer backups need capacity for several versions of each machine.
  • A shared family file store needs user accounts and permissions.
  • A photo library needs room to grow and a good phone upload app.
  • Media streaming may need more processing power if the box converts video on the fly, as discussed in home media servers.
  • Running extra applications needs memory and a capable processor.

Add up the data you have now, then allow generously for growth and for old versions kept by backups. Replacing small drives later is possible on many systems but slow and tedious.

If you only want a copy of one laptop, an external USB drive is cheaper and simpler. If you only want files on several devices, cloud storage may be enough.

Choose the hardware

There are two main routes. A ready-made NAS from a storage vendor comes with its own operating system, a web interface and phone apps. It is the easier path. A build-your-own system uses an old or small computer with storage software such as TrueNAS or OpenMediaVault, or a plain Linux installation. It costs time and gives you control.

Whichever you pick, look for a Gigabit Ethernet port at minimum, with 2.5 Gb or faster useful if the rest of your network supports it. Count the drive bays. Two bays suit mirroring; four or more open other layouts. Check how long the vendor provides security updates.

For drives, choose models intended for continuous operation, and check the NAS maker's compatibility list. Some drive recording methods perform poorly during rebuilds, so read the specifications. Buying drives at different times or from different batches reduces the chance that they all wear out together.

Pick a redundancy layout

RAID combines several drives so the system survives certain failures. Common choices:

Layout Minimum drives Survives Usable space with equal drives
Single drive 1 No failure All of it
RAID 0 2 No failure All of it
RAID 1 2 One drive in a pair One drive's worth
RAID 5 3 Any one drive All but one drive
RAID 6 4 Any two drives All but two drives

RAID 0 spreads data for speed and loses everything if either drive dies, so avoid it for anything you care about. Many vendors offer their own flexible layouts that handle mixed drive sizes, and file systems such as ZFS have equivalents with different names.

Example: usable space from four 8 TB drives
RAID 0 (no protection) 32 TB RAID 5 (one drive may fail) 24 TB RAID 6 (two drives may fail) 16 TB Two mirrored pairs 16 TB RAID 0 (no protection) 32 TB RAID 5 (one drive may fail) 24 TB RAID 6 (two drives may fail) 16 TB Two mirrored pairs 16 TB

Hypothetical example: the numbers are made up to show the method, not a quote or an average.

These are raw figures. Formatting and system overhead reduce them somewhat.

Redundancy is not backup

RAID protects against a drive dying. It faithfully copies every deletion, corruption and encryption by malware to all drives at once. It does nothing if the whole box is stolen or flooded. Sync is not backup makes a related point.

The 3-2-1 rule is a useful target: three copies of important data, on two different kinds of storage, with one copy somewhere else. See the 3-2-1 rule.

A 3-2-1 plan built around a NAS
1 Originals on your devices Laptops and phones hold the working copy. 2 Backup to the NAS Automatic, versioned, over the home network. 3 Copy offsite Cloud service or a NAS at another address. 4 Test a restore Recover a few files on a schedule. Originals on your devices Laptops and phones hold the working copy. 1 Backup to the NAS Automatic, versioned, over the home network. 2 Copy offsite Cloud service or a NAS at another address. 3 Test a restore Recover a few files on a schedule. 4

First-time setup

  1. Install the drives following the maker's instructions.
  2. Connect the NAS to your router or switch with an Ethernet cable, and power it from a surge protector or, better, an uninterruptible power supply.
  3. Run the setup wizard from a browser or app, and install updates before adding data.
  4. Create a strong administrator password. Disable default accounts if you can.
  5. Give the NAS a stable address with a DHCP reservation.
  6. Create the storage pool and volume. Building it may take many hours.
  7. Set up email or app notifications for drive errors.

A UPS lets the NAS shut down cleanly during a power cut. Check that your model can communicate with the one you buy.

Users and shared folders

Create an account for each person, and shared folders by purpose, such as family documents, photos and backups. Give each account only the access it needs. Do not use the administrator account for daily file work.

Computers usually connect with SMB, the file sharing protocol built into Windows and also supported by macOS and Linux. Linux and some media devices may use NFS. Disable protocols you do not use, especially the old SMB version 1.

On Windows you can map a share to a drive letter, on a Mac use Connect to Server in Finder with an address beginning smb://, and on phones use the vendor's app or the built-in file browser.

Set up backups

On Windows, the built-in File History feature or a third-party backup tool can target a network share. On a Mac, Time Machine can back up to many NAS devices once you enable that option on the box. Linux users can use tools such as rsync or dedicated backup programs with versioning.

Phones can upload photos automatically with the vendor's app. Check after a week that new pictures are really arriving, because phones often pause background transfers.

Turn on snapshots if your system supports them. A snapshot records the state of a folder at a moment, so you can roll back after an accidental deletion or a ransomware attack. Limit who can delete them. How ransomware works explains why that matters.

For the offsite copy, use the NAS's cloud backup feature with encryption, replicate to a second box elsewhere, or rotate external drives that you keep at another location. Store the encryption key separately. Without it the backup is useless.

Remote access, carefully

It is tempting to open the NAS to the internet. Exposed storage devices are a popular target. Avoid forwarding ports to the admin page or file sharing. A safer approach is to connect home through a VPN, as in reaching home safely with a VPN, or to use the vendor's relay service after securing the account with two-step sign-in.

Turn off services you do not use, including automatic port opening.

When a drive fails

Redundancy only helps if you notice the failure and act. The box will usually keep working in a degraded state, which looks normal from your computer. Alerts by email or phone are what tell you that your safety margin is gone.

Before replacing anything, confirm which bay holds the failed drive using the NAS interface, because pulling the wrong one from a degraded array can destroy it. Check that your latest backup is complete. Then follow the maker's replacement steps with a drive of equal or larger size. Rebuilding can take many hours or longer, and it works the remaining drives hard, so avoid heavy use meanwhile.

If the NAS itself fails and the drives are fine, recovery depends on the maker and layout. Some vendors let you move drives to a newer model, others do not guarantee it, and plugging them into a desktop computer may require extra tools. This is one more reason for a backup you can read without that particular box.

Securing the box

Treat the NAS like any computer that holds your most personal files.

  • Use a unique, long password for each account and turn on two-step sign-in for administrators.
  • Enable the built-in firewall and automatic blocking of repeated failed logins, if offered.
  • Install only apps you need, and remove ones you tried and abandoned.
  • Keep it on your main network, away from guests and smart gadgets.
  • Consider encrypting shared folders that hold sensitive documents, and keep the recovery key somewhere safe.

Encryption protects data if the box is stolen, though settings that unlock folders automatically at startup weaken that protection. Choose according to which risk worries you more.

Performance expectations

Gigabit Ethernet moves roughly 110 megabytes per second at best. Wi-Fi clients usually get less and vary with distance. The first full backup of a large drive can take a long time, so run it overnight with the computer wired if possible. Later backups only copy changes.

Many small files copy much more slowly than one large file of the same total size. That is normal.

Ongoing care

  • Apply updates to the NAS and its apps.
  • Read the alerts. A drive reporting errors should be replaced soon.
  • Schedule periodic data scrubs and drive health tests if offered.
  • Keep dust away and give the box ventilation.
  • Restore a few files every few months, and occasionally rehearse recovering a whole computer.
  • Plan replacement when the vendor ends security updates.

Finally, write a short note explaining where the data lives and how to get it back, and store it where another household member can find it. A backup only you understand is fragile.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Wi-Fi & Home Networking →

Latest news on this topic