Skip to the content.

Deployment Guide

Conduit is a single static binary with no runtime dependencies. It runs on bare metal, VMs, containers, and Kubernetes.

Not sure what config to write first? ← Configuration Recipes


Table of Contents


Docker

Four image variants are published to the GitHub Container Registry on every release. The full image has the plain tags; the others carry their bundle name as a suffix:

Variant Tags Includes
Full :latest, :2.4.0, :2.4 All 15 optional features: jwt, consumers, forward-auth, rhai, wasm, tcp, upload, redis, cache, disk-cache, acme, fault-injection, otlp, tokio-metrics, kubernetes
Standard :latest-standard, :2.4.0-standard, :2.4-standard standard feature bundle: jwt, consumers, forward-auth, cache, acme — covers the typical self-hosted reverse-proxy / API gateway
Gateway :latest-gateway, :2.4.0-gateway, :2.4-gateway gateway bundle (--no-default-features): the proxy and the standard stack without static files and live reload
Static :latest-static, :2.4.0-static, :2.4-static static-server bundle (--no-default-features): static files, compression and live reload; it does not proxy

Upgrading from 2.1 and earlier: :latest and :X.Y.Z used to be the standard image and the full image was :latest-full. Since 2.2.0 the plain tags are the full image and standard is :latest-standard; pin :X.Y.Z-standard to keep the smaller image. Tags of releases up to 2.1.x are unchanged.

# Full — all optional features enabled
docker pull ghcr.io/lopatnov/conduit:latest

# Standard (jwt, consumers, forward-auth, cache, acme)
docker pull ghcr.io/lopatnov/conduit:latest-standard

Standard vs Full: the standard image (:latest-standard) covers the majority of production use cases — TLS, proxying, routing, rate limiting, basic/API-key/JWT auth, the consumer model, ForwardAuth, response caching, auto-TLS (ACME), metrics, hot-reload. Use the full image (or build from source with --features) when you need scripting middleware (Rhai/WASM), file uploads, Redis-backed rate limiting/caching, OTLP tracing, TCP proxy mode, or Kubernetes CRD config.

All images are multi-stage musl builds packaged into FROM scratch, published for linux/amd64 and linux/arm64 under one tag (Docker picks the one of your machine; each architecture is built on a native runner, not emulated). They run as UID 65534 (nobody) with no shell or OS userland.

Healthchecks in FROM scratch images: because the image has no shell or system utilities (wget, curl), Docker CMD-SHELL healthchecks do not work. Use conduit status via the Admin API (requires global.admin in config), or rely on Kubernetes httpGet probes which are executed externally by kubelet — not inside the container.

docker run

docker run -p 8080:8080 \
  -v /path/to/conduit.yaml:/etc/conduit/conduit.yaml:ro \
  ghcr.io/lopatnov/conduit:latest -c /etc/conduit/conduit.yaml

For TLS, also mount cert files:

docker run -p 443:443 -p 80:80 \
  -v /path/to/conduit.yaml:/etc/conduit/conduit.yaml:ro \
  -v /etc/tls:/etc/tls:ro \
  ghcr.io/lopatnov/conduit:latest -c /etc/conduit/conduit.yaml

docker-compose

services:
  conduit:
    image: ghcr.io/lopatnov/conduit:latest
    ports:
      - "443:443"
      - "80:80"
    volumes:
      - ./conduit.yaml:/etc/conduit/conduit.yaml:ro
      - ./dist:/dist:ro
      - ./certs:/var/cache/conduit/certs   # ACME cert storage
    environment:
      METRICS_TOKEN: "${METRICS_TOKEN}"
      ADMIN_TOKEN: "${ADMIN_TOKEN}"
    restart: unless-stopped
    # NOTE: FROM scratch has no shell/wget — use conduit status if Admin API
    # is configured, or rely on external healthchecks (load balancer, K8s probe)
    healthcheck:
      test: ["CMD", "/conduit", "status", "--admin", "127.0.0.1:2019"]
      interval: 10s
      timeout: 3s
      retries: 3
      start_period: 5s

  api:
    image: my-api:latest
    expose: ["4000"]

The healthcheck above requires global.admin.bind: "127.0.0.1:2019" in conduit.yaml. Remove the healthcheck block if the Admin API is not configured.

