Pure Python (pip)
One pip install. No Docker. No container runtime.
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.
One pip install. No Docker. No container runtime.
Best for
Solo developers, homelab, local dev, bare-metal servers, CI
One container. Bundled SQLite. Zero required env vars.
Best for
Homelab, small teams, evaluation, proof-of-concept
Two services. Same image. Horizontal-scale ready.
Best for
Medium and larger businesses, regulated environments, compliance-sensitive teams
| Capability | Pure Python (pip) | z4j | z4j + 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) |
One pip install. No Docker. No container runtime.
# Install the brain (dashboard and backend bundled, SQLite by default)
pip install z4j-brain
# Boot with an admin account. Auto-runs migrations, generates secrets.
z4j-brain serve \
--admin-email you@example.com \
--admin-password change-me 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. Bundled SQLite. Zero required env vars.
# The default. One file. docker compose up.
# No secrets to set, no Postgres, no broker. It just works.
docker compose up -d
# Tail logs for the first-boot admin setup URL.
docker compose logs -f z4j-brain
# Or skip the interactive setup with env vars in .env:
# Z4J_BOOTSTRAP_ADMIN_EMAIL=you@example.com
# Z4J_BOOTSTRAP_ADMIN_PASSWORD=change-me 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.
Two services. Same image. Horizontal-scale ready.
# Two services. The z4j-brain image is the SAME one from the default
# compose file; it auto-switches to Postgres because Z4J_DATABASE_URL
# is set. No separate image, no custom build.
# Set your secrets in .env first:
# POSTGRES_PASSWORD=<long random>
# Z4J_SECRET=<openssl rand -hex 48>
# Z4J_SESSION_SECRET=<openssl rand -hex 48>
# Z4J_PUBLIC_URL=https://z4j.yourdomain.com
# Z4J_ALLOWED_HOSTS=["z4j.yourdomain.com"]
docker compose -f docker-compose.postgres.yml up -d --build
# First-boot admin URL is in the brain logs.
docker compose -f docker-compose.postgres.yml logs -f z4j-brain 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, :1.0.0 to pin a specific version, and :edge for pre-releases.
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.