---
title: Monitoring and health | Space Works Organization docs
description: The health endpoints, the job processes' health checks, the operator checks and status script, and the super-admin pages that show whether the platform is…
url: https://spaceworkslabs.tech/docs/organization/guides-hosting-monitoring-and-health/
updated: 2026-11-21
---

[Space Works Organization](https://spaceworkslabs.tech/docs/organization/) Start here
- [Overview](https://spaceworkslabs.tech/docs/organization/overview/)
- [Glossary](https://spaceworkslabs.tech/docs/organization/guides-start-glossary/)
- [Quickstart for members](https://spaceworkslabs.tech/docs/organization/guides-start-quickstart-member/)
- [Quickstart for organisation owners](https://spaceworkslabs.tech/docs/organization/guides-start-quickstart-owner/)
- [Quickstart for platform operators](https://spaceworkslabs.tech/docs/organization/guides-start-quickstart-operator/)
Features
- [Certificates](https://spaceworkslabs.tech/docs/organization/features-certificates/)
- [Groupings](https://spaceworkslabs.tech/docs/organization/features-groupings/)
- [Member cards](https://spaceworkslabs.tech/docs/organization/features-member-cards/)
- [Member portal](https://spaceworkslabs.tech/docs/organization/features-member-portal/)
- [Notifications](https://spaceworkslabs.tech/docs/organization/features-notifications/)
- [Organisations](https://spaceworkslabs.tech/docs/organization/features-organisations/)
- [Payments](https://spaceworkslabs.tech/docs/organization/features-payments/)
- [Plans and join forms](https://spaceworkslabs.tech/docs/organization/features-plans-and-join-forms/)
- [Public page](https://spaceworkslabs.tech/docs/organization/features-public-page/)
- [Receipts and refunds](https://spaceworkslabs.tech/docs/organization/features-receipts-and-refunds/)
- [Renewals](https://spaceworkslabs.tech/docs/organization/features-renewals/)
- [Reports and analytics](https://spaceworkslabs.tech/docs/organization/features-reports-and-analytics/)
- [Self-hosting](https://spaceworkslabs.tech/docs/organization/features-self-hosting/)
- [Sign-in](https://spaceworkslabs.tech/docs/organization/features-sign-in/)
- [Staff and roles](https://spaceworkslabs.tech/docs/organization/features-staff-and-roles/)
- [Units](https://spaceworkslabs.tech/docs/organization/features-units/)
- [Web analytics](https://spaceworkslabs.tech/docs/organization/features-web-analytics/)
- [Payments](https://spaceworkslabs.tech/docs/organization/payments/)
- [Tax on membership payments](https://spaceworkslabs.tech/docs/organization/gst/)
- [Reports](https://spaceworkslabs.tech/docs/organization/reports/)
- [Email and chat notifications](https://spaceworkslabs.tech/docs/organization/notifications/)
Install and run
- [Backups and restore](https://spaceworkslabs.tech/docs/organization/guides-hosting-backups-and-restore/)
- [Choose your hosting](https://spaceworkslabs.tech/docs/organization/guides-hosting-choose-your-hosting/)
- [Monitoring and health](https://spaceworkslabs.tech/docs/organization/guides-hosting-monitoring-and-health/)
- [Updates and rollback](https://spaceworkslabs.tech/docs/organization/guides-hosting-updates-and-rollback/)
- [Deploying on a server (VPS)](https://spaceworkslabs.tech/docs/organization/deployment-vps/)
- [Deploying with managed services (cloud)](https://spaceworkslabs.tech/docs/organization/deployment-cloud/)
- [Free hosting behind Cloudflare](https://spaceworkslabs.tech/docs/organization/deployment-cloudflare/)
- [Hosting the site on Netlify](https://spaceworkslabs.tech/docs/organization/deployment-netlify/)
- [Configuration reference](https://spaceworkslabs.tech/docs/organization/configuration/)
[All docs](https://spaceworkslabs.tech/docs/)

Space Works Organization · Install and run

# Monitoring and health

The health endpoints, the job processes' health checks, the operator checks and status script, and the super-admin pages that show whether the platform is working.

## Health endpoints

| Endpoint | Checks | Who may call it | Answers |
| --- | --- | --- | --- |
| `GET /api/health` | The app process is alive. It never touches the database or Redis. | Anyone | `200`with`ok`,`uptimeMs`and`time` |
| `GET /api/health/db` | The app can query the database (`SELECT 1`). | Callers with`Authorization: Bearer <HEALTHCHECK_SECRET>` | `200`with`ok`and`time`;`404`without the secret;`500`if the database query fails |
| `GET /health`on the worker and beat | The process is running and its Redis heartbeat is fresh. | Inside the stack, on`JOBS_HEALTH_PORT`(3460) | `200`with`{"ok":true,"role":"worker"}`(or`beat`);`503`when unhealthy |

Neither app endpoint returns database names, versions or connection details. The secret is compared in constant time, and a missing or wrong secret gets the same`404`as a route that does not exist. `curl -fsS https://members.example.org/api/health curl -fsS -H "Authorization: Bearer $HEALTHCHECK_SECRET" https://members.example.org/api/health/db`

**Tip:**Point an external uptime monitor at`/api/health`for liveness. Use`/api/health/db`only from a monitor that can keep the secret private.

### How the containers use them
- The backend image's Docker health check calls`/api/health`every 30 seconds.
- The worker and beat containers call their own`/health`. They report healthy only while their Redis heartbeat succeeded in the last 30 seconds; the heartbeat runs every 10 seconds. The worker also needs every queue consumer running and connected.
- Platforms that run the worker and beat separately (see[Deploying with managed services](https://spaceworkslabs.tech/docs/organization/deployment-cloud/) ) can use`GET /health`on port 3460 as their health check.

## Operator checks

The`ops`role checks a running stack and prints only`ok`or`FAIL`per line, never a connection detail or response body: `scripts/spaceworks-compose.sh bundled run --rm ops scripts/spaceworks-compose.sh cloud run --rm ops`

| Check | Fails when |
| --- | --- |
| Database connection uses TLS | The app's connection is not encrypted |
| Runtime database role cannot change schema or roles | The app's role is a superuser, can create databases or roles, or owns a table (bundled only) |
| Every migration is applied | A migration is unfinished or rolled back |
| Redis answers over TLS with its password | `REDIS_URL`is not`rediss://`or Redis does not answer |
| Private bucket is reachable | The S3 bucket cannot be reached with the app's key |
| App readiness (`/api/health/db`) | The backend is not ready or the health secret is wrong |
| Worker and beat are healthy (`/health`) | Either process's heartbeat is stale |
| Internal job endpoint refuses requests without the secret | `/api/internal/outbox`answers anything but`404`without`CRON_SECRET` |
| SMTP relay is configured | `SMTP_HOST`is missing or still`CHANGE_ME` |

The source is[`docker/ops/check.mjs`](https://github.com/SpaceWorks-Labs/SpaceWorks-Organization/blob/7cd1441838559f323c26e5ddbab0e72181b4bc4d/docker/ops/check.mjs) . The updater runs it after every update, and`setup.sh`after installing.

## Status script (bundled) `bash scripts/vps-status.sh`

This is menu option 4. It changes nothing and shows:
- the release, the previous release and the public address;
- free disk for the install and for Docker;
- the newest scheduled dump, with a warning when it is older than the backup interval plus two hours;
- the last off-site copy result, the off-site and certificate timers, and whether automatic deploys are on;
- when the internal certificates expire;
- every long-running service's state and health;
- whether the public address answers`/api/health`(skipped behind your own proxy or for a backend-only server);
- the operator checks.

It exits with an error if anything needs attention. For help from someone else, menu option 10 (`scripts/vps-support.sh`) collects the same report with the last 500 log lines of each service, secrets redacted, into`support/`. Read it before sharing: logs can hold email and IP addresses.

## Logs `scripts/spaceworks-compose.sh bundled ps scripts/spaceworks-compose.sh bundled logs -f backend worker beat scripts/spaceworks-compose.sh bundled logs migrate scripts/spaceworks-compose.sh bundled logs backup`

Each container keeps up to five log files of 10 MB. Caddy writes no access log, because application URLs can carry bearer links (invites, receipts).

| Symptom | Look at |
| --- | --- |
| The site does not load | `logs caddy`(or`cloudflared`behind a Cloudflare Tunnel), then`logs backend` |
| The app never starts after an update | `logs migrate`: the app never starts on a half-migrated database |
| Email or chat alerts are not sent | `ps`for both`worker`and`beat`: a running worker sends nothing while beat is down |
| Worker or beat unhealthy | `logs worker beat`for a Redis or database connection problem |
| No recent scheduled dump | `logs backup` |

## Super-admin pages

| Page | Shows |
| --- | --- |
| **Overview** | Items needing attention: applications waiting over 7 days, suspended organisations, failed emails, emails queued over 15 minutes, staff without an authenticator, users with unverified email |
| **Monitoring** | Whether the database is reachable and key settings are present, plus request counts, 5xx errors and latency per API route (in memory: reset on restart and not shared between instances) |
| **Operations** | Recorded backup status and the last restore drill; whether Redis,`CRON_SECRET`,`HEALTHCHECK_SECRET`and email are configured; queued, failed and sent outbox counts; the outbox scheduler's last run (healthy within 3 minutes); and the latest 25 failed deliveries with redacted errors |
| **Email** | The email provider's state and messages in the outbox by kind |
| **Security** | Sign-in methods, sensitive actions from the audit log, blocked addresses and super admins |
| **Audit log** | Every recorded action, searchable (seeAudit actions) |

## Outbox failures and requeue

Member and account emails, chat alerts and some storage work go through the SQL outbox and are delivered by the worker. A failed delivery is retried with a growing delay (up to an hour, or 8 minutes for short-lived links). After 8 attempts, or at once for a malformed job or a recipient the provider refuses, the row is marked failed. Durable storage work keeps retrying until storage agrees. Messages that carry a reset, verification or invite link are deleted rather than kept once they are sent or fail for good.

**Super admin → Operations**has four controls, each audited:

| Control | Does | Audit action |
| --- | --- | --- |
| **Deliver queued email** | Delivers up to 50 due outbox rows now | `INSTANCE_OUTBOX_DELIVERED` |
| **Retry failed email** | Puts every failed row back in the queue | `FAILED_OUTBOX_MESSAGES_REQUEUED` |
| **Purge expired tokens** | Removes expired verification tokens | `EXPIRED_VERIFICATION_TOKENS_PURGED` |
| **Record restore drill** | Records that a backup restore was tested | `BACKUP_RESTORE_VERIFIED` |

Sent and failed rows are removed after`OUTBOX_RETENTION_DAYS`(30) by the hourly retention job. See[Notifications](https://spaceworkslabs.tech/docs/organization/notifications/) for what is sent and[Limits](https://github.com/SpaceWorks-Labs/SpaceWorks-Organization/blob/7cd1441838559f323c26e5ddbab0e72181b4bc4d/docs/reference/limits.md) for retention defaults.

**Note:**Fix the cause before you retry: a wrong SMTP login or a suspended sending domain fails every message again. Send a test message from**Super admin → Settings**first.

## Without a beat process

Hosts that cannot keep beat running call the internal endpoints once a minute with`CRON_SECRET`; a worker must still run. See[Without a beat process](https://spaceworkslabs.tech/docs/organization/deployment-cloud/#without-a-beat-process-cron-fallback) . The bundled Caddy answers`404`for`/api/internal/*`, so those calls must reach the backend directly.

## Read next
- [Webhooks and internal endpoints](https://github.com/SpaceWorks-Labs/SpaceWorks-Organization/blob/7cd1441838559f323c26e5ddbab0e72181b4bc4d/docs/reference/webhooks-and-endpoints.md)
- [Backups and restore](https://spaceworkslabs.tech/docs/organization/guides-hosting-backups-and-restore/) and[Updates and rollback](https://spaceworkslabs.tech/docs/organization/guides-hosting-updates-and-rollback/)
- [Architecture](https://github.com/SpaceWorks-Labs/SpaceWorks-Organization/blob/7cd1441838559f323c26e5ddbab0e72181b4bc4d/docs/ARCHITECTURE.md#background-jobs) : the queues and scheduled jobs.
- [Deploying on a server](https://spaceworkslabs.tech/docs/organization/deployment-vps/#troubleshooting)

From[SpaceWorks-Organization/docs/guides/hosting/monitoring-and-health.md](https://github.com/SpaceWorks-Labs/SpaceWorks-Organization/blob/7cd1441838559f323c26e5ddbab0e72181b4bc4d/docs/guides/hosting/monitoring-and-health.md) at 7cd1441, updated 2026-11-21.[Suggest a change](https://github.com/SpaceWorks-Labs/SpaceWorks-Organization/edit/main/docs/guides/hosting/monitoring-and-health.md)  [PreviousChoose your hosting](https://spaceworkslabs.tech/docs/organization/guides-hosting-choose-your-hosting/) [NextUpdates and rollback](https://spaceworkslabs.tech/docs/organization/guides-hosting-updates-and-rollback/)

On this page
- [Health endpoints](#health-endpoints)
- [How the containers use them](#how-the-containers-use-them)
- [Operator checks](#operator-checks)
- [Status script (bundled)](#status-script-bundled)
- [Logs](#logs)
- [Super-admin pages](#super-admin-pages)
- [Outbox failures and requeue](#outbox-failures-and-requeue)
- [Without a beat process](#without-a-beat-process)
- [Read next](#read-next)
