Operate

Architecture

The processes, storage and external services behind an axonpush installation, and how self-host differs from the hosted service.

axonpush runs as one executable. A single axonpush serve process contains the API, the background workers, the evidence archive workers, the dashboard and a child process for authentication. PostgreSQL holds all state and all pending work. S3 holds large payloads and the evidence archive. Nothing else is required: no Redis, no message broker, no scheduler service.

Components

ComponentWhere it runsWhat it does
APIserve, public listenerIngest (SDK events, OTLP, Sentry DSN), dashboard and API reads, workspace authoring, audit and evidence endpoints, MCP at /mcp, /healthz, /license.
Dashboardserve, public listenerThe single-page app, embedded in the executable. /runtime-config.js gives it the API and auth URLs at startup.
Auth serviceChild process on a random loopback portBetter Auth: accounts, sessions, organisations and invitations, SSO, Google sign-in, API keys, JWT issuance and MCP OAuth. Reached through /api/auth, /api-keys and /sso on the public listener.
Work dispatcherserveRuns durable work from PostgreSQL: ingest follow-up, derived data, lifecycle deadlines, webhook and export delivery, evidence archive jobs.
Activity workerserve, via the dispatcherProjects observations into workspace entities, milestones and incidents, and fires named deadlines.
Monitor sweepserveChecks cron monitors for missed and timed-out runs once a minute.
Licence heartbeatserve, via the dispatcherActivates the licence and checks in hourly. Self-host only. See Licensing.

The auth executable is compiled with Bun and embedded in axonpush. On first start it is extracted into the state directory and checked against its embedded SHA-256 on every start. It only listens on 127.0.0.1, and the API reaches its internal routes with a secret generated per installation.

If the auth child or the dispatcher stops, the whole process exits so the service manager restarts a consistent installation.

Request path

  1. A client calls the public listener (directly, or through your reverse proxy).
  2. Admission control allows at most PORTABLE_MAX_ACTIVE_REQUESTS requests (default 8) at a time. Extra requests get 503 with Retry-After: 1 before their body is read. /healthz is never refused.
  3. Auth routes are proxied to the auth child. Everything else goes to the API or the dashboard files.
  4. For ingest, the API validates the key and scope, applies redaction and capture policy, writes the events to PostgreSQL and queues follow-up work in the same database, then responds. A stored response means durably accepted, not yet projected.
  5. Payloads too large to keep inline are written to the payload bucket and referenced from the event row.

Durable work and event transport

The self-host runtime uses PostgreSQL as its event transport. Work is a row in portable_delivery; LISTEN/NOTIFY only wakes the dispatcher, it is not the source of truth.

  • Producers and consumers ship in the same executable, so batches are compressed and can be up to 1 MiB encoded.
  • On startup the dispatcher scans only pending work. It then waits for notifications or the next due time, with no polling loop.
  • Leases expire and are picked up again after a crash, so a job can run more than once. Handlers are written to be idempotent.
  • Failed work is retried with backoff, then marked failed and kept for seven days. axonpush jobs list and axonpush jobs retry let you inspect and redrive it.
  • A PostgreSQL advisory lock allows exactly one dispatcher per database. A second serve against the same database exits.

Named deadlines (for example “no reply within 2 hours”) are rows with a due time, so they survive restarts. If the host is down when one falls due, it runs when the service is back.

PostgreSQL

One database holds everything: application tables, the auth tables, workspace revisions, the hot copy of events, pending work, licence state and evidence metadata (segments, seals, locators). There is no second database.

The runtime opens at most five connections from its main pool, two from the auth service (AUTHSVC_DB_MAX_CONNS) and one dedicated listener connection for the dispatcher. Migrations run with a separate owner login; the service itself uses a role with data privileges only. See Self-host.

Object storage

BucketMutableContents
Payload bucket (INGEST_ARCHIVE_BUCKET)YesLarge event payloads and temporary objects.
Archive bucket (EVIDENCE_ARCHIVE_BUCKET)No, Object LockHourly sealed segments: encrypted records, metadata and a signed manifest per part.
Key bucket (EVIDENCE_KEYS_BUCKET)Overwrite only, never versionedWrapped per-subject and per-organisation keys. Overwriting a key with a tombstone is how erasure works.

Events stay in PostgreSQL for the hot window (30 days on self-host unless the licence sets another value). With the archive enabled, each closed hour is sealed into the archive, and hot rows are deleted only after their sealed copy exists. Older events are read back from the archive on demand. The two evidence buckets are optional; see Evidence archive.

External services

ServiceUsed forRequired
Amazon SESSign-up, invitation, password reset and alert emailsYes
axonpush control plane (control.axonpush.xyz)Licence activation and hourly heartbeatYes, self-host
RFC 3161 timestamp authorityIndependent timestamps on daily archive anchorsNo
Your webhook, OTLP and evidence pack destinationsOutbound deliveryOnly if configured

Outbound delivery uses a client that refuses redirects, private addresses and ports other than 80, 443 and 4318 unless you allow them with AXONPUSH_OUTBOUND_PORTS and AXONPUSH_OUTBOUND_PRIVATE_ORIGINS.

Self-host and the hosted service

The hosted service at app.axonpush.xyz runs the same code, built as a separate edition. The edition is fixed at build time, so a self-host executable cannot be switched into the hosted edition by configuration.

Self-hostHosted
LicenceRequired; activation and hourly heartbeatNone
LimitsFrom the licence: seats, hot retention, monthly events, featuresPlan catalog
BillingNonePlans and top-ups
OrganisationsAny number, subject to SIGNUP_MODEPer-account allowance
Hot retention30 days, or the licence’s valueDepends on plan
Default archiveGOVERNANCE lock for 2,555 daysDepends on plan
Compliance featuresOn unless the licence turns them offDepends on plan
Who runs PostgreSQL, S3, SES, backups and upgradesYouaxonpush
Data locationYour database and buckets, in the region you chooseaxonpush’s infrastructure

The source tree also contains separate api, worker, activity-worker and cron programs and a CDK app for an AWS Lambda deployment. That deployment is retired and is not supported for new installations.