Skip to main content

Install NetBird on a QNAP NAS device

·647 words·4 mins
Feature image: network organisation

How to Install NetBird on a QNAP NAS Using Docker #

What is NetBird? #

NetBird is a modern, secure, and easy-to-use VPN solution that helps you connect devices across different networks in a seamless way. Based on the WireGuard protocol, NetBird is designed to enhance your network’s security, making it an ideal tool for remote access, site-to-site VPNs, and private networks for teams. It provides end-to-end encryption, ease of deployment, and high performance, ensuring secure and private connections between devices.

With NetBird, you can:

  • Create a secure network for multiple devices across different locations.
  • Manage remote access to your network with a simple web interface.
  • Leverage WireGuard’s high-speed performance.

In this post, I’ll guide you through the process of setting up NetBird on a QNAP NAS using Docker. This setup will allow your NAS to become part of your NetBird network, letting you access its resources securely from anywhere.

For more in details information, please check the extensive Netbird documentation: https://docs.netbird.io/.

Why docker? #

There are currently no ready-made installation packages for QNAP devices from Netbird. However, it is no problem to include NAS storages in a Netbird network using docker. This works with ARM and Intel-based QNAP devices.

An alternative to Netbird is Zerotier. There are suitable installation packages for almost every platform (like Synology, QNAP, OpenWRT and WD MyCloud).

Prerequisites #

Before you begin, make sure you have:

  1. A QNAP NAS with Container Station installed. This is essential, as it allows you to run Docker containers on your NAS.
  2. A NetBird account: Sign up for an account at NetBird.
  3. Basic knowledge of Docker: Familiarity with container commands will be helpful.

Step-by-Step Guide to Installing NetBird on QNAP NAS #

Step 1: Create a Netbird Setup Key #

A setup key is a pre-authentication key that allows us to register the new machine in our network.

  1. Login to https://app.netbird.io/
  2. Create a temporary setup-key: https://app.netbird.io/setup-keys

Give it a name (“QNAP mynetbird”) and an expiration time (“1 day”).

Netbird Create Setup Key

Step 2: Enable Container Station #

  1. Log into your QNAP NAS interface.
  2. Go to the App Center and find Container Station. If it isn’t installed, download and install it.
  3. Launch Container Station once it’s installed.

Step 3: Get the NetBird Docker Image #

  1. In Container Station, go to “Containers” and click on “+ Create”.

    QNAP Container Station

  2. Add “netbirdio/netbird:latest” as docker image and click “Next”.

    QNAP Container Create

Step 4: Advanced settings #

  1. Set up the containers’s name (e.g., mynetbird) and go on to “Advanced Settings”.

    QNAP Container Configure

  2. Configure the Network settings to match your requirements. If you want to run the container in host mode, make sure to select that option in the network settings.

    QNAP Container Configure Network

  3. In the Environments section, add the environment variable NB_SETUP_KEY with the Netbird Setup Key created before.

    QNAP Container Configure Environment

  4. In the Storage section, add a docker volume with the path “/etc/netbird”:

    QNAP Container Configure Storage

  5. Enable “Privileged Mode” in section Runtime:

    QNAP Container Configure Runtime

  6. Configure the Resources according to your needs or keep the defaults for now:

    QNAP Container Configure Resources

Finally click on “Apply”.

QNAP Container Overview

Step 5: Configure Network Access for NetBird #

  1. In the NetBird dashboard, configure network access permissions for the NAS peer. You can set specific access controls based on your requirements.
  2. Set up firewall rules or other security measures as necessary, depending on how you want to control access to the NAS.

Step 6: Verify the Connection #

Once the configuration is complete, you can verify the connection by:

  1. Checking the NetBird dashboard to ensure your NAS appears as a connected peer.
  2. Testing access from another NetBird-connected device. For example, you can try to ping your NAS or access it via SSH from a remote location.
  3. To check if the netbird container got an IP address, just execute the /bin/sh shell and run /sbin/ifconfig wt0:

QNAP Container Overview

Conclusion #

You now have NetBird running on your QNAP NAS as a Docker container! This setup allows you to securely access your NAS from anywhere, using the WireGuard protocol. With NetBird’s simple interface, managing remote connections to your QNAP NAS becomes a breeze.