Skip to content

Installing DNClient Server

This guide describes how to install the dnclient binary and use it to enroll a computer into your Managed Nebula network.

On Debian-, RPM-, and Arch-based distributions, install dnclient from a package. The package puts the binary at /usr/bin/dnclient, registers a systemd service, and lets you pick up new versions through your normal system updates. On other distributions, use the standalone binary.

For Debian, Ubuntu, Linux Mint, Pop!_OS, and other APT-based distributions.

  1. Add the Defined Networking signing key. The install command creates the keyring directory if your distribution doesn’t already have one.
Terminal window
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://dl.defined.net/gpg.asc -o /etc/apt/keyrings/defined-net.asc
  1. Add the repository:
Terminal window
echo "deb [signed-by=/etc/apt/keyrings/defined-net.asc] https://dl.defined.net/stable/apt stable main" \
| sudo tee /etc/apt/sources.list.d/defined-net.list > /dev/null
  1. Install dnclient and enable the service so it starts on boot:
Terminal window
sudo apt-get update
sudo apt-get install dnclient
sudo systemctl enable --now dnclient

With the service running, enroll the host, replacing <ENROLL_CODE> with the enrollment code you receive from the admin panel after creating or re-enrolling the host.

Terminal window
sudo dnclient enroll -code <ENROLL_CODE>

Confirm the service is running and the host has a certificate:

Terminal window
systemctl status dnclient
sudo dnclient info

Your computer is now running dnclient and will be able to communicate with other machines on your Managed Nebula network.

The packaged service takes its settings from environment variables, which it reads from a file whose location depends on the distribution:

DistributionEnvironment file
Debian, Ubuntu, and other APT-based/etc/default/dnclient
RHEL, Fedora, and other RPM-based/etc/sysconfig/dnclient
Arch-based/etc/conf.d/dnclient

The package ships this file with every setting commented out, so the defaults below apply until you edit it. A named instance reads its own file with the instance name appended, such as /etc/default/dnclient.production for dnclient@production.service. That file is optional and the package doesn’t create it.

VariableDefaultDescription
DNCLIENT_STATE_DIR/var/lib/definedDirectory holding enrollment state. A named instance stores its state in a subdirectory, such as /var/lib/defined/production/.
DNCLIENT_LOGunsetFile to write logs to. When unset, logs go to stdout, where journald captures them.
DNCLIENT_SERVERhttps://api.defined.netAPI server used for enrollment, certificate rotation, and configuration updates.
DNCLIENT_NAMEunsetInstance name. The template unit sets this per instance, so enable dnclient@<name>.service rather than setting it here.

Restart the service to apply a change:

Terminal window
sudo systemctl restart dnclient

Only the service reads this file. dnclient commands you run yourself use the defaults unless you set the variable in your own shell or pass the matching flag (-config, -log, -server, -name).

Use this method on distributions the package repository doesn’t cover, or where you don’t want a system package. You’ll need to repeat these steps by hand for each upgrade.

  1. Obtain the URL for the latest version of the dnclient binary for your architecture from https://admin.defined.net/downloads.
  2. From a directory where you wish to download dnclient, run the following curl command, replacing <DL_URL> with the link you obtained from the downloads page.
Terminal window
curl -O <DL_URL>
  1. Make dnclient executable:
Terminal window
sudo chmod +x dnclient
  1. Install dnclient as a service. This will use the dnclient binary in its current directory, so move it first if you’d like it somewhere else.
Terminal window
sudo ./dnclient install
  1. Start dnclient. As a service, it will be started automatically on future reboots.
Terminal window
sudo ./dnclient start
  1. Enroll the host, replacing <ENROLL_CODE> with the enrollment code you receive from the Managed Nebula admin panel after creating or re-enrolling the host.
Terminal window
sudo ./dnclient enroll -code <ENROLL_CODE>

Your computer is now running dnclient and will be able to communicate with other machines on your Managed Nebula network.

For macOS, we offer DNClient Server in two formats—a standalone binary and packaged into a .dmg. The version in the .dmg is suitable for use in offline installations, since the signing information does not need to be retrieved from Apple servers. Otherwise, they are identical in functionality.

  1. Obtain the URL for the latest version of the dnclient binary or .dmg from https://admin.defined.net/downloads.
  2. From a directory where you wish to download dnclient, run the following curl command, replacing <DL_URL> with the link you obtained from the downloads page.
Terminal window
curl -O <DL_URL>
  1. If you downloaded DNClient-Server.dmg, mount the image and copy the binary to your filesystem. Otherwise if you downloaded the binary directly, make it executable:
Terminal window
sudo chmod +x dnclient
  1. Install dnclient as a service. This will use the dnclient binary in its current directory, so move it first if you’d like it somewhere else.
Terminal window
sudo ./dnclient install
  1. Start dnclient. As a service, it will be started automatically on future reboots.
Terminal window
sudo ./dnclient start
  1. Enroll the host, replacing <ENROLL_CODE> with the enrollment code you receive from the Managed Nebula admin panel after creating or re-enrolling the host.
Terminal window
sudo ./dnclient enroll -code <ENROLL_CODE>

Your computer is now running dnclient and will be able to communicate with other machines on your Managed Nebula network.

  1. Find the latest version of the DNClient-Server.msi installer for your architecture from https://admin.defined.net/downloads.

  2. Download the installer directly from the downloads page, or in a PowerShell terminal started as Administrator on the host, run the provided curl command, replacing <DL_URL> with the link from the downloads page.

Terminal window
curl.exe -O <DL_URL>
  1. The MSI you downloaded can be double-clicked to be run and will install DNClient as a service. This will install dnclient, set it up as a service, and start it.

  2. In a PowerShell terminal run as administrator, run the following command to enroll the host, replacing <ENROLL_CODE> with the enrollment code you receive from the Managed Nebula admin panel after creating or re-enrolling the host.

Terminal window
& 'C:\Program Files\Defined Networking\DNClient\dnclient.exe' enroll -code <ENROLL_CODE>

Your computer is now running dnclient and will be able to communicate with other machines on your Managed Nebula network.