Skip to content

Install

This page covers installing the two programs on a Linux host: etemenanki-app, the standalone proxy, and katana, the panel node agent. You can download a prebuilt x86_64 binary or build either one from source. At the end you have the binary in /usr/local/bin, a directory under /etc for its configuration, and a binary that reports its version.

Each program is a single executable. There is no installer and no service unit. Neither program keeps state on disk. katana creates no files at all. etemenanki-app creates a file in two cases only: the socket of an inbound or of its [api] when you configure it to listen on a Unix socket path, and a new copy of its config file when the REST API switches a route, which it writes beside the old file and renames over it. So the only directory you need to create is the one that holds your configuration.

etemenanki-app katana
Prebuilt binary Artifact of the Build CI workflow (x86_64 Linux, glibc) Release assets -gnu and -musl (x86_64 Linux), each with a .sha256 file
Build from source Needs the Etemenanki repository and read access to a private Cargo registry Needs the katana repository and read access to a private Cargo registry
OpenSSL at run time The CI build links the system libssl.so.3 Built in; neither release asset loads a system OpenSSL
Hysteria 2 Always compiled in Always compiled in (Hysteria 2 nodes; katana has no Hysteria 2 outbound)
TUN inbound Always compiled in Compiled in with the kernel, never used: katana has no TUN inbound

If you are only trying the software out, the prebuilt binary is the shortest path. Build from source when you need another CPU architecture, an etemenanki-app without a system OpenSSL, or a revision that has no prebuilt binary.

Program Operating systems Prebuilt Notes
etemenanki-app Linux, macOS (Apple silicon) and Windows (x86-64, AArch64) x86_64 Linux CI builds the Linux binary only; build the others from source. On Windows a Unix-socket listen or [api] listen is refused, the process stops on Ctrl+C, and a TUN inbound needs an elevated process and wintun.dll. On macOS a TUN inbound needs root and a utun<N> name. See TUN.
katana Linux x86_64 Linux, -gnu and -musl The release workflow builds no other platform or architecture.

