NetBird on Debian Servers

We run NetBird on our servers to support secure remote access. This guide briefly covers the steps to get NetBird set up on a fresh Debian server.

  1. Log in to the NetBird control panel and navigate to Settings, then Setup Keys. Or, use this handy deeplink to take you right there.

  2. Click on Create Key.

  3. In the key creation window, configure the settings as follows:

    1. Name: Set the key name to the hostname of the server you’re adding.

    2. Make this key reusable: Leave set to no.

    3. Expires in: 1 Day

    4. Ephemeral peers: Leave set to no.

    5. Allow extra DNS labels: Leave set to no.

    6. Auto-assigned groups: Choose one or more access groups (what?) to automatically assign to the server.

  4. After you click on Create, you will receive a long alphanumeric setup key. Store this somewhere safe, as you can only see it once.

  5. Log in to your Debian server via SSH with a sudo-capable account.

  6. Add the NetBird repository and prerequisites:

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg -y
curl -sSL https://pkgs.netbird.io/debian/public.key | sudo gpg --dearmor --output /usr/share/keyrings/netbird-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main' | sudo tee /etc/apt/sources.list.d/netbird.list
  1. Install NetBird:

sudo apt-get update
sudo apt-get install netbird
  1. Run NetBird with the setup key:

netbird up --setup-key ABC123-YOUR-SETUP-KEY-HERE
  1. Return back to the Peers section of the NetBird control panel and make sure your new server appears on the list.

  2. Return back to the Setup Keys section (deeplink) and delete the (now invalidated) setup key you just used.