Skip to main content
Django + arq . Self-hosted . Open source

Django arq Dashboard

Run arq inside a Django app and you have working background jobs. Run arq with z4j and you also have a dashboard, persistent history, the task controls this adapter can execute safely, scheduler integration, RBAC with invitations, and a tamper-evident audit log. z4j is one container or one Python process; the agent is one pip extra in your existing Django venv.

Django + arq works the same way every other Django + queue combo works under z4j: pip install the framework adapter with the engine extra, set the four Z4J_* environment variables, and add the engine adapter's worker hook (see the engine docs) before restarting your worker. z4j stays where you put it (homelab, on-prem, or cloud); the agent always reaches out.

install

Install z4j alongside Django + arq

1. Install the brain

bash
pip install z4j && z4j serve

First boot prints a setup URL to stderr. Open it, create the first admin, and mint a token + HMAC secret for this agent.

2. Add the agent to your Django venv

bash
pip install z4j-django[arq]

3. Wire it into Django

python
# settings.py
INSTALLED_APPS += ["z4j_django"]

Z4J = {
    "brain_url":   env("Z4J_BRAIN_URL"),
    "token":       env("Z4J_TOKEN"),
    "hmac_secret": env("Z4J_HMAC_SECRET"),
    "project_id":  env("Z4J_PROJECT_ID"),
    "agent_name":  env("Z4J_AGENT_NAME", default=None),
}
# z4j-django discovers only Celery in the web process; the arq
# worker process needs its own hook (see below).

Task lifecycle events come from the arq worker process, which needs the z4j-arq worker hook. See the arq docs.

What you get

  • Persistent arq task history in Postgres or SQLite
  • Adapter-advertised controls: submit_task, cancel_task (Job.abort)
  • Scheduler integration via arq cron; available controls depend on that scheduler adapter
  • RBAC with invitations and password reset
  • HMAC-chained tamper-evident audit log
  • Notifications: email, Slack, Telegram, webhook
License

z4j-django and z4j-arq are Apache 2.0. Importing them into your Django app does not affect your application's licensing. z4j is AGPL-3.0-or-later, isolated in its own process.

arq actions exposed

What the dashboard can actually do

Native actions

  • submit_task
  • cancel_task (Job.abort)

Event capture

attach_to_worker_settings() chains onto on_job_start / on_job_end; it must be attached for lifecycle capture.

Reconciliation

arq.jobs.Job.status() + result_info(): clean deferred/queued/in_progress/complete mapping.

other Django stacks

Django with a different engine

arq on other frameworks

Same engine, different framework

Start using Django arq Dashboard

Self-hosted, open source, no SaaS, no telemetry. z4j runs anywhere Python or Docker runs.