The prebuilt glibc binaries (etemenanki-app, and katana -gnu) are compiled on Ubuntu 22.04 against glibc 2.35. A host with glibc 2.35 or newer runs them; on an older glibc they may fail to start with a version `GLIBC_2.xx' not found error. The katana -musl binary has no glibc requirement.

etemenanki-app has no tagged releases. The Build workflow in the Etemenanki repository compiles etemenanki-app for x86_64-unknown-linux-gnu and uploads it as a workflow artifact named etemenanki-app. It runs for every pull request, and on any branch when someone starts it by hand; a push to main does not start it. For a binary of main, start the workflow on main yourself and take the artifact from that run. You need read access to the repository to download it, and write access to start the workflow.

  1. Start the Build workflow on main, from the repository’s Actions tab (Run workflow) or with the GitHub CLI, and wait for the run to finish:

    Terminal window
    gh workflow run Build --repo OWNER/Etemenanki --ref main

    Then download the etemenanki-app artifact of that run. GitHub packs artifacts into a zip file and does not keep the executable bit, so unpack it first:

    Terminal window
    unzip etemenanki-app.zip

    With the GitHub CLI, look up the latest successful run started by hand on main and download its artifact. gh run download unpacks the zip for you, but the executable bit is still lost:

    Terminal window
    RUN_ID=$(gh run list --repo OWNER/Etemenanki --workflow Build --branch main \
    --event workflow_dispatch --status success --limit 1 \
    --json databaseId --jq '.[0].databaseId')
    gh run download "$RUN_ID" --repo OWNER/Etemenanki --name etemenanki-app
  2. The CI binary loads OpenSSL 3 (libssl.so.3) from the system. On Debian 12 and Ubuntu 22.04 it lives in the libssl3 package, and on Debian 13 and Ubuntu 24.04 in libssl3t64. Most installations already have it:

    Terminal window
    sudo apt-get install -y libssl3 # libssl3t64 on Debian 13 and Ubuntu 24.04
  3. Install the binary. install -m 0755 sets the executable bit that the zip lost:

    Terminal window
    sudo install -m 0755 etemenanki-app /usr/local/bin/etemenanki-app
  4. Check that it runs:

    Terminal window
    etemenanki-app --version
    etemenanki-app 3.0.0

Both programs use Rust edition 2024 and pin no toolchain. Use the current stable Rust from rustup. The locked dependencies need Rust 1.91 or newer (the WireGuard netstack, smoltcp 0.13, declares that minimum). With an older compiler Cargo stops before compiling anything, with an error that the installed rustc is not supported by the locked packages; the list includes smoltcp@0.13.1 requires rustc 1.91. Update with:

Terminal window
rustup update stable

Both projects set lto = true in their release profile, so a release build takes several minutes and a good deal of memory. Build with --locked so Cargo uses exactly the dependency versions in Cargo.lock and stops instead of changing them.

The kernel crates etemenanki-app uses (etemenanki-concepts, etemenanki-environment, etemenanki-protocols, etemenanki-supervisor, etemenanki-subscribe and etemenanki-webclient) are path dependencies inside the same workspace. The QUIC stack that Hysteria 2 runs on, the shinku-quinn-proto, shinku-quinn, shinku-h3-quinn and shinku-quic crates, comes from a private Cargo registry, so building etemenanki-app needs read access to it. The repository’s .cargo/config.toml declares the registry and uses Cargo’s token credential provider: give Cargo the token you were issued, either once with cargo login --registry <name>, or per build in the CARGO_REGISTRIES_<NAME>_TOKEN environment variable, where <name> is the registry name in that file. Every other locked dependency comes from crates.io.

On macOS without Homebrew’s OpenSSL, and on Windows, build OpenSSL from source with --features vendored-openssl (it needs perl, and on Windows MSVC’s nmake). Windows on AArch64 also needs clang on PATH.

Hysteria 2 and the TUN inbound are always compiled in: app/Cargo.toml enables the hysteria and tun features of etemenanki-protocols, and there is nothing to switch on.

TLS for every TCP transport (tls, and ws or grpc with TLS) comes from OpenSSL. Hysteria 2 is the exception: its QUIC stack uses rustls. You can link the system’s OpenSSL (the default, and what CI does) or compile a private copy into the binary.

  1. Install the build dependencies. On Debian and Ubuntu:

    Terminal window
    # system OpenSSL (default)
    sudo apt-get install -y build-essential pkg-config libssl-dev
    Terminal window
    # vendored OpenSSL instead: no libssl-dev needed, but OpenSSL's own build needs perl and make
    sudo apt-get install -y build-essential perl make

    A C compiler is needed either way: some dependencies compile C code of their own, for example ring, the cryptography library under the Hysteria 2 QUIC stack.

  2. From the root of the Etemenanki checkout, build the etemenanki-app package:

    Terminal window
    # links the system libssl.so.3
    cargo build --release --locked -p etemenanki-app
    Terminal window
    # compiles OpenSSL into the binary
    cargo build --release --locked -p etemenanki-app \
    --features etemenanki-protocols/vendored-openssl

    The binary is written to target/release/etemenanki-app.

  3. Install it:

    Terminal window
    sudo install -m 0755 target/release/etemenanki-app /usr/local/bin/etemenanki-app
    etemenanki-app --version

For a vendored build, ldd /usr/local/bin/etemenanki-app | grep ssl prints nothing.

Both programs accept the same options:

Flag Meaning
-V, --version Print the program name and version, then exit.
-h, --help Print the options, then exit.
-c, --config <CONFIG> Path of the TOML configuration file. Default: config.toml in the current directory.
--test Load and build the configuration, print whether it is valid, and exit without binding any listener.

--version is the quickest check that the binary runs on this host at all: a missing shared library or a too-old glibc shows up here, before any configuration is involved. The version is the crate version the binary was built from.

Terminal window
etemenanki-app --version # etemenanki-app 3.0.0
katana --version # katana 5.0.0

--version shows only the program’s own crate version. The kernel crates have versions of their own, and a kernel release does not always bump either program. etemenanki-app 3.0.0 and katana 5.0.0 are both built from etemenanki-concepts 2.1.2 and etemenanki-environment 3.2.1. etemenanki-app 3.0.0 is also built from etemenanki-reality 0.1.1, etemenanki-protocols 7.0.0, etemenanki-supervisor 2.0.0 and etemenanki-subscribe 1.1.0; katana 5.0.0 from etemenanki-reality 0.1.0, etemenanki-protocols 6.2.0, etemenanki-supervisor 1.0.1 and the helium-node-api crate 0.1.0. Both use shinku-quic 0.1.0. To see which kernel versions a source build contains, look them up in the Cargo.lock of the checkout you built from.

Once you have a configuration, --test is the next check. etemenanki-app prints Configuration OK. and katana prints Configuration OK when the file is valid. The next page, Your first proxy, writes a configuration and tests it.

Neither program has a built-in location for its files. etemenanki-app and katana read the configuration from -c, and every other file (certificates, CA bundles, geodata, katana’s audit rule list) from the path you write in the configuration. The layout below keeps each program’s files in one directory under /etc:

  • Directoryusr/local/bin/
    • etemenanki-app
    • katana
  • Directoryetc/
    • Directoryetemenanki/
      • config.toml the file you pass with -c
      • subscribe.toml a provider’s subscribe file, only if [subscribe] names one
      • Directorycerts/
        • fullchain.pem certificate chain for TLS inbounds
        • privkey.pem private key, readable only by the service
      • geoip.dat only if rules use geoip
      • geosite.dat only if rules use geosite
    • Directorykatana/
      • config.toml
      • Directorycerts/
        • fullchain.pem
        • privkey.pem
      • geoip.dat
      • geosite.dat
      • rules.txt local audit rules, if you set rule_list_path

A few details about these files:

  • Private keys. Keep the key readable by the service’s user only, for example sudo install -m 0600 privkey.pem /etc/etemenanki/certs/, and change the owner if the service does not run as root.
  • Geodata. Both programs read v2ray-format geoip.dat and geosite.dat files. The v2fly projects publish them: geoip.dat, and dlc.dat, which you save as geosite.dat. You need them only if a rule uses a geoip or geosite matcher; a rule that does, without the file configured, is a configuration error.
  • Hot reload. Both programs watch the directory that contains the configuration file, and etemenanki-app also the directory of the subscribe file its configuration names. etemenanki-app reloads when the bytes of the configuration file or of the subscribe file change; to put a renewed certificate into service, change the configuration file as well. katana reads its certificates again at every panel poll. See Hot reload and, for katana, Hot reload.
Symptom Cause Fix
error while loading shared libraries: libssl.so.3: cannot open shared object file The etemenanki-app CI binary, or a default source build, needs the system OpenSSL 3. Install libssl3 (libssl3t64 on Debian 13 and Ubuntu 24.04), or build with --features etemenanki-protocols/vendored-openssl.
version `GLIBC_2.xx' not found The host’s glibc is older than the one the binary was built against. For katana, use the -musl asset. For etemenanki-app, build from source on the host.
sha256sum: katana-…: No such file or directory The binary was renamed or saved in another directory before the check. Keep the original name and run sha256sum -c in the directory that holds both files.
Cargo stops with smoltcp@0.13.1 requires rustc 1.91 The Rust toolchain is too old for the locked dependencies. rustup update stable.
Could not find openssl via pkg-config or Could not find directory of OpenSSL installation A default etemenanki-app build cannot find the OpenSSL development files. Install pkg-config and libssl-dev, or build with the vendored OpenSSL feature.
A build of katana or etemenanki-app fails when Cargo contacts the private registry Cargo has no token for the private registry, or the token has no access. Set the token as described in Build from source.
configuration invalid: … No such file or directory (os error 2), or katana’s configuration error: … with the same ending The configuration file is missing, or a relative path in it was opened from a different working directory. Use absolute paths.
TLS outbounds or DNS over TLS or HTTPS fail certificate verification with a vendored OpenSSL The vendored OpenSSL looks for roots in /usr/local/ssl. Set SSL_CERT_FILE, or set ca_file.

With the binary installed, write a configuration and run it. Running the programs as a service, including privileges for low ports and TUN, is covered on Running. The katana configuration and panel setup are described in the katana section of this guide.