Install / Docker

Docker Installation

Versioned images, a Docker-only first request, and Compose examples for file mode, PostgreSQL, and CP/DP deployments.

Pull the Image

Images are multi-arch (linux/amd64 and linux/arm64) and pull anonymously from both Docker Hub and GHCR. Both registries serve the same image index for each version tag. The latest tag tracks development builds of main, so always pin a release.

bash
# Docker Hub (public pulls); pin a published tag
docker pull ferrumedge/ferrum-edge:v0.9.21

# Or the same image from GHCR
docker pull ghcr.io/ferrum-edge/ferrum-edge:v0.9.21

# Verify
docker run --rm ferrumedge/ferrum-edge:v0.9.21 version

Send Your First Request

This walkthrough needs Docker, curl and a bash-compatible shell: no Compose, database, or local Ferrum Edge binary. It puts a throwaway backend container and the gateway on one Docker network, then sends a real request through the gateway. Run the blocks in order in one terminal. Every resource it creates is named ferrum-demo or starts with ferrum-demo-, so the clean-up commands leave your other containers and volumes alone.

1

Create the Configuration and a Network

bash
mkdir -p ferrum-docker && cd ferrum-docker
cat > ferrum.yaml << 'EOF'
version: "1"
proxies:
  - id: "demo-api"
    listen_path: "/api"
    backend_scheme: http
    backend_host: "ferrum-demo-backend"
    backend_port: 3000
    strip_listen_path: true
plugin_configs: []
EOF
chmod 0644 ferrum.yaml  # the image runs as UID 65532, which must be able to read it
docker network create ferrum-demo

Inside a container, localhost is the container itself, so the route names the backend container, ferrum-demo-backend, instead of localhost:3000. Create the file before any docker run that mounts it: if ferrum.yaml does not exist, Docker creates an empty directory with that name and the gateway exits with path exists but is not a regular file. Remove that directory and create the file again.

2

Start a Throwaway Backend

bash
docker run -d --name ferrum-demo-backend --network ferrum-demo \
  python:3.13-alpine@sha256:7984cf56ceaddebe4fefeb75d64000b9f45d8b77b11a09b24524da6cdc3af0c8 \
  sh -c "mkdir -p /srv/demo && cd /srv/demo && echo 'hello from the backend' > index.html && exec python -m http.server 3000"

Any HTTP server on port 3000 of that network works; this one serves a single line of text and is not published to your machine. The official Python image is pinned by digest, like the gateway release.

3

Validate, Then Start the Gateway

bash
docker run --rm -e FERRUM_MODE=file \
  -v "$PWD/ferrum.yaml:/etc/ferrum/config.yaml:ro" \
  ferrumedge/ferrum-edge:v0.9.21 validate --spec /etc/ferrum/config.yaml &&
docker run -d --name ferrum-demo-gateway --network ferrum-demo \
  -p 127.0.0.1:8000:8000 \
  -p 127.0.0.1:9000:9000 \
  -v "$PWD/ferrum.yaml:/etc/ferrum/config.yaml:ro" \
  -e FERRUM_MODE=file \
  -e FERRUM_FILE_CONFIG_PATH=/etc/ferrum/config.yaml \
  -e FERRUM_ADMIN_BIND_ADDRESS=0.0.0.0 \
  ferrumedge/ferrum-edge:v0.9.21
# Expected: ... Validation passed. followed by the new container ID

The image defaults to FERRUM_MODE=database, so validate needs FERRUM_MODE=file too; without it, validation fails asking for FERRUM_ADMIN_JWT_SECRET. Inside the container the admin listener binds to loopback by default, which a published port cannot reach. FERRUM_ADMIN_BIND_ADDRESS=0.0.0.0 makes it reachable, and the 127.0.0.1: prefixes keep both ports off other machines; other containers you attach to ferrum-demo can still reach them. File-mode admin is read-only; the gateway still logs a warning about the plaintext bind, and another because the config file is world-readable. Both are expected for this demo, which holds no secrets.

