Skip to content

install

Thomas Mangin edited this page Jun 24, 2026 · 3 revisions

Pre-Alpha. This page describes behavior that may change.

You build Ze from source. There are no packaged binaries, no container images, no Homebrew tap. This is pre-alpha software and install is intentionally manual so you know what you are running.

Prerequisites

You need a Linux host with:

  • Go 1.25 or newer. Ze uses language features from 1.25. Older toolchains will not compile.
  • Git to clone the repository.
  • Make to drive the build.
  • A modern kernel. Ze programs the FIB through netlink, manages interfaces, and opens raw BGP sockets. Anything from the last few major distributions should work. If you are inside an LXC or a restrictive container, expect trouble with netlink and raw sockets.

macOS and Windows are not supported runtime targets. You can build on macOS for development, but the FIB and interface plugins only do anything useful on Linux.

Build

Clone the repository and run the default build target:

git clone https://codeberg.org/thomas-mangin/ze.git
cd ze
make build

The build target runs the code generator (to wire up plugin imports) and then compiles four binaries into bin/:

  • bin/ze. The main daemon and CLI. This is the one you will use every day.
  • bin/ze-test. Test helpers: a sink peer that accepts any BGP session, encoding and protocol test fixtures. Handy for trying Ze without a second real router.
  • bin/ze-chaos. The deterministic chaos orchestrator. Not needed for a first peer, but shipped so the chaos dashboard works out of the box.
  • bin/ze-analyse. Offline analysis tools.

If you only want the daemon, make ze builds bin/ze alone and skips the rest.

Verify

Check the binary runs and reports a version:

bin/ze version

You should see a version string and the build commit. If ze version prints nothing or errors out, the build is broken and you should file an issue before going any further.

Install on PATH

There is no make install. The simplest path is to copy the binary wherever you want it:

sudo install -m 0755 bin/ze /usr/local/bin/ze

Or leave it in bin/ze and run it from there. Ze does not assume a specific install location and all its state lives in a single database file that you control.

Alternatively, the Go installer (ze install local) copies the running binary to a standard FHS prefix (/usr/local, /usr, or /opt/ze) and scaffolds the config directory when no database.zefs exists yet. The whole installer is Go; there is no shell installer to source or trust. Run without --prefix for an interactive prefix menu, or pass it for non-interactive use:

sudo ze install local --prefix /usr/local
Flag Default Description
--prefix interactive menu Installation prefix (binary goes to <prefix>/bin/ze).
--dry-run Print what would be done without making changes.

The config directory is derived from the binary path: /usr/local/bin/ze and /usr/bin/ze map to /etc/ze, while /opt/ze/bin/ze maps to /opt/ze/etc/ze. After installing, run ze init to bootstrap the database.

ze uninstall local reverses a local installation. It removes the binary, and with --purge also removes the config directory and database. Without --yes it prints what will be removed and asks for confirmation.

ze uninstall local              # remove binary
ze uninstall local --purge      # also remove config directory and database
ze uninstall local --dry-run    # preview only

Running as a service

You can write the systemd unit by hand, or let Ze manage it. A hand-written unit execs ze <config-file> as a dedicated user with the capabilities it needs (CAP_NET_ADMIN for FIB programming, CAP_NET_BIND_SERVICE if you want BGP on port 179). The Starting and Stopping page has an example unit.

To let Ze own the service unit, install the binary, initialise the database, then run ze install systemd:

sudo ze install local --prefix /usr/local
sudo ze init
sudo ze install systemd --start

ze install systemd refuses to run unless <config-dir>/database.zefs exists. It creates the ze user and group if missing, changes ownership of the config directory and database to ze:ze, writes /etc/systemd/system/ze.service (with CAP_NET_ADMIN, CAP_NET_RAW, CAP_NET_BIND_SERVICE, NoNewPrivileges, and XDG_RUNTIME_DIR=/run/ze), runs systemctl daemon-reload, and enables the unit. Add --start to start it. Use --dry-run to print the unit without root, --config <dir> to override the config directory, and --force to overwrite an existing unit.

Because the unit sets XDG_RUNTIME_DIR=/run/ze, the daemon socket is /run/ze/ze.socket. For local operator CLI access, configure daemon { socket "/run/ze/ze.socket"; } or export XDG_RUNTIME_DIR=/run/ze.

ze uninstall systemd stops, disables, and removes the service unit (--purge also removes the ze user and group). Check status with systemctl status ze.service.

What next

Adapted from main/README.md and main/Makefile.

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally