Installation
Install the iii Engine binary:Running the Engine
The engine accepts the following CLI arguments:| Argument | Short | Default | Description |
|---|---|---|---|
--config | -c | config.yaml | Path to configuration file |
--use-default-config | - | - | Start with built-in defaults instead of a config file |
--version | -v | - | Print version and exit |
Configuration File
The engine uses a YAML configuration file to define active modules and their settings.Basic Structure
Environment Variables
Configuration supports environment variable expansion using${VAR_NAME:default_value}:
- If
REDIS_URLis 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 basedocker-compose.yml runs the engine with Redis and RabbitMQ:
| Port | Service |
|---|---|
| 49134 | WebSocket (worker connections) |
| 3111 | HTTP API |
| 3112 | Streams API |
| 9464 | Prometheus metrics |
Docker Compose (Production Example)
The includeddocker-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:
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
Production Configuration
Example configuration using built-in adapters: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 port9464:
Built-in Defaults
When you start the engine withiii --use-default-config, it loads the modules registered as enabled by default in the current build, including the core REST API, queue, cron, pub/sub, state, stream, and KV modules.
Queue and Stream use their built-in adapters under this mode. For custom ports, observability, or production adapters such as Redis or RabbitMQ, provide an explicit config.yaml.
Startup Flow
Multi-Instance Deployment
When running multiple engine instances:- Redis Required: Use Redis adapters for Queue, Cron, Streams, and State
- Load Balancing: Use a load balancer for API endpoints
- Distributed Locking: Cron module uses Redis locks to prevent duplicate execution
- Session Affinity: Not required - workers connect to any engine instance
Health Checks
Monitor engine health by checking:- WebSocket Port: Engine listens on
127.0.0.1:49134by default - Module Ports: HTTP API (3111), Streams (3112)
- Redis Connection: If using Redis adapters