How to Harden a Synology NAS: A Practical Security Guide

14 min read188 courses on OnlySecurity

OnlySecurity guide2 to 4 hours to applyFree to read

A NAS holds the files you cannot afford to lose and cannot afford to leak. Synology gives you strong security tools, but most of them are either off or loosely set out of the box. This guide takes you from a default install to a properly locked down device, explains the reasoning behind each setting so you can adapt it, and finishes with the question most guides skip: what happens if someone simply picks the NAS up and walks out with it.

Who this is for

Anyone running a Synology NAS at home, in an office or in a small business, on DSM 7 or later. You do not need to be an IT specialist. If you can open Control Panel, you can follow this. A few features mentioned here need DSM 7.2 or later, and each one is flagged where it appears.

What you will end up with

A NAS that is hard to break into over the network, hard to damage with ransomware, recoverable if something goes wrong, and, if you choose, locked even if it is stolen. You will also have a one page checklist at the end to print and keep.

How to think about NAS security

It helps to picture security as layers, because no single setting protects you from everything. A strong password does nothing against someone who steals the box. Encryption does nothing against an attacker who logs in as you. A backup does nothing if you never test it. Each layer covers a gap the others leave open, and the aim is to make sure that no single failure exposes your data.

Physical: locked room, fixed down, serial recorded Network: off the internet, firewall, Auto Block, TLS, unused services off Accounts: unique admin, strong passwords, 2FA, least privilege Data: encryption, snapshots, immutable copies Your files plus an offsite, encrypted backup you have tested
Each layer covers a gap the others leave. If one fails, the next still stands.

Before changing anything, take ten minutes to write down what is on the NAS, who needs access, and what would hurt most if it leaked or vanished. That answer shapes every choice below. A shared drive of public brochures needs less than a share of customer records and bank details.

Make one change at a time. Backup jobs, sync tasks, mapped drives and apps can break when you tighten a setting. Change one thing, check that your normal routines still work, then move on. It is much easier to find the cause that way.

1. Start with Security Advisor

Security Advisor is built into DSM and is the quickest way to see where you stand. It scans your settings, compares them with a security baseline and gives you a list of things to fix. Synology’s own security article names it as the first step, so start here and run it again at the end to see how far you have come.

You can pick a baseline. A community guide recommends the business baseline even for home users, because it is stricter and surfaces more issues. If you are not sure, choose the stricter one and work through the results. Some findings will not apply to your setup, and that is fine as long as you understand why you are ignoring them. Schedule a scan to run regularly, at least monthly if other people use the device.

The Security Baseline dialog in DSM Security Advisor with two choices, For home and personal use and For work and business, and the work and business choice selected
Security Advisor asks what you use DSM for the first time you open it. Choose work and business for the stricter set of checks.

2. Accounts and passwords

Most real world NAS compromises start with an account, not a clever exploit. Someone guesses a weak password, reuses one leaked elsewhere, or finds a default account that was never disabled. Closing these gaps is cheap and has a large effect.

Disable the built in admin and guest accounts. Attackers always try the name “admin”, so removing it takes away their easiest guess. Create a separate administrator with a different name and a long, unique password from a password manager, and use that account only for administration. For everyday file access, give people their own ordinary accounts so that a stolen everyday password never gives away control of the device.

Set password rules for every user, covering minimum length and complexity, and consider expiry for shared or older accounts. Then look at permissions. Give each person access only to the shared folders they need. It is tempting to put everyone in the administrators group to avoid permission problems, but doing so turns every stolen password into a full compromise.

3. Two factor authentication

A password alone can be guessed, phished or leaked. Two factor authentication asks for a second proof, usually a code from an authenticator app, so a stolen password is no longer enough. Turn it on for your administrator account first, then require it for other users where you can.

On DSM 7.2 and later there is also adaptive login protection, which asks for an extra confirmation when an administrator signs in from somewhere untrusted. It is a useful safety net for the account that can do the most damage.

Keep your recovery codes offline. Print them or store them in a password manager that does not depend on the NAS. If your only copy is on the NAS you are locked out of, they will not help when you need them.

4. Updates and packages

Security fixes only protect you once they are installed. Turn on automatic DSM updates and package updates, or at least check weekly. Many attacks on NAS devices in recent years have used known flaws that already had a patch available.

Review the packages you have installed and remove those you do not use. Every package adds code that must be kept patched, and forgotten packages are a common weak point. Finally, check that your model is still supported. When a model reaches end of life it stops receiving security fixes, and from that point it should not hold anything important or be reachable from outside your network.

5. Network exposure

The single biggest improvement you can make is keeping the NAS off the public internet. A device that cannot be reached from outside cannot be attacked from outside. This one choice removes most of the real world risk, which is why it is worth being strict about.

Do not forward ports on your router to the NAS unless there is a clear reason. If you need remote access, use a VPN or a tunnelling service so the NAS itself is never directly exposed. Turn off QuickConnect if you do not use it, since it exists to make the device reachable from outside.

