Install packages
Prebuilt native packages let you install nl6 with your system package manager
and run it as a managed systemd service — no Go toolchain or source checkout
required.
| Platform | Format | Package manager |
|---|---|---|
| Debian, Ubuntu | .deb | apt |
| CentOS Stream, Rocky Linux, AlmaLinux | .rpm | dnf |
| NixOS | flake | nix |
Both amd64 and arm64 builds are published. The .deb/.rpm packages are
attached to each GitHub Release;
NixOS consumes the flake directly from the repository.
What the package installs
| Path | Contents |
|---|---|
/usr/bin/nl6 | the simulator binary |
/usr/share/nl6/resources/ | device resource data (SNMP/SSH/REST) |
/usr/share/nl6/web/ | web console assets |
/usr/lib/systemd/system/nl6.service | the systemd unit |
/etc/nl6/nl6.conf | flag file (NL6_OPTS), preserved across upgrades |
The simulator runs as root — it creates TUN interfaces, manages the
nl6sim network namespace, and installs an iptables rule. The iproute2
(ip), iptables, and procps (sysctl) dependencies are pulled in
automatically by apt/dnf.
Debian / Ubuntu (.deb)
Tested on Debian 13 and Ubuntu 26.04 LTS (amd64 and arm64).
-
Download the
.debfor your architecture from the latest release —nl6_<version>_amd64.debornl6_<version>_arm64.deb. -
Install it (the leading
./tellsaptit is a local file, so it still resolves dependencies):sudo apt install ./nl6_<version>_amd64.deb -
Continue with Configure and start the service.
CentOS Stream / Rocky / AlmaLinux (.rpm)
Tested on CentOS Stream 10, Rocky Linux 10, and AlmaLinux 10 (amd64 and
arm64).
-
Download the
.rpmfor your architecture from the latest release —nl6-<version>-1.x86_64.rpmornl6-<version>-1.aarch64.rpm. -
Install it:
sudo dnf install ./nl6-<version>-1.x86_64.rpm -
Continue with Configure and start the service.
Configure and start the service
The package installs the nl6 systemd unit but does not enable or start it
automatically — the simulator needs root and operator-chosen flags first. These
steps are the same on Debian/Ubuntu and the RHEL family.
-
Set the flags.
NL6_OPTSis passed verbatim tonl6; see the CLI flags reference for the full list.sudoedit /etc/nl6/nl6.conf# /etc/nl6/nl6.confNL6_OPTS="-port 8080 -auto-start-ip 10.42.0.1 -auto-count 100" -
Enable on boot and start now:
sudo systemctl enable --now nl6 -
Verify it is running:
systemctl status nl6journalctl -u nl6 -f # follow logsnl6 -version # prints the installed versioncurl -s localhost:8080/api/v1/version
After editing /etc/nl6/nl6.conf, apply changes with
sudo systemctl restart nl6.
nl6 loads resources/ and web/ relative to its working directory, so to run
it by hand (instead of via the service) start it from the data directory:
cd /usr/share/nl6 && sudo nl6 -port 8080
Upgrading and removing
# Upgrade (a running service is restarted automatically onto the new binary)
sudo apt install ./nl6_<new-version>_amd64.deb # Debian/Ubuntu
sudo dnf upgrade ./nl6-<new-version>-1.x86_64.rpm # RHEL family
# Remove (your /etc/nl6/nl6.conf is left in place)
sudo apt remove nl6 # Debian/Ubuntu
sudo dnf remove nl6 # RHEL family
NixOS (flake)
nl6 ships a flake exposing a package and a NixOS module. The recommended way to
run it on NixOS is the module — it's fully declarative, needs no cachix
CLI, and (with the cache below) installs the prebuilt binary instead of
compiling.
-
Add the flake input, the binary cache, and the service to your system flake. Because your system is already flake-based, no experimental-feature flags or extra tools are needed:
{inputs.nl6.url = "github:labmonkeys-space/nl6?dir=deploy/packages/nix";outputs = { self, nixpkgs, nl6 }: {nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {system = "x86_64-linux";modules = [nl6.nixosModules.nl6{# Prebuilt binary cache — substitutes instead of compiling.# System-level settings are trusted, so no `cachix use` needed.nix.settings = {substituters = [ "https://nl6.cachix.org" ];trusted-public-keys = [ "nl6.cachix.org-1:nfaq8JEbMcARjzc/oPyNIrcQrXKe13phUtMg0RucnLA=" ];};services.nl6 = {enable = true;extraFlags = [ "-port" "8080" "-auto-start-ip" "10.42.0.1" "-auto-count" "100" ];};}];};};} -
Rebuild:
sudo nixos-rebuild switch. The service is now managed by systemd (systemctl status nl6).
Building the binary imperatively (optional)
To build or run the package directly with the nix CLI, that CLI needs the
nix-command and flakes experimental features. If you see
experimental Nix feature 'nix-command' is disabled, enable them — in
configuration.nix:
nix.settings.experimental-features = [ "nix-command" "flakes" ];
then sudo nixos-rebuild switch (or, for a one-off, prepend
nix --extra-experimental-features 'nix-command flakes' …). After that:
nix build "github:labmonkeys-space/nl6?dir=deploy/packages/nix#nl6" --accept-flake-config
--accept-flake-config lets Nix use the cache the flake advertises — but only
for trusted users (root or trusted-users). If you are not trusted, use the
declarative nix.settings cache from step 1 instead.
Building the packages yourself
If a release does not yet carry packages for your platform, or you want to build
from a specific commit, produce them locally with make packages (needs Go;
nfpm is fetched automatically):
make packages # → dist/*.deb and dist/*.rpm for amd64 + arm64
Full packaging reference — layout, nfpm.yaml, the NixOS flake/module, the
Cachix cache, and the container-based install smoke test — lives in
deploy/packages/README.md.
See also
- Docker — run the published container image instead.
- Quick start — build and run from source.
- CLI flags — everything you can put in
NL6_OPTS.