Installing DNClient
DNClient connects a device to your Managed Nebula network. It comes in three variants:
- DNClient Desktop is an app for macOS and Windows laptops and workstations. You enroll and manage networks from its menu bar or taskbar icon.
- DNClient Server runs
dnclientas a background service with no user interface. Use it on servers, on Linux, and in containers. - Mobile Nebula is the app for iOS and Android phones and tablets.
Each method below ends by enrolling the host with an enrollment code. A Managed Nebula administrator gets the code from the admin panel after creating or re-enrolling the host. If your organization has set up endpoint SSO, DNClient Desktop users can instead enroll by signing in with your identity provider, with no code.
DNClient Desktop
Section titled “DNClient Desktop”DNClient Desktop supports macOS 13 (Ventura) and later. You need an administrator account to install it, and any network it connects to is available to every user of the computer.
Install with Homebrew
Section titled “Install with Homebrew”If you use Homebrew, install the dnclient cask:
brew install --cask dnclientThen open DNClient Desktop and continue to enroll.
Install from the download
Section titled “Install from the download”- Download DNClient Desktop for macOS from the downloads page and open
DNClient-Desktop.dmg. - Drag the DNClient Desktop icon onto the Applications shortcut.
- Open DNClient Desktop from Spotlight, Launchpad, or the Applications folder.
Enroll
Section titled “Enroll”The first time the app opens, it walks you through letting it run in the background at startup, which it needs to start DNClient connections. After you click “Get started”, macOS shows a notification that a background item was added. Hover over the notification, click Options, then Allow, and enter your password.
- Click the DNClient Desktop icon in the menu bar and select “Join network”.
- To sign in with your organization’s identity provider through endpoint SSO, click “Authenticate with email” and finish signing in in the browser window that opens.
- To use an enrollment code instead, click “Enter it here” next to “Have an enrollment token?”, paste the code, and click “Enroll device”.
The network connects once enrollment finishes and reconnects each time the app starts. To disconnect a network or stop it from connecting at startup, use the DNClient Desktop menu.
DNClient Server
Section titled “DNClient Server”Install with Homebrew
Section titled “Install with Homebrew”- Install the
dnclient-servercask:
brew install --cask dnclient-server- Install
dnclientas a service, start it, and enroll the host, replacing<ENROLL_CODE>with your enrollment code. The service runs the binary from Homebrew’sbindirectory, sobrew upgrade --cask dnclient-serverupdates it in place.
sudo dnclient installsudo dnclient startsudo dnclient enroll -code <ENROLL_CODE>Install the standalone binary
Section titled “Install the standalone binary”DNClient Server for macOS comes as a standalone binary and as a .dmg. The two are identical, except that the .dmg suits offline installs, because its signing information doesn’t need to be fetched from Apple’s servers.
- Copy the link for the latest
dnclientbinary orDNClient-Server.dmgfrom the downloads page, under “All available architectures”. - From the directory you want
dnclientin, download it, replacing<DL_URL>with that link:
curl -O <DL_URL>- If you downloaded
DNClient-Server.dmg, mount it and copy the binary out. If you downloaded the binary, make it executable:
sudo chmod +x dnclient- Install
dnclientas a service. The service runs the binary from its current directory, so move it first if you want it somewhere else.
sudo ./dnclient install- Start
dnclient. As a service, it starts again on every reboot.
sudo ./dnclient start- Enroll the host, replacing
<ENROLL_CODE>with your enrollment code:
sudo ./dnclient enroll -code <ENROLL_CODE>Windows
Section titled “Windows”DNClient Desktop
Section titled “DNClient Desktop”DNClient Desktop supports Windows 10 and Windows Server 2016 (build 10240) and later. You need an administrator account to install it, and any network it connects to is available to every user of the computer.
Install with winget
Section titled “Install with winget”If you use winget, run:
winget install DefinedNet.DNClient.DesktopThen open DNClient Desktop and continue to enroll.
Install from the download
Section titled “Install from the download”- Download DNClient Desktop for your architecture (AMD64 or ARM64) from the downloads page and open
DNClient-Desktop.msi. - Follow the installer’s prompts, and allow it to make changes to your computer when Windows asks.
- Open DNClient Desktop.
DNClient Desktop can install updates automatically. See Upgrading DNClient for when it does and how to change it.
Enroll
Section titled “Enroll”When DNClient Desktop opens, no window appears, but its icon is added to the taskbar’s notification area. If you don’t see it, click the “Show hidden icons” arrow (^).
- Click the DNClient Desktop icon in the taskbar and select “Join network”.
- To sign in with your organization’s identity provider through endpoint SSO, click “Authenticate with email” and finish signing in in the browser window that opens.
- To use an enrollment code instead, click “Enter it here” next to “Have an enrollment token?”, paste the code, and click “Enroll device”.
The network connects once enrollment finishes and reconnects each time the app starts. To disconnect a network or stop it from connecting at startup, use the DNClient Desktop menu.
DNClient Server
Section titled “DNClient Server”Run the commands below in a PowerShell terminal started as Administrator.
Install with winget
Section titled “Install with winget”If you use winget, install the package, then enroll the host, replacing <ENROLL_CODE> with your enrollment code. The package installs dnclient as a service and starts it. It doesn’t add dnclient.exe to your PATH, so run it by its full path.
winget install DefinedNet.DNClient.Server& 'C:\Program Files\Defined Networking\DNClient\dnclient.exe' enroll -code <ENROLL_CODE>Install the MSI
Section titled “Install the MSI”- Download
DNClient-Server.msifor your architecture from the downloads page, under “All available architectures”. To download it on the host from PowerShell instead, copy its link and run the following, replacing<DL_URL>with that link:
curl.exe -O <DL_URL>-
Open the MSI. It installs
dnclient, sets it up as a service, and starts it. -
Enroll the host, replacing
<ENROLL_CODE>with your enrollment code:
& 'C:\Program Files\Defined Networking\DNClient\dnclient.exe' enroll -code <ENROLL_CODE>On Linux, DNClient runs as DNClient Server. On distributions that use APT (such as Debian and Ubuntu), RPM (such as Fedora and RHEL), or pacman (Arch), install it from a package. The package puts the binary at /usr/bin/dnclient, registers a systemd service, and picks up new versions through your normal system updates. On other distributions, use the standalone binary.
Install from the package repository
Section titled “Install from the package repository”For Debian, Ubuntu, Linux Mint, Pop!_OS, and other APT-based distributions.
- Install
curland CA certificates. Minimal and desktop installs, including Ubuntu Desktop, may not includecurl.
sudo apt-get updatesudo apt-get install -y ca-certificates curl- Add the Defined Networking signing key. The
installcommand creates the keyring directory if your distribution doesn’t already have one.
sudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://dl.defined.net/gpg.asc -o /etc/apt/keyrings/defined-net.asc- Add the repository:
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- Install
dnclientand enable the service so it starts on boot:
sudo apt-get updatesudo apt-get install dnclientsudo systemctl enable --now dnclientFor RHEL, Fedora, Rocky Linux, Alma Linux, CentOS Stream, Amazon Linux, and other dnf-based distributions.
- Add the repository:
sudo curl -fsSL https://dl.defined.net/stable/rpm/defined-net.repo -o /etc/yum.repos.d/defined-net.repo- Install
dnclientand enable the service so it starts on boot:
sudo dnf install dnclientsudo systemctl enable --now dnclientFor Arch Linux, Manjaro, EndeavourOS, and other Arch-based distributions, Defined Networking maintains the dnclient package in the Arch User Repository.
- Install the package with your AUR helper, or build it manually with
makepkg:
# with an AUR helperyay -S dnclient
# or manuallygit clone https://aur.archlinux.org/dnclient.gitcd dnclientmakepkg -si- Enable the service so it starts on boot:
sudo systemctl enable --now dnclientWith the service running, enroll the host, replacing <ENROLL_CODE> with your enrollment code:
sudo dnclient enroll -code <ENROLL_CODE>Confirm the service is running and the host has a certificate:
systemctl status dnclientsudo dnclient infoService configuration
Section titled “Service configuration”The packaged service takes its settings from environment variables, which it reads from a file whose location depends on the distribution:
| Distribution | Environment 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.
| Variable | Default | Description |
|---|---|---|
DNCLIENT_STATE_DIR | /var/lib/defined | Directory holding enrollment state. A named instance stores its state in a subdirectory, such as /var/lib/defined/production/. |
DNCLIENT_LOG | unset | File to write logs to. When unset, logs go to stdout, where journald captures them. |
DNCLIENT_SERVER | https://api.defined.net | API server used for enrollment, certificate rotation, and configuration updates. |
DNCLIENT_NAME | unset | Instance 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:
sudo systemctl restart dnclientOnly 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).
Install the standalone binary
Section titled “Install the standalone binary”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.
- Copy the link for the latest
dnclientbinary for your architecture from the downloads page, under “All available architectures”. - From the directory you want
dnclientin, download it, replacing<DL_URL>with that link:
curl -O <DL_URL>- Make
dnclientexecutable:
sudo chmod +x dnclient- Install
dnclientas a service. The service runs the binary from its current directory, so move it first if you want it somewhere else.
sudo ./dnclient install- Start
dnclient. As a service, it starts again on every reboot.
sudo ./dnclient start- Enroll the host, replacing
<ENROLL_CODE>with your enrollment code:
sudo ./dnclient enroll -code <ENROLL_CODE>Docker
Section titled “Docker”The definednet/dnclient image runs DNClient Server in a container on Linux hosts. It carries the same release as the packages on dl.defined.net.
-
Install cosign v3 or newer.
-
Verify the image with the Defined Networking Docker signing key. Images for DNClient 1.0.0 and later are signed. To use a specific version, verify and run that tag instead of
latest.
cosign verify --key https://dl.defined.net/docker-cosign.pub definednet/dnclient:latest- Run the container, replacing
<ENROLL_CODE>with your enrollment code.NET_ADMINlets the container create the tun device, and thedefinedvolume keeps the host’s enrollment across restarts, soDN_ENROLLMENT_CODEis only needed on the first run.
docker run -d \ --name dnclient \ --network host \ --cap-add NET_ADMIN \ --volume defined:/etc/defined \ --env DN_ENROLLMENT_CODE="<ENROLL_CODE>" \ --restart unless-stopped \ definednet/dnclient:latestiOS and Android
Section titled “iOS and Android”Install Mobile Nebula from the App Store for iPhone and iPad, or Google Play for Android.
Then enroll the device by scanning the QR code from the admin panel, opening the enrollment link on the device, or entering the enrollment code in the app. Enroll the device in the Mobile Nebula guide walks through each.
Troubleshooting
Section titled “Troubleshooting”If a host doesn’t connect, check its logs. The Viewing DNClient logs guide covers every variant and platform. Once a host is enrolled and online, you can also stream its logs and run diagnostic commands from the admin panel, without signing in to the machine. See Running host diagnostics.
If you’re switching a computer between DNClient Server and DNClient Desktop, uninstall the one you’re replacing and enroll the computer again with a new code. See re-enroll a host.