Then turn off the services you do not need. Telnet, FTP, AFP and SMB1 are old and weak. SSH and SNMP are useful but add exposure, so leave them off unless you actually use them, and where you do need SSH, use keys and limit it to a management address. Synology also lists changing the default management ports. It cuts down on automated noise, but treat it as a minor measure and not a defence. In DSM 7, the web ports live under Control Panel, Login Portal, DSM.

6. Firewall, Auto Block and DoS protection

The built in firewall lets you decide who can reach which service. Create allow rules for the networks and addresses that genuinely need access and finish with a deny rule for everything else. In particular, restrict the DSM admin ports (5000 and 5001 by default) to the machines you use for management. A visitor on guest Wi-Fi then cannot even reach the login page.

Auto Block and account protection lock out addresses and accounts after repeated failed logins, which defeats most brute force attempts. DSM 7.2 extended Auto Block to cover SMB file sharing connections as well, so keep it on and keep DSM updated.

DoS protection is also on Synology’s list. On a NAS that only serves your own network the benefit is small, so treat it as optional. If you enable it, watch that your backup and sync jobs still run at normal speed for a few days, and turn it off again if it causes trouble.

The Firewall tab in DSM Control Panel, Security, with Enable firewall ticked, the default firewall profile selected and an Edit Rules button
Control Panel, Security, Firewall. Tick Enable firewall, then use Edit Rules to allow only the networks and services you need.

7. Protecting data in transit

Encryption in transit stops anyone on the network path from reading or changing what moves between your computer and the NAS. Force HTTPS for DSM and redirect plain HTTP. Set the TLS profile to modern unless you have an old client that cannot cope. Use a valid certificate where you can, so that a certificate warning means something rather than being routine noise people click through.

For file sharing, turn off SMB1 and prefer SMB3. For shares that hold sensitive material, turn on SMB encryption so the files are protected while they travel across your network.

8. Ransomware and backups

Ransomware is the threat most likely to reach a well configured NAS, because it often arrives through a user’s computer that already has access to the shares. Your defence is the ability to recover, so plan for the day it happens.

The classic rule is three copies of your data, on two kinds of storage, with one copy offsite. A NAS on its own is not a backup. If it is the only place a file exists, it is not protected from fire, theft or a bad update. Encrypt your backups and check where every copy ends up, because an unencrypted backup undoes the work you put into the NAS.

Snapshots give you point in time history on the NAS, so you can roll back a share to before an incident. Keep enough history to cover problems you notice weeks later, not just yesterday. On DSM 7.2 and later, immutable snapshots in Snapshot Replication and WriteOnce shared folders cannot be changed or deleted for a set period, even by an administrator account that has been compromised. For backups, that is the strongest protection available to you.

Test a restore. A backup you have never restored from is a hope, not a plan. Pick a folder, restore it to a different location and open some files. Do this at least once, and again after any major change.

9. Logging and alerts

Good settings only help if you notice when something goes wrong. Turn on notifications by email or push for failed logins, blocked IP addresses, disk errors and available updates. Look at Log Center and the list of current connections after anything unusual, such as slow performance or an unexpected reboot. It is worth setting an alert for when a new administrator account or package appears, because attackers often add one to keep access.

10. Encryption at rest and the reboot question

Encrypting a shared folder protects the data stored on the disks. If someone removes a drive, they cannot read it. The decision that matters most is whether the NAS unlocks that data by itself every time it starts up.

Auto-mount NAS powers on Reads key storedon the NAS itself Share unlocks alone Stolen NAS can unlock itself Manual unlock NAS powers on Share stays lockeduntil you log in You paste the key Stolen NAS stays locked Key server (KMIP) NAS powers on Asks your key serverfor the key Volume unlocks Volumes only, needs your network
Three ways an encrypted share can come back after a reboot, and what each means if the NAS is stolen.

Auto-mount

You store the key in DSM Key Manager and tick the option to mount on startup. After a power cut the NAS recovers by itself, and your containers, backup jobs and sync tasks carry on without anyone being there. The trade-off is that the key lives on the NAS. If someone takes the whole device and switches it on, it can unlock its own share. Your 2FA, firewall and strong passwords all help against network attackers, but none of them help once the device is physically in someone else’s hands. A 2019 forensic analysis by Elcomsoft of Synology’s older shared folder encryption found that a key stored in Key Manager could be recovered from the drives, because the key is wrapped with a passphrase that is the same on every unit. That research looked at older DSM, so check how your own version behaves before relying on it either way.

Manual unlock

You keep the key out of the NAS entirely, in a password manager plus one offline copy, and paste it in after login whenever the NAS restarts. A stolen NAS stays locked because the thief has the hardware but not the key. The cost is convenience: after a power cut the share stays locked until someone acts, and anything that depends on it will fail or wait.

A separate key server

On DSM 7.2 and later, encrypted volumes can fetch their key from a remote KMIP server at startup. The NAS recovers unattended but cannot unlock itself once it leaves your network. Synology documents this on its KMIP help page, and third parties publish integration guides. It applies to encrypted volumes, not encrypted shared folders, so it needs a supported model, a second Synology or a KMIP server, and recreating and migrating the volume if you use shared folder encryption today. We also could not find an official statement on how auto-mount behaves alongside a KMIP vault, so test on a spare system first.

