Native packages

OS:

🐧 Linux

Desomnia is distributed as native .deb and .rpm packages for the most common Linux distributions. This is the recommended way to install it on a headless Linux server or single-board computer: the package registers Desomnia as a systemd service, pulls in the required system libraries, and follows the standard filesystem layout.

The packages contain the native, ahead-of-time compiled build β€” a single self-contained binary that needs no .NET runtime and uses far less memory (around 48 MB instead of ~130 MB), which makes it a good fit for an always-on Wake-on-LAN proxy. See Performance for the reasoning.

Note

Because this is the native build, plugins cannot be loaded at runtime: the Firewall Knock Operator is built in, but other plugins are not. If you need additional plugins, install the full build via Homebrew, the archive, or Docker instead. Everything else β€” including local sleep management via systemd-logind β€” works as in the full build, so the package also suits hosts that should sleep themselves.

Supported platforms

Packages are published for the following architectures:

  • amd64 / x86_64 β€” 64-bit Intel/AMD

  • arm64 / aarch64 β€” 64-bit ARM, e.g. a Raspberry Pi 3/4/5 running a 64-bit OS

They require glibc 2.35 or newer β€” Debian 12 β€œBookworm”, Ubuntu 22.04, Raspberry Pi OS (Bookworm), a current Fedora/openSUSE, or later. For 32-bit ARM, other architectures, or older systems, use the archive or Docker installation.

Installation

The recommended way is to register the Desomnia package repository once β€” apt or dnf then installs and updates Desomnia like any other system package. Alternatively, individual packages can be downloaded from the repository page and installed directly, without automatic updates.

The repository is hosted by Cloudsmith. The setup script below detects your distribution, imports the repository signing key, and registers the package source; if you prefer to configure the source by hand, the repository page linked above provides per-distribution instructions.

Debian, Ubuntu, Raspberry Pi OS

Register the repository, then install:

curl -1sLf 'https://dl.cloudsmith.io/public/mad0x20wizard/tools/setup.deb.sh' | sudo -E bash
sudo apt install desomnia

Desomnia is then kept up to date by apt upgrade, together with the rest of the system.

Fedora, RHEL, openSUSE

Register the repository, then install:

curl -1sLf 'https://dl.cloudsmith.io/public/mad0x20wizard/tools/setup.rpm.sh' | sudo -E bash
sudo dnf install desomnia

On openSUSE, install with zypper install desomnia instead.

Direct download

To install a package without registering the repository, download the file matching your format and architecture from the Cloudsmith repository page and install it directly β€” dependencies are still resolved automatically, but newer versions have to be downloaded and installed manually:

sudo apt install ./Desomnia_<version>_linux-<arch>-native.deb   # Debian, Ubuntu, Raspberry Pi OS
sudo dnf install ./Desomnia_<version>_linux-<arch>-native.rpm   # Fedora, RHEL, openSUSE

Note

Only stable releases are packaged. To try an alpha or beta version, use the archive from the GitHub Releases page as described in the manual installation.

Note

The libpcap library is required and pulled in automatically. The optional tools ethtool and iproute2 β€” used to arm the network interface for Wake-on-LAN and to assign temporary address mappings β€” are recommended and installed alongside on most systems.

Filesystem layout

Desomnia uses the following locations in alignment with the Filesystem Hierarchy Standard (FHS):

/usr/sbin

The daemon binary.

/etc/desomnia

Configuration directory. Place your monitor.xml here; you can also add an NLog.config for additional logging.

/var/log/desomnia

Log output, if file logging is enabled in NLog.config and used ${var:logDir} as base path.

/usr/lib/systemd/system/desomnia.service

The systemd service unit.

Configuration

The package installs a ready-to-run configuration at /etc/desomnia/monitor.xml, which is why the service can run immediately after installation. On the first installation, the configuration is chosen to match the machine’s role:

  • Always-on box β€” if the machine cannot suspend, or no network adapter can wake it via Wake-on-LAN (typical for single-board computers like a Raspberry Pi), Desomnia starts in the zero-configuration Sleep Proxy mode: it watches the network in promiscuous mode and keeps sleeping hosts reachable, waking them on demand, without any per-host setup β€” the always-on Wake-on-LAN proxy role.

  • Sleep-capable host β€” if the machine can suspend and has a Wake-on-LAN capable adapter, a local configuration is installed instead: Desomnia watches only the host’s own traffic (no promiscuous mode, no proxy role), prepared for local sleep management. Suspending on idle stays off until you configure it.

The choice is made only on the first installation β€” upgrades never touch monitor.xml. Both templates ship under /usr/share/desomnia/ (monitor-proxy.xml and monitor-host.xml); to switch roles later, copy the one you want over /etc/desomnia/monitor.xml and restart the service.

To tailor it to your network β€” declaring specific hosts, a router, or a Wake-on-LAN client role β€” edit the file and restart the service:

sudo nano /etc/desomnia/monitor.xml
sudo systemctl restart desomnia

Your changes are preserved across package upgrades. See Resources and Events for the full set of configuration elements.

Running as a service

Because a working configuration ships with the package, the systemd service is enabled and started automatically on installation. Check its status at any time:

systemctl status desomnia

To stop it and prevent it from starting at boot:

sudo systemctl disable --now desomnia

Journal

The INFO-level console output shows the most important actions Desomnia takes β€” such as waking remote hosts or sending knock packets β€” giving a quick overview of what the service is doing at any point in time. Warnings and errors are included as well.

To follow the live output from the systemd journal, run:

journalctl -u desomnia -f -n 80

Updating

When installed from the repository, Desomnia is updated by the regular system upgrade (apt upgrade / dnf upgrade). For a directly downloaded package, download the newer package and install it the same way. In both cases, if the service was running it is restarted automatically, and your monitor.xml is left untouched.

Uninstallation

sudo apt remove desomnia      # Debian/Ubuntu
sudo dnf remove desomnia      # Fedora/RHEL

This stops and disables the service. Your configuration in /etc/desomnia and any log files are left in place; remove them manually if you no longer need them. If you registered the package repository, the source file created by the setup script (/etc/apt/sources.list.d/mad0x20wizard-tools.list or /etc/yum.repos.d/mad0x20wizard-tools.repo) can be removed as well.

Note

Package repository hosting is graciously provided by Cloudsmith, the only fully hosted, cloud-native, universal package management solution.