4

Wait for Readiness and Send a Proxied Request

bash
# 1. Readiness on the admin listener (no auth): 503 until the proxy listener is up. Tries 30 times.
for i in $(seq 30); do curl -fsS --max-time 2 http://localhost:9000/health && break; sleep 1; done; echo
# Expected: {"status":"ok","ready":true} (curl errors printed before it are startup retries)

# 2. A real proxied request: /api is stripped and forwarded to ferrum-demo-backend.
curl -sS -i --max-time 5 --retry 5 --retry-delay 1 http://localhost:8000/api/
# Expected: HTTP/1.1 200 OK ... via: 1.1 ferrum-edge ... hello from the backend
# (a 502 printed before it is a retry while the backend starts)
ℹ️
Read the results before moving on. If check 1 never succeeds, run docker logs ferrum-demo-gateway; a Permission denied error means the container cannot read ferrum.yaml. If check 2 returns 502 with an X-Gateway-Error header after its retries, the gateway is alive but cannot reach the backend; run docker logs ferrum-demo-backend and confirm both containers joined ferrum-demo. A passing readiness check alone does not prove that proxying works.

To try database mode next, skip this clean-up and remove only the gateway with docker rm -f ferrum-demo-gateway.

bash — clean up when you are done
docker rm -f ferrum-demo-gateway ferrum-demo-backend && docker network rm ferrum-demo

Image Variants

The default image ships a no-op mock eBPF capture backend, which is what you want for ordinary gateway proxying. Real ambient mesh capture needs one of the Linux-only variants.

TagUse it forNotes
v0.9.21 Gateway proxying on any platform Default. Mock eBPF capture backend — not real capture.
v0.9.21-ebpf Real ambient / node-waypoint eBPF capture Linux only; kernel ≥ 5.7 with cgroup v2 + bpffs. Distroless — no /bin/sh, no iptables, so FERRUM_NODE_AGENT_FALLBACK_MODE=iptables crash-loops here.
v0.9.21-ebpf-tools iptables fallback and Ambient host-network UDP lifecycle Same eBPF build on Debian slim, carrying sh, iptables, ip6tables, and ip.
bash
# Real eBPF capture (Linux only, distroless)
docker pull ferrumedge/ferrum-edge:v0.9.21-ebpf

# eBPF plus iptables/shell fallback tooling
docker pull ferrumedge/ferrum-edge:v0.9.21-ebpf-tools

Required kernel capabilities differ by kernel version — see node agent security. For Kubernetes, see the Kubernetes install guide.

All three families are Cosign-signed on their immutable multi-arch digests and carry SLSA provenance plus per-platform SPDX SBOM attestations; see artifact verification.

Database Mode with the Admin API

Database mode keeps configuration in SQLite on a named volume and manages it at runtime through the Admin API. This example reuses the ferrum-demo network and ferrum-demo-backend from the first-request walkthrough; remove the file-mode gateway first with docker rm -f ferrum-demo-gateway. If you already ran that walkthrough's clean-up, run docker network create ferrum-demo and step 2 again. The token step also needs Node.js. Replace the example FERRUM_ADMIN_JWT_SECRET before you run the command: anyone who can reach port 9000 and has read this page could otherwise sign admin tokens.

bash
docker run -d \
  --name ferrum-demo-gateway \
  --network ferrum-demo \
  -p 127.0.0.1:8000:8000 \
  -p 127.0.0.1:9000:9000 \
  -v ferrum-demo-data:/data \
  -e FERRUM_MODE=database \
  -e FERRUM_DB_TYPE=sqlite \
  -e FERRUM_DB_URL="sqlite:////data/ferrum.db?mode=rwc" \
  -e FERRUM_ADMIN_JWT_SECRET="replace-with-a-random-secret-at-least-32-chars" \
  -e FERRUM_ADMIN_BIND_ADDRESS=0.0.0.0 \
  -e FERRUM_ALLOW_INSECURE_ADMIN_HTTP=true \
  ferrumedge/ferrum-edge:v0.9.21