OptionAfter a power cutIf the NAS is stolenBest for
Auto-mountRecovers aloneCan unlock itselfLow theft risk, non sensitive data
Manual unlockWaits for youStays lockedThe sensitive share only
KMIP key serverRecovers if the key server is reachableStays locked away from your networkNeeds both, and the hardware supports volumes
Export the key and keep an offline copy. Whatever you choose, losing the key means losing the data. Store it away from the NAS, and keep a second copy somewhere safe.

If you choose manual unlock, first list everything that depends on the share being there at boot, such as Docker containers, backup jobs, Cloud Sync and mapped drives on other computers. Those will fail until someone unlocks the share.

11. Physical security

Everything above assumes the NAS stays where you put it. A stolen NAS bypasses your passwords, 2FA and firewall completely, which makes physical security the layer people most often neglect. Encryption is your last line of defence, not a substitute for it.

Put the NAS in a locked room or cabinet and fix it to something solid. A cable lock or a purpose built enclosure turns a thirty second grab into a job that needs tools and time. Record the serial number and add it to your asset list so you can report it and recognise it. Think about where your backups live too. If the offsite copy sits in the same building, a fire or a break in takes both.

1Locked room or cabinetKeys controlled, door closed when nobody is there 2Fixed to something solidA shelf or rack that needs tools to move, not a desk top 3Cable lock or secure enclosureTurns a thirty second grab into a job that needs time and tools 4Serial number recordedOn your asset list, so you can report it and recognise it 5Offsite, encrypted backupSo a theft or a fire does not take every copy
Five physical steps, from a locked room to an offsite copy.
If the NAS were stolen tonight,would that be a serious problem? No Yes Auto-mount is fineKeep the network layers strong Do you need it torecover unattended? No Yes Manual unlockFor that share only Encrypted volumewith a key serverif the model supports it
Start with what a theft would cost you, then work down.

Common mistakes

Treating the NAS as the backup

If the NAS holds the only copy of your files, one fire, theft, bad update or ransomware run can end them. The NAS is the primary store. The backup is somewhere else.

Exposing it for convenience

Port forwarding “just for a week” tends to last for years. Use a VPN or tunnel and leave the NAS unreachable from outside.

Leaving the setup undocumented

A hardened NAS that only one person understands is a risk too. Write down the admin account name, where the recovery codes and encryption key live, and how to restore from backup, and store that somewhere other than the NAS.

Assuming hidden means secure

Hiding a share or giving it an obscure name does not protect it. It hides it from casual browsing and nothing more.

Never testing

Restores, alerts and key recovery all need to be tried before the day you need them. Schedule a short test every few months.

The printable checklist

  • Run Security Advisor and note the result.
  • Disable the admin and guest accounts. Create a new administrator with a strong unique password.
  • Give each user only the permissions they need.
  • Turn on 2FA and store recovery codes offline.
  • Turn on automatic DSM and package updates. Remove unused packages.
  • Confirm your model is still supported.
  • Keep the NAS off the internet. Disable QuickConnect. Use a VPN for remote access.
  • Turn off services you do not use, including SMB1.
  • Enable the firewall, restrict DSM admin ports, turn on Auto Block.
  • Force HTTPS with a modern TLS profile. Use SMB3, with encryption on sensitive shares.
  • Enable snapshots and, on DSM 7.2 or later, immutable snapshots for backups.
  • Keep an encrypted offsite backup and test a restore.
  • Turn on notifications and review logs.
  • Decide auto-mount or manual unlock for each encrypted share. Export the key and keep it offline.
  • Secure the NAS physically and record the serial number.
  • Run Security Advisor again and compare.

Questions people ask

Is a Synology NAS safe to expose to the internet if I harden it?

Hardening reduces the risk, but it does not remove it. A device that is reachable from outside is reachable by everyone, and new flaws appear regularly. Keep it internal and use a VPN or tunnel for remote access.

Do I need all of this for a home NAS?

Not every step matters equally. The ones that matter most are updates, 2FA, a strong unique admin account, keeping it off the internet, and a tested offsite backup. The rest builds on those.

Will manual unlock break my apps?

Anything that uses the encrypted share will wait or fail after a reboot until you unlock it. Applications on other shares are unaffected. Check what depends on the share before you switch.

Can I get unattended recovery and theft protection together?

Possibly, using an encrypted volume with a KMIP key server on a supported model. It is a bigger project than changing a setting, and it adds a second system you must keep running and backed up.

How often should I review all this?

Run Security Advisor monthly, test a restore every few months, and review the checklist after any major DSM update or when you add users, packages or services.

Sources and further reading

This guide is general information, not a security audit of your device. Menu names vary between DSM versions, so check yours, and test changes on non-critical data first. Questions? Visit support.onlysecurity.com.

More from this author