Skip to main content
This guide covers deploying the iii Engine and configuring it for production use.

Installation

Install the iii Engine binary:
Or run directly with Cargo:

Running the Engine

The engine accepts the following CLI arguments: Start the engine:

Configuration File

The engine uses a YAML configuration file to define active workers and their settings.

Basic Structure

Environment Variables

Configuration supports environment variable expansion using ${VAR_NAME:default_value}:
Behavior:
  • If REDIS_URL is set, uses that value
  • If not set, uses the default (redis://localhost:6379)
  • If no default provided and variable is missing, engine logs an error

Docker Deployment

Single Container

The quickest way to get started is pulling the pre-built image:

Docker Compose (Development)

The base docker-compose.yml runs the engine with Redis and RabbitMQ:

Docker Compose (Production Example)

The included docker-compose.prod.yml runs iii behind a Caddy reverse proxy for TLS, using only built-in adapters. 1. Edit the Caddyfile — replace your-domain.com with your actual domain:
See the Caddy documentation for TLS and reverse proxy configuration. 2. Start the stack:

Reverse Proxy Examples

The iii engine does not handle TLS itself. Place a reverse proxy in front of it to terminate TLS. Below are minimal examples for Caddy and Nginx.

Caddy

Nginx

See the Nginx documentation for SSL, header, and proxy configuration.

Production Configuration

Example configuration using built-in adapters:
For scale-out or production durability, workers such as Streams and Queue typically use external adapters such as Redis or RabbitMQ. See the Configuration File section for examples.

Production Checklist

Security Hardening

Running the iii container with minimal privileges:
  • Read-only filesystem (--read-only): Prevents writes to the container filesystem
  • Drop all capabilities (--cap-drop=ALL): Minimizes kernel access
  • No new privileges (--security-opt=no-new-privileges:true): Prevents privilege escalation
  • Non-root user: The official image already runs as a non-root user

Health Checks and Monitoring

The engine exposes Prometheus metrics on port 9464:
Health check endpoints:

Built-in Defaults

When you start the engine with iii --use-default-config, it loads the core workers plus an in-memory iii-observability configuration. Traces, metrics, and logs are enabled and stored in memory by default in this mode. Queue and Stream use their built-in adapters under this mode. For custom ports or production adapters such as Redis or RabbitMQ, provide an explicit config.yaml.

Startup Flow

Multi-Instance Deployment

When running multiple engine instances:
  1. Redis Required: Use Redis adapters for Queue, Cron, Streams, and State
  2. Load Balancing: Use a load balancer for API endpoints
  3. Distributed Locking: Cron worker uses Redis locks to prevent duplicate execution
  4. Session Affinity: Not required - workers connect to any engine instance

Health Checks

Monitor engine health by checking:
  1. WebSocket Port: Engine listens on 127.0.0.1:49134 by default
  2. Worker Ports: HTTP API (3111), Streams (3112)
  3. Redis Connection: If using Redis adapters
Example health check:

Logging

iii --use-default-config already enables the built-in observability worker with in-memory exporters. Provide an explicit config only if you want to change ports, exporters, or log level. Configure the observability worker (traces, metrics, logs):
Configure Rust logging verbosity via environment variable: