Skip to main content

Install packages

Prebuilt native packages let you install nl6 with your system package manager and run it as a managed systemd service. You need no Go toolchain or source checkout.

PlatformFormatPackage manager
Debian, Ubuntu.debapt
CentOS Stream, Rocky Linux, AlmaLinux.rpmdnf
NixOSflakenix

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​

PathContents
/usr/bin/nl6the simulator binary
/usr/share/nl6/resources/device resource data (SNMP/SSH/REST)
/usr/share/nl6/web/web console assets
/usr/lib/systemd/system/nl6.servicethe systemd unit
/etc/nl6/nl6.confflag file (NL6_OPTS), preserved across upgrades

Runtime requirements. The simulator runs as root because 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).

  1. Download the .deb for your architecture from the latest release: nl6_<version>_amd64.deb or nl6_<version>_arm64.deb.

  2. Install it (the leading ./ tells apt it is a local file, so it still resolves dependencies):

    sudo apt install ./nl6_<version>_amd64.deb
  3. Continue with Configure and start the service.

CentOS Stream / Rocky / AlmaLinux (.rpm)​

Tested on Rocky Linux 10 and AlmaLinux 10 (amd64 and arm64). CentOS Stream 10 is not in the smoke matrix.

  1. Download the .rpm for your architecture from the latest release: nl6-<version>-1.x86_64.rpm or nl6-<version>-1.aarch64.rpm.

  2. Install it:

    sudo dnf install ./nl6-<version>-1.x86_64.rpm
  3. 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. The unit ships with LimitNOFILE=1048576, so a packaged install needs no file-descriptor tuning.

  1. Set the flags. NL6_OPTS is passed verbatim to nl6; see the CLI flags reference for the full list.

    sudoedit /etc/nl6/nl6.conf
    # /etc/nl6/nl6.conf
    NL6_OPTS="-port 8080 -auto-start-ip 10.42.0.1 -auto-count 100"
  2. Enable on boot and start now:

    sudo systemctl enable --now nl6
  3. Verify it is running:

    systemctl status nl6
    journalctl -u nl6 -f # follow logs
    nl6 -version # prints the installed version
    curl -s localhost:8080/api/v1/version

    Expected output of the last command (from versionHandler in go/nl6/web.go), with your installed version:

    {"version":"<version>"}

After editing /etc/nl6/nl6.conf, apply changes with sudo systemctl restart nl6.

Running without the service. nl6 loads resources/ and web/ relative to its working directory. To run it by hand instead of via the service, start it from the data directory:

cd /usr/share/nl6 && sudo nl6 -port 8080

Upgrade and remove the package​

# 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 is fully declarative, needs no cachix CLI, and (with the cache below) installs the prebuilt binary instead of compiling.

  1. 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" ];
    };
    }
    ];
    };
    };
    }
  2. Rebuild: sudo nixos-rebuild switch. The service is now managed by systemd (systemctl status nl6).

Build 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.

Build 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

The full packaging reference lives in deploy/packages/README.md. It covers the layout, nfpm.yaml, the NixOS flake/module, the Cachix cache, and the container-based install smoke test.

See also​