# Wait for readiness, as in check 1 of the walkthrough.
for i in $(seq 30); do curl -fsS --max-time 2 http://localhost:9000/health && break; sleep 1; done; echo
# Expected: {"status":"ok","ready":true}

If readiness never reports ok, run docker logs ferrum-demo-gateway; a secret shorter than 32 characters stops startup. A new ferrum-demo-data volume starts with no routes; one left from an earlier run keeps its routes. Export the same secret as FERRUM_ADMIN_JWT_SECRET, mint ADMIN_TOKEN with the snippet in the Admin API reference, then create the route and send a request through it:

bash
curl -sS --max-time 10 -X POST http://localhost:9000/proxies \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "X-Ferrum-Namespace: ferrum" \
  -H "Content-Type: application/json" \
  -d '{"listen_path": "/api", "backend_scheme": "http", "backend_host": "ferrum-demo-backend", "backend_port": 3000, "strip_listen_path": true}'; echo
# Expected: the created proxy as JSON, including its "id"

curl -sS -i --max-time 5 --retry 5 --retry-delay 1 http://localhost:8000/api/
# Expected: HTTP/1.1 200 OK ... via: 1.1 ferrum-edge ... hello from the backend
# (a 502 printed before it is a retry)

# Clean up, including the demo database volume
docker rm -f ferrum-demo-gateway ferrum-demo-backend && docker network rm ferrum-demo && docker volume rm ferrum-demo-data
⚠
Admin API security: inside the container the admin listener binds to loopback by default, which a published port cannot reach. In writable database/cp modes the gateway refuses to start a plaintext admin listener on a non-loopback address unless FERRUM_ADMIN_ALLOWED_CIDRS restricts callers or FERRUM_ALLOW_INSECURE_ADMIN_HTTP=true opts in. That opt-in is for local development only; this example publishes port 9000 on 127.0.0.1 alone, although other containers on ferrum-demo can still reach it. In production, drop it and serve admin over TLS (FERRUM_ADMIN_TLS_CERT_PATH/FERRUM_ADMIN_TLS_KEY_PATH, publish 9443, set FERRUM_ADMIN_HTTP_PORT=0) or restrict callers with FERRUM_ADMIN_ALLOWED_CIDRS, including loopback for local health probes. See docs/docker.md.

Docker Compose — Database Mode (PostgreSQL)

yaml — docker-compose.yml
services:
  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: ferrum
      POSTGRES_USER: ferrum
      POSTGRES_PASSWORD: ferrum_secret
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ferrum"]
      interval: 5s
      timeout: 5s
      retries: 5

  ferrum-edge:
    image: ferrumedge/ferrum-edge:v0.9.21
    depends_on:
      postgres:
        condition: service_healthy
    ports:
      - "8000:8000"
      - "8443:8443"
    environment:
      FERRUM_MODE: database
      FERRUM_DB_TYPE: postgres
      FERRUM_DB_URL: postgres://ferrum:ferrum_secret@postgres:5432/ferrum
      FERRUM_ADMIN_JWT_SECRET: "change-this-to-a-32-plus-character-secret"
      FERRUM_ADMIN_BIND_ADDRESS: 127.0.0.1
      FERRUM_LOG_LEVEL: info
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "/app/ferrum-edge", "health"]
      interval: 10s
      timeout: 5s
      retries: 3

volumes:
  postgres_data:

As written, this file keeps the Admin API inside the container and starts with no routes. To manage it from this machine during development, add "127.0.0.1:9000:9000" to ports, set FERRUM_ADMIN_BIND_ADDRESS: 0.0.0.0 and FERRUM_ALLOW_INSECURE_ADMIN_HTTP: "true", and read the Admin API security note above.

Docker Compose — File Mode (no database)