Environment variables referenced as $VAR in the config file are substituted at startup. Pass secrets via environment: — never bake them into the image.

Build your own image

git clone https://github.com/lopatnov/conduit
cd conduit

# Minimal image (default = ["proxy", "compression", "static", "hotreload", "mimalloc"])
docker build -f contrib/Dockerfile -t conduit:local .

# Standard image (the published :latest-standard)
docker build -f contrib/Dockerfile \
  --build-arg FEATURES=standard \
  -t conduit:local-standard .

# Full-features image (the published :latest)
docker build -f contrib/Dockerfile \
  --build-arg FEATURES=full \
  -t conduit:local-full .

# Gateway image (the published :latest-gateway); FEATURES=static-server for :latest-static
docker build -f contrib/Dockerfile \
  --build-arg FEATURES=gateway --build-arg NO_DEFAULT_FEATURES=true \
  -t conduit:local-gateway .

systemd

The contrib/conduit.service unit file is ready for production use. It includes security hardening (NoNewPrivileges, ProtectSystem=strict) and automatic restart on failure.

Debian and Ubuntu: the .deb package

Each release has a conduit_<version>_amd64.deb and conduit_<version>_arm64.deb on the releases page: the full build as a static binary, so one package installs on Debian 12 and 13 and on any Ubuntu release (it needs no libc of a particular version, only adduser). It sets up the service for you.

# pick the file for your machine: amd64 (x86-64) or arm64 (Raspberry Pi 4/5, AWS Graviton, ...)
curl -LO https://github.com/lopatnov/conduit/releases/download/v2.4.0/conduit_2.4.0_amd64.deb
# install only if the file was built by this repository's workflow (the && stops at a failure);
# needs the GitHub CLI, signed in once with `gh auth login`
gh attestation verify conduit_2.4.0_amd64.deb --repo lopatnov/conduit \
  && sudo apt install ./conduit_2.4.0_amd64.deb

Without the GitHub CLI, compare the checksum instead. It comes from the same release as the package, so it detects a damaged download but not a tampered release; the attestation above is the stronger check.

curl -LO https://github.com/lopatnov/conduit/releases/download/v2.4.0/SHA256SUMS.txt
grep ' conduit_2.4.0_amd64.deb$' SHA256SUMS.txt | sha256sum -c - \
  && sudo apt install ./conduit_2.4.0_amd64.deb

The service is installed, but it is not enabled and not started: the sample configuration forwards port 8080 to an application on port 3000 of the same machine, which is not there yet. To start it:

sudoedit /etc/conduit/conduit.yaml                    # your sites; the file explains how to start the service
# check it before starting, as the service will run: the same account, the same /etc/conduit/conduit.env (if you made
# one), read by systemd itself (the file is not shell syntax, so it must not be sourced by a shell)
sudo systemd-run --pipe --wait --collect -p User=conduit -p Group=conduit -p WorkingDirectory=/etc/conduit \
  -p EnvironmentFile=-/etc/conduit/conduit.env /usr/bin/conduit validate -c /etc/conduit/conduit.yaml
sudo systemctl enable --now conduit                   # start now and at every boot
systemctl status conduit
journalctl -u conduit -f                              # the log
sudo systemctl restart conduit                        # after you change the configuration

What the package installs: /usr/bin/conduit; the unit /usr/lib/systemd/system/conduit.service (runs as the system user conduit, hardened as described below); /etc/conduit/conduit.yaml (readable by the conduit account only, kept when you upgrade or remove the package, deleted by apt purge); and the empty directories /var/log/conduit and /var/cache/conduit that the unit may write to. The service account cannot bind ports below 1024: to listen on 80 and 443 run sudo systemctl edit conduit and add [Service] and AmbientCapabilities=CAP_NET_BIND_SERVICE. An upgrade restarts the service if it is running and never starts one that is stopped. sudo apt remove conduit keeps your configuration; sudo apt purge conduit deletes it with the log and cache (the conduit account stays). The package and its tests are in scripts/build-deb.sh, scripts/test-deb.sh and contrib/deb/.

