Install Wireguard on your Synology NAS

WireGuard is a new, modern and open-source VPN protocol. You might have heard about it as it has been merge a exactly a year ago in the Linux core.

Install Wireguard on your Synology NAS

What is Wireguard?

WireGuard is a free and open-source software application and communication protocol that implements virtual private network techniques to create secure point-to-point connections in routed or bridged configurations

WireGuard is a new, modern and open-source VPN protocol. You might have heard about it as it has been merge a exactly a year ago in the Linux core.

Is my VPN Provider compatible?

Some of the most famous providers already offer WireGuard through their mobile or desktop applications and some of them also provide configuration files for custom install!

WindScribe: https://blog.windscribe.com/introducing-wireguard-76a1670700a6
NordVPN: https://nordvpn.com/fr/blog/nordlynx-protocol-wireguard
ProtonVPN: https://protonvpn.com/blog/wireguard-donation

How to use it on my Synology NAS?

I have recently discovered a GitHub project which let you build your own custom Synology package, fully compatible with your Synology NAS to let you use the "wg" and "wg-quick" commands of WireGuard.

The first step is to identity the CPU architecture your Synology NAS is running and to ensure your Kernel is above 3.10.

You can easily check all of that by searching for your Synology NAS model in the official documentation: What kind of CPU does my Synology NAS have?.

As soon as you have identity it, you can either download a pre-built version in the GitHub releases section or you can built it yourself.

Pre-built versions

It's pretty straight forward, you just have to download the .spk file matching your Synology NAS' CPU architecture.

WireGuard for Synology v1.0.20200729 releases

Manual build

To build manually your package, you will have to run the following commands:

  1. Connect to your Synology NAS via SSH and use a folder dedicated for that purpose
    cd /volume1/testing
  2. Download the source code from GitHub
    git clone https://github.com/runfalk/synology-wireguard.git
  3. Browse the source code's folder freshly cloned
    cd synology-wireguard/
  4. Start the building process
    docker build -t synobuild .
  5. Generate the package matching your Synology NAS' CPU architecture. On my side, it's "braswell" with DSM 6.2
    docker run --rm --privileged --network=host --env PACKAGE_ARCH=braswell --env DSM_VER=6.2 -v $(pwd):/result_spk synobuild
  6. You can find the .spk file in the WireGuard. Version number will change so use the tab key.
    cd WireGuard-0.0.20210124 && ls *.spk
Build result: Success!

Package installation

You can now easily install the package with this command line or through the DSM interface: synopkg install WireGuard-braswell-1.0.20210124.spk

To activate the package, just run synoservice --start pkgctl-WireGuard.
Use synoservice --status pkgctl-WireGuard to check if the package is running correctly.

Package installation via cli

Use WireGuard

You can now use "wg" and "wg-quick" commands of WireGuard directly on your Synology NAS.


Feel free to share your projets with WireGuard in the comments. 🚀

Looking for help?
If you are looking for some help or want a quick chat, please head over to the Discord Community!