yaml — docker-compose.file.yml
services:
  ferrum-edge:
    image: ferrumedge/ferrum-edge:v0.9.21
    ports:
      - "8000:8000"
    volumes:
      - ./ferrum.yaml:/etc/ferrum/config.yaml:ro
    environment:
      FERRUM_MODE: file
      FERRUM_FILE_CONFIG_PATH: /etc/ferrum/config.yaml
      FERRUM_LOG_LEVEL: info
    restart: unless-stopped

Docker Compose — Control Plane / Data Plane

yaml — docker-compose.cpdp.yml
services:
  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: ferrum
      POSTGRES_USER: ferrum
      POSTGRES_PASSWORD: ferrum_secret
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ferrum"]
      interval: 5s
      timeout: 5s
      retries: 5

  control-plane:
    image: ferrumedge/ferrum-edge:v0.9.21
    depends_on:
      postgres:
        condition: service_healthy
    ports:
      - "50051:50051"  # CP gRPC
    environment:
      FERRUM_MODE: cp
      FERRUM_DB_TYPE: postgres
      FERRUM_DB_URL: postgres://ferrum:ferrum_secret@postgres:5432/ferrum
      FERRUM_ADMIN_JWT_SECRET: "change-this-to-a-32-plus-character-secret"
      FERRUM_CP_GRPC_LISTEN_ADDR: "0.0.0.0:50051"
      FERRUM_CP_DP_GRPC_JWT_SECRET: "change-this-cp-dp-secret-min-32-chars"
      FERRUM_CP_DP_GRPC_ALLOW_PLAINTEXT: "true"  # local dev only — use TLS in production
    restart: unless-stopped

  data-plane-1:
    image: ferrumedge/ferrum-edge:v0.9.21
    depends_on:
      - control-plane
    ports:
      - "8000:8000"
      - "8443:8443"
    environment:
      FERRUM_MODE: dp
      FERRUM_DP_CP_GRPC_URLS: http://control-plane:50051
      FERRUM_ADMIN_JWT_SECRET: "change-this-to-a-32-plus-character-secret"
      FERRUM_CP_DP_GRPC_JWT_SECRET: "change-this-cp-dp-secret-min-32-chars"
      FERRUM_CP_DP_GRPC_ALLOW_PLAINTEXT: "true"
    restart: unless-stopped

  data-plane-2:
    image: ferrumedge/ferrum-edge:v0.9.21
    depends_on:
      - control-plane
    ports:
      - "8001:8000"
      - "8444:8443"
    environment:
      FERRUM_MODE: dp
      FERRUM_DP_CP_GRPC_URLS: http://control-plane:50051
      FERRUM_ADMIN_JWT_SECRET: "change-this-to-a-32-plus-character-secret"
      FERRUM_CP_DP_GRPC_JWT_SECRET: "change-this-cp-dp-secret-min-32-chars"
      FERRUM_CP_DP_GRPC_ALLOW_PLAINTEXT: "true"
    restart: unless-stopped

volumes:
  postgres_data:

Docker Environment Variables

VariableDescriptionRequired
FERRUM_MODEfile | database | cp | dp | mesh | injector | node_agent | migrateYes
FERRUM_FILE_CONFIG_PATHConfig file path (file mode)file mode
FERRUM_DB_TYPEpostgres | mysql | sqlite | mongodbdb/cp modes
FERRUM_DB_URLDatabase connection stringdb/cp modes
FERRUM_ADMIN_JWT_SECRETJWT secret for Admin API (min 32 chars)db/cp/dp modes
FERRUM_DP_CP_GRPC_URLSComma-separated Control Plane URLs (DP mode, failover order)dp mode
FERRUM_CP_DP_GRPC_JWT_SECRETShared secret for CP↔DP sync (min 32 chars)cp/dp modes
FERRUM_CP_GRPC_LISTEN_ADDRgRPC listen address (CP mode)No (def: 50051)
FERRUM_LOG_LEVELerror | warn | info | debug | traceNo (def: warn)
📤
Port reference: 8000 HTTP proxy • 8443 HTTPS proxy • 9000 Admin HTTP • 9443 Admin HTTPS • 50051 CP gRPC
Kubernetes Install → Admin API Reference