Coming from 2.2.0: the package was called conduit-proxy there. Installing conduit replaces it (Replaces/Conflicts) and keeps your /etc/conduit/conduit.yaml (if you edited it, dpkg asks which version to keep: answer N). The old package stops a running service as it goes, so run sudo systemctl start conduit afterwards. dpkg -l keeps listing conduit-proxy as rc (removed, configuration record left); do not purge it: its 2.2.0 postrm would delete /var/log/conduit and /var/cache/conduit. The next start of the service recreates them (the unit has LogsDirectory= and CacheDirectory=), but their files are gone.

Install

Step 1 — Get the binary.

Download a pre-built binary from GitHub Releases:

# Linux x86-64, full (adds Rhai/WASM, OTLP, TCP proxy, Redis, uploads, Kubernetes, etc.).
# The archive holds one file named like the archive, without .tar.gz.
curl -L https://github.com/lopatnov/conduit/releases/latest/download/conduit-x86_64-unknown-linux-gnu.tar.gz \
  | tar xz
sudo install -m 755 conduit-x86_64-unknown-linux-gnu /usr/local/bin/conduit

# Linux x86-64, standard (jwt, consumers, forward-auth, cache, acme)
curl -L https://github.com/lopatnov/conduit/releases/latest/download/conduit-x86_64-unknown-linux-gnu-standard.tar.gz \
  | tar xz
sudo install -m 755 conduit-x86_64-unknown-linux-gnu-standard /usr/local/bin/conduit

Or build from source — see docs/building.md.

Step 2 — Create user, directories, and install service:

# Create a dedicated system user (no home dir, no shell)
sudo useradd --system --no-create-home --shell /usr/sbin/nologin conduit

# Create directories
sudo mkdir -p /etc/conduit /var/log/conduit /var/cache/conduit

# Install config (edit before starting)
sudo cp conduit.yaml /etc/conduit/conduit.yaml
sudo chown -R conduit:conduit /etc/conduit /var/log/conduit /var/cache/conduit

# Install and enable service
sudo cp contrib/conduit.service /etc/systemd/system/conduit.service
sudo systemctl daemon-reload
sudo systemctl enable --now conduit

Secrets

Put environment variables (tokens, passwords, keys) in /etc/conduit/conduit.env:

# /etc/conduit/conduit.env
METRICS_TOKEN=my-scrape-token
ADMIN_TOKEN=my-admin-token
JWT_SECRET=my-jwt-secret
API_KEY=my-api-key

Set permissions so only the conduit user can read it:

sudo chmod 600 /etc/conduit/conduit.env
sudo chown conduit:conduit /etc/conduit/conduit.env

Reference them in conduit.yaml:

metrics:
  token: "$METRICS_TOKEN"
jwtAuth:
  secret: "$JWT_SECRET"

The unit file loads conduit.env automatically via EnvironmentFile=.

Unit file

Key parts of contrib/conduit.service:

[Service]
User=conduit
Group=conduit
WorkingDirectory=/etc/conduit
# no -c: reads conduit.json or conduit.yaml from the working directory (conduit.json if both exist)
ExecStart=/usr/local/bin/conduit
ExecReload=/usr/local/bin/conduit reload   # ← enables `systemctl reload`
Restart=on-failure
RestartSec=5s
LimitNOFILE=65536

# Hardening
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectClock=yes
ProtectHostname=yes
RestrictSUIDSGID=yes
RestrictRealtime=yes
RestrictNamespaces=yes
LockPersonality=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
SystemCallArchitectures=native
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
UMask=0027
LogsDirectory=conduit
LogsDirectoryMode=0750
CacheDirectory=conduit
CacheDirectoryMode=0750

EnvironmentFile=-/etc/conduit/conduit.env

The extra hardening (systemd-analyze security --offline=true contrib/conduit.service gives 3.2 “OK”, it was 8.3 “EXPOSED”) was started under a real systemd (Ubuntu 24.04 in a privileged container) with the unit as shipped: the reverse proxy and a static site, name resolution of the upstream, the Admin API, systemctl reload, and port 80 through the AmbientCapabilities=CAP_NET_BIND_SERVICE drop-in all worked with no permission error in the journal. Not run under the unit: the WASM runtime, ACME against a CA, Redis and the Kubernetes provider. MemoryDenyWriteExecute= is left out on purpose (the WASM runtime maps memory that is writable and then executable), and CapabilityBoundingSet= keeps CAP_NET_BIND_SERVICE so that the drop-in above keeps working. If a feature you use needs more, loosen one line with systemctl edit conduit.

