Pip (SQLite)
Pure Python. No container runtime required.
Best for
Solo developers, homelab, local dev, bare-metal servers, CI
Three deployment paths, one platform. Whether you run a homelab Raspberry Pi or a production Kubernetes cluster, the z4j feature set ships in every tier.
Pure Python. No container runtime required.
Best for
Solo developers, homelab, local dev, bare-metal servers, CI
One container. SQLite bundled in the image. No env vars required.
Best for
Homelab, small teams, evaluation, proof-of-concept
Same image, external Postgres. Horizontal-scale ready.
Best for
Medium and larger businesses, regulated environments, compliance-sensitive teams
| Capability | Pip (SQLite) | Docker (SQLite) | Docker (Postgres) |
|---|---|---|---|
| Container runtime required | None (pure Python) | Docker | Docker + Postgres |
| Database | SQLite | SQLite (persisted volume) | PostgreSQL 17+ |
| Services to run | 1 process | 1 container | 2 containers |
| Agent count | ~10 | ~50 | 1000+ |
| Events per minute | ~1k | ~5k | 300k+ |
| Horizontal scaling | |||
| Full-text search | |||
| Range-partitioned events | |||
| Auto-migrations | |||
| Auto-generated secrets | |||
| Compliance-friendly (Postgres) |
Pure Python. No container runtime required.
# Install the brain + umbrella (dashboard, backend, SQLite, all bundled)
pip install z4j
# Start it. First boot auto-mints HMAC secrets, runs migrations, and prints
# a one-time setup URL to stderr. Open the URL to create the first admin.
# z4j auto-detects the server's hostname, FQDN, and LAN IPs - so you can
# reach the dashboard via any of them out of the box.
z4j serve
# Then open http://<your-server>:7700 in your browser.
# Adding a public domain (e.g. tasks.example.com pointed via reverse proxy):
z4j allowed-hosts add tasks.example.com # persisted to ~/.z4j/allowed-hosts
z4j allowed-hosts list # show what's whitelisted
z4j allowed-hosts remove old-host.example # idempotent
# Restart z4j serve to pick up changes.
# Useful CLI commands (z4j and z4j-brain are aliases - same entry point):
z4j check # config + DB + migrations at head
z4j status # version, DB URL, user/project/agent counts
z4j createsuperuser # provision an admin without the setup URL
z4j changepassword # reset a user password
z4j migrate upgrade head # run alembic migrations explicitly
z4j audit verify # verify the HMAC-chained audit log
z4j reset-setup # mint a fresh setup URL (e.g. expired token) z4j-brain serves the FastAPI API, the WebSocket agent gateway, and the React dashboard from a single process. SQLite lives on local disk.
One container. SQLite bundled in the image. No env vars required.
# The default. One file. SQLite bundled in the image.
git clone https://github.com/z4jdev/z4j.git && cd z4j
cp .env.example .env # fill Z4J_SECRET + Z4J_SESSION_SECRET
docker compose up -d
# Tail logs for the first-boot admin setup URL.
docker compose logs -f z4j-brain
# Or skip interactive setup with bootstrap env vars in .env:
# [email protected]
# Z4J_BOOTSTRAP_ADMIN_PASSWORD=<long random>
# Add Caddy auto-HTTPS on top:
docker compose -f docker-compose.yml -f docker-compose.caddy.yml up -d z4jdev/z4j:latest One image. Bundles the FastAPI backend, the React dashboard, and the SQLite driver. Auto-generates secrets on first boot, persists them to the z4j_data volume, auto-runs migrations. Exposes port 7700.
Same image, external Postgres. Horizontal-scale ready.
# Two services. Same z4jdev/z4j image as the default compose; it auto-
# switches to Postgres because Z4J_DATABASE_URL is set. No build required.
git clone https://github.com/z4jdev/z4j.git && cd z4j
cp .env.example .env
# Edit .env and fill in your secrets:
# POSTGRES_PASSWORD=<long random>
# Z4J_SECRET=$(openssl rand -hex 32)
# Z4J_SESSION_SECRET=$(openssl rand -hex 32)
# Z4J_PUBLIC_URL=https://z4j.yourdomain.com
# Z4J_ALLOWED_HOSTS=z4j.yourdomain.com
docker compose -f docker-compose.postgres.yml up -d
# Capture the first-boot setup URL from the brain logs:
docker compose -f docker-compose.postgres.yml logs -f z4j-brain
# Or skip interactive setup entirely with bootstrap env vars in .env:
# [email protected]
# Z4J_BOOTSTRAP_ADMIN_PASSWORD=<long random>
# Layer Caddy auto-HTTPS on top:
docker compose -f docker-compose.postgres.yml -f docker-compose.caddy.yml up -d z4jdev/z4j:latest Same image as the default. Bundles backend plus dashboard. Connects to external Postgres via Z4J_DATABASE_URL.
postgres:18-trixie Your primary datastore. Holds events, tasks, schedules, users, HMAC-chained audit log, and partitioned event history.
z4j does not bundle a reverse proxy. Pick the TLS pattern that matches your existing infra.
One extra compose file. Auto-HTTPS via Let's Encrypt. Two minutes.
Homelab defaultAlready running Traefik? Add seven labels to the brain service.
Zero public ports. TLS terminates at Cloudflare's edge.
Classic, familiar, works everywhere. On-host or in-container.
After the brain is running, drop the agent package into your Django, Flask, or FastAPI app. One pip install plus three environment variables.
Install one or more engine adapters alongside your framework. Every deployment tier supports all six.
The industry standard, covered end-to-end.
Learn more
Lightweight Redis queue, fully instrumented.
Learn more
Middleware-driven Dramatiq observability.
Learn more
Lightweight Redis/SQLite queue, first-class.
Learn more
Async Redis queue for FastAPI-era Python.
Learn more
Broker-agnostic async task framework.
Learn moreAnswers to the common confusions about z4j's container layout.
No. The brain image bundles the FastAPI backend and the compiled React dashboard together. The backend serves the dashboard as static HTML, CSS, and JS from the same process. There is no second container for the UI.
No. Both Docker tiers use the same z4jdev/z4j image. The runtime picks SQLite or Postgres based on the Z4J_DATABASE_URL environment variable.
Tags pin versions, not modes. Use :latest for the most recent release (currently 1.0.5), or pin a specific version like :1.0.5 for reproducible deploys. Multi-arch: linux/amd64 + linux/arm64.
Two. z4j-brain runs the backend and dashboard from one image. z4j-postgres runs Postgres. No separate frontend.
No. The brain communicates with your agents over a direct WebSocket. Your task queue engine uses whatever broker it already uses (Redis, RabbitMQ, SQS). The brain observes, it does not re-broker.
Yes. Point Z4J_DATABASE_URL at your Postgres instance and restart. The same image reconnects, runs migrations, and picks up your users, audit chain, and schedules.
Solo developer or homelab: start with pip. Team of 2-20: default z4j compose. Anyone with existing Postgres or compliance needs: z4j + Postgres.