Upgrading DNClient
Upgrade DNClient the same way you installed it. Find your platform and the method you used below.
DNClient Desktop
Section titled “DNClient Desktop”DNClient Desktop shows a notice in its menu when a newer version is available.
Homebrew
Section titled “Homebrew”brew upgrade --cask dnclientDownload
Section titled “Download”- Download the latest DNClient Desktop for macOS from the downloads page.
- Quit DNClient Desktop by clicking its menu bar icon and choosing “Quit”.
- Open the
DNClient-Desktop.dmgyou downloaded. - Drag the DNClient Desktop icon onto the Applications shortcut, and choose “Replace” to replace the existing app.
- Open DNClient Desktop again.
DNClient Server
Section titled “DNClient Server”Homebrew
Section titled “Homebrew”Upgrade the cask, then restart the service so it runs the new binary:
brew upgrade --cask dnclient-serversudo dnclient stopsudo dnclient startdnclient -version # check your updated version!Standalone binary
Section titled “Standalone binary”Download the latest dnclient binary for macOS from the downloads page, under “All available architectures”, then:
sudo dnclient stopsudo dnclient uninstallcp ./dnclient $LOCATION_WHERE_YOU_INSTALLED_DNCLIENT/dnclientchmod +x $LOCATION_WHERE_YOU_INSTALLED_DNCLIENT/dnclientsudo dnclient installsudo dnclient startdnclient -version # check your updated version!Windows
Section titled “Windows”DNClient Desktop
Section titled “DNClient Desktop”DNClient Desktop 0.9.10 and later can install updates automatically. Fresh installs turn automatic updates on, except installs run as SYSTEM, such as from MDM or Group Policy, which leave them off. Installs upgraded from 0.9.9 or earlier keep them off. Turn automatic updates on or off from the DNClient Desktop menu in the taskbar. While they’re off, the menu offers each new version for you to install.
To set automatic updates when deploying the MSI, pass AUTOUPDATE=1 or AUTOUPDATE=0. This also changes the setting on a computer that already has DNClient Desktop installed:
# Install DNClient Desktop with automatic updates on. Use AUTOUPDATE=0 to turn them off.msiexec /i DNClient-Desktop.msi AUTOUPDATE=1winget
Section titled “winget”winget upgrade DefinedNet.DNClient.DesktopDownload
Section titled “Download”Download the latest DNClient Desktop from the downloads page, open DNClient-Desktop.msi, and click through the setup wizard. It replaces the installed version.
DNClient Server
Section titled “DNClient Server”winget
Section titled “winget”winget upgrade DefinedNet.DNClient.ServerDownload the latest DNClient-Server.msi from the downloads page, under “All available architectures”, and run it against the directory you originally installed DNClient in. It replaces the previous installation.
Either way, check the version afterward:
& 'C:\Program Files\Defined Networking\DNClient\dnclient.exe' -versionPackage installations
Section titled “Package installations”Upgrade dnclient the same way you upgrade anything else on the system. On APT and RPM, the package restarts the service for you.
sudo apt-get updatesudo apt-get install --only-upgrade dnclientdnclient -version # check your updated version!sudo dnf upgrade dnclientdnclient -version # check your updated version!Rebuild the package with your AUR helper, which pulls the latest version. pacman does not restart services, so restart DNClient yourself, including any named instances:
yay -S dnclientsudo systemctl try-restart 'dnclient.service' 'dnclient@*.service'dnclient -version # check your updated version!Standalone binary installations
Section titled “Standalone binary installations”Download the latest dnclient binary for your architecture from the downloads page, under “All available architectures”, then:
sudo dnclient stopsudo dnclient uninstallcp ./dnclient $LOCATION_WHERE_YOU_INSTALLED_DNCLIENT/dnclientchmod +x $LOCATION_WHERE_YOU_INSTALLED_DNCLIENT/dnclientsudo dnclient installsudo dnclient startdnclient -version # check your updated version!Moving from the standalone binary to a package
Section titled “Moving from the standalone binary to a package”You can switch a standalone binary installation to the package so that future upgrades come through your package manager. Your enrollment state lives in /var/lib/defined and is left in place, so the host stays enrolled and does not need a new enrollment code.
The standalone dnclient install writes its service unit to /etc/systemd/system/dnclient.service. The package ships its unit under /lib/systemd/system (/usr/lib/systemd/system on RPM and Arch), and a unit in /etc takes precedence. If you install the package without first removing the standalone unit, the old unit shadows the package’s and your package upgrades stop affecting the running service.
Remove the standalone service and its binary before installing the package. dnclient uninstall removes only the unit, and a leftover binary in /usr/local/bin still comes ahead of the package’s /usr/bin/dnclient on the default PATH. If you run named instances, stop and uninstall each of those with -name as well, and enable the package’s dnclient@<name>.service in their place afterward.
sudo dnclient stopsudo dnclient uninstallsudo rm $(command -v dnclient)Then follow the package install steps. Skip the enrollment step, since the host is already enrolled.
Moving Linux state to /var/lib/defined
Section titled “Moving Linux state to /var/lib/defined”DNClient 0.9.4 moved the Linux state directory from /etc/defined to /var/lib/defined. This migration is optional: a host that enrolled before 0.9.4 keeps working from /etc/defined, because DNClient falls back to the old directory when the new one holds no enrolled networks. However, it will log a warning until the migration is performed.
To move the state and clear the warning, stop DNClient and move the files. The move relocates every instance’s state at once, so stop all named instances too, not just the one that logged the warning. Named instances run as dnclient@<name> on a package installation and dnclient.<name> on a standalone one.
sudo systemctl stop dnclientsudo mkdir -p /var/lib/defined && sudo mv /etc/defined/* /var/lib/defined/ && sudo rmdir /etc/definedFor a package installation, that’s the whole migration. Start the new service again with sudo systemctl start dnclient and you’re done.
For standalone binary installation, re-create the service unit before starting it. An older dnclient install pinned -config /etc/defined into the unit, so moving the files without rewriting it would strand the service on the now-empty directory. dnclient install refuses to write over an existing unit, so uninstall first:
sudo dnclient uninstallsudo dnclient installsudo dnclient startRepeat this for each named instance (ls -l /var/lib/defined), passing -name to every command. DNClient’s startup warning lists the exact commands for the instances it finds.
Docker
Section titled “Docker”Verify and pull the new image, then replace the container. The defined volume keeps the host’s enrollment, so the new container doesn’t need an enrollment code. To move to a specific version, use that tag instead of latest.
cosign verify --key https://dl.defined.net/docker-cosign.pub definednet/dnclient:latestdocker pull definednet/dnclient:latestdocker rm -f dnclientdocker run -d \ --name dnclient \ --network host \ --cap-add NET_ADMIN \ --volume defined:/etc/defined \ --restart unless-stopped \ definednet/dnclient:latestiOS and Android
Section titled “iOS and Android”Mobile Nebula updates automatically through the App Store or Google Play, like your other apps. To get a new version sooner, open its App Store or Google Play page and tap “Update”.
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.