LogsDirectory= and CacheDirectory= make systemd create /var/log/conduit and /var/cache/conduit (owned by the service user) at every start and keep them writable under ProtectSystem=strict, so a deleted directory is recreated by the next start.

Two things change for an operator who upgrades to this unit:

ExecReload wires systemctl reload conduit to a zero-downtime hot-reload via the Admin API — no connections are dropped.

Operations

# Check status
sudo systemctl status conduit

# View logs (live)
sudo journalctl -u conduit -f

# Hot-reload config (zero dropped connections)
sudo systemctl reload conduit
# or directly:
conduit reload --admin 127.0.0.1:2019

# Restart (required when port, TLS cert/key, or workers change)
sudo systemctl restart conduit

# Graceful shutdown
conduit shutdown --admin 127.0.0.1:2019

# Check upstream health
conduit status --upstream --admin 127.0.0.1:2019

Log rotation

# /etc/logrotate.d/conduit
/var/log/conduit/*.log {
    daily
    rotate 30
    compress
    delaycompress
    missingok
    notifempty
    postrotate
        # Reload to switch to the new log file atomically.
        # If Admin API is on a non-default port, update the --admin flag.
        conduit reload --admin 127.0.0.1:2019 || true
    endscript
}

Kubernetes

Conduit is not a Kubernetes-native ingress controller, but it fits well in several deployment patterns.

As a sidecar proxy

Run Conduit alongside your application container. Conduit handles TLS termination, auth, rate limiting, and static file serving; your app handles business logic only.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp
spec:
  replicas: 3
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      initContainers:
        # Copy frontend build into shared volume
        - name: copy-static
          image: myapp-frontend:latest
          command: ["cp", "-r", "/build/.", "/dist"]
          volumeMounts:
            - name: static-files
              mountPath: /dist

      containers:
        - name: api
          image: myapp:latest
          ports:
            - containerPort: 4000

        - name: conduit
          image: ghcr.io/lopatnov/conduit:latest
          args: ["-c", "/etc/conduit/conduit.yaml"]
          ports:
            - name: http
              containerPort: 8080
          volumeMounts:
            - name: conduit-config
              mountPath: /etc/conduit
            - name: static-files
              mountPath: /dist
          readinessProbe:
            httpGet: { path: /__health__, port: 8080 }
            initialDelaySeconds: 2
          livenessProbe:
            httpGet: { path: /__health__, port: 8080 }
            periodSeconds: 10
          env:
            - name: METRICS_TOKEN
              valueFrom:
                secretKeyRef: { name: conduit-secrets, key: metrics-token }

      volumes:
        - name: conduit-config
          configMap:
            name: conduit-config
        - name: static-files
          emptyDir: {}
---
# Expose via a Service
apiVersion: v1
kind: Service
metadata:
  name: myapp
spec:
  selector:
    app: myapp
  ports:
    - name: http
      port: 80
      targetPort: 8080

As a DaemonSet (node-level proxy)

Deploy one Conduit per node as a lightweight node-local ingress or traffic forwarder.

Security note: hostNetwork: true gives the pod full access to the node’s network namespace. Only use this when necessary (e.g. binding privileged ports < 1024 on a node without CAP_NET_BIND_SERVICE). Prefer a standard Deployment + Service + NodePort for most use cases.

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: conduit-proxy
spec:
  selector:
    matchLabels:
      app: conduit-proxy
  template:
    metadata:
      labels:
        app: conduit-proxy
    spec:
      hostNetwork: true   # ← grants node network access; see security note above
      containers:
        - name: conduit
          image: ghcr.io/lopatnov/conduit:latest
          args: ["-c", "/etc/conduit/conduit.yaml"]
          ports:
            - containerPort: 8080
              hostPort: 8080
          readinessProbe:
            httpGet: { path: /__health__, port: 8080 }
            initialDelaySeconds: 2
          volumeMounts:
            - name: config
              mountPath: /etc/conduit
      volumes:
        - name: config
          configMap:
            name: conduit-config

ConfigMap

Store the config as a ConfigMap so it can be updated without rebuilding images. Reference secrets from Kubernetes Secrets using valueFrom.secretKeyRef.

# Create ConfigMap from local file
kubectl create configmap conduit-config \
  --from-file=conduit.yaml=./conduit.yaml

# Update after config change (atomic apply)
kubectl create configmap conduit-config \
  --from-file=conduit.yaml=./conduit.yaml \
  --dry-run=client -o yaml | kubectl apply -f -

Hot-reload after ConfigMap update (requires Admin API in config):

# Port-forward to a pod's Admin API, then reload
kubectl port-forward pod/myapp-xyz 2019:2019 &
conduit reload --admin 127.0.0.1:2019

For automatic hot-reload on ConfigMap changes, use the ConduitSite CRD instead — it watches Kubernetes events directly without polling.

ConduitSite CRD (--features kubernetes)

Requires the kubernetes feature: use the :latest (full) image.

Instead of a config file or a ConfigMap, Conduit can read its sites from ConduitSite objects: one object is one virtual site, and Conduit watches the namespace, builds one config from every object, validates it and swaps it in without a restart (conduit --kubernetes-namespace default, or '*' for every namespace).

The full guide is Running Conduit from Kubernetes resources: the CRD, the RBAC and the Deployment, a first site, what a ConduitSite may and may not contain (no host paths, no $VAR expansion), what is checked on every change and what a rejected update leaves, what needs a restart (a new port, tls.acme), who may write the objects, and troubleshooting.

Compared to nginx-ingress

Feature nginx-ingress Conduit
TLS termination ✅ ✅
Auto-TLS (ACME) via cert-manager ✅ built-in
Path-based routing ✅ ✅
Load balancing ✅ ✅ several strategies
Rate limiting via annotations ✅ native
JWT / API key auth via plugin ✅ native
Prometheus metrics via exporter ✅ native
Config format YAML annotations JSON / YAML file or CRDs
Kubernetes CRDs ✅ ✅ --features kubernetes
Binary size ~50 MB ~18 MB

Conduit is a good fit when you want a simple, self-contained proxy without the overhead of a full Ingress controller. For large clusters with many teams and services, a dedicated controller (nginx, Traefik, Envoy Gateway) scales better.


Updating the binary

Zero-downtime update (systemd)

Conduit supports in-place binary replacement with no dropped connections:

# 1. Download the new binary alongside the old one
curl -L https://github.com/lopatnov/conduit/releases/latest/download/conduit-x86_64-unknown-linux-gnu.tar.gz \
  | tar xz
sudo install -m 755 conduit /usr/local/bin/conduit.new

# 2. Atomically replace the binary (rename is atomic on Linux)
sudo mv /usr/local/bin/conduit.new /usr/local/bin/conduit

# 3. Restart to load the new binary
#    Use reload first to pick up any config changes,
#    then restart only if the port/TLS/workers changed.
sudo systemctl restart conduit

On SIGTERM Conduit waits global.shutdownTimeoutSecs (default 30 s) before the process exits, so in-flight requests get that long to finish. Pingora waits the period in full even when everything drains sooner, then spends up to 5 more seconds shutting its runtimes down; size the total below your orchestrator’s kill timeout. (conduit shutdown / POST /shutdown exits as soon as nothing is in flight.)

Rolling update (Kubernetes)

# Update the image tag — Kubernetes handles the rolling restart
kubectl set image deployment/myapp conduit=ghcr.io/lopatnov/conduit:2.4.0
kubectl rollout status deployment/myapp

# Roll back if needed
kubectl rollout undo deployment/myapp

Production checklist

Before first deploy:

# 1. Validate config — exits 0 if OK, exits 1 with field-level errors
conduit validate -c conduit.yaml

# 2. Probe all upstreams — exits 1 if any are unreachable
conduit probe -c conduit.yaml

Config checklist:

After deploy:

# Verify server is healthy
conduit status --admin 127.0.0.1:2019

# Verify all upstreams are reachable
conduit status --upstream --admin 127.0.0.1:2019

# Check Prometheus metrics are reachable
curl -H "Authorization: Bearer $METRICS_TOKEN" \
  https://your-host/__metrics__ | head -5