The GUI is a SvelteKit app that connects to the orchestrator over the Unix socket (server-side) and receives live updates over Server-Sent Events (client-side).
Default URL: http://<server-ip>:3000
For HTTPS access, set up an nginx reverse proxy — see install.md.
Desktop: top nav bar — obstetrix · dashboard · backups · settings · nginx
Mobile: bottom tab bar — dashboard / backups / settings / nginx
Shows a card for each project with:
- Name — links to the project detail page
- Status badge — live, color-coded: green (running), red (failed), blue (building), grey (stopped/unknown)
- Current SHA — first 8 characters of the deployed commit
- Instances — running / total reserved
- Last deployed — relative time (e.g., "2m ago")
- Deploy button — triggers a deploy immediately; button label becomes "deploying…" optimistically
Each card has three action buttons: deploy (queues a deploy; shows "queued…" while pending), detail (links to the project detail page), and logs (links to the live log stream).
Live updates arrive automatically via SSE. Status badges, SHAs, and last-deploy times update in real time.
Create project: click new project (top right) to open an inline form. Select an optional build template to pre-fill BUILD_CMD and health settings, then provide a name, repo URL, branch, and port count.
Detailed view for a single project:
- Status badge, current SHA, branch, repo URL, last deploy time and ok/fail, instance count, health check URL (if set)
Actions:
- Deploy now — queues a deploy
- Deploy sha… — toggle a SHA input panel; enter any full or short SHA and click deploy to pin that exact commit
- Logs — live log stream
- Journal — systemd journal tail for all
{name}@*.serviceinstances - Deploys — deploy history list
- Settings — opens the project config editor (deploy tab)
- Rollback (destructive, only shown when a previous SHA exists) — reverts to the previous commit
Scale slider: Drag to set instance count and click apply. Instances start or stop immediately. The slider max is the port count allocated for the project.
Deploy history table: Last 20 deploys with SHA, timestamp, ok/failed badge, and duration.
Real-time log stream with auto-reconnect (exponential backoff, 1 s → 30 s max).
- Phase headers (
==>lines) — highlighted in accent colour - Error lines — highlighted in red (lines starting with
error:,fatal:,panic:, etc.) - Meta lines — status/deploy-complete events, shown in muted colour
- Line count — shown in the header
- Auto-scroll — pauses when you scroll up; resume button appears; clear empties the buffer
- Buffer holds the last 1 000 lines.
Tails the systemd journal for all running instances of the project ({name}@*.service) using journalctl --output=short-iso.
- Line count selector — choose last 100 / 300 / 500 / 1 000 lines (default 300; max 2 000)
- Refresh — manually reload the output
- Auto (5s) — toggle auto-refresh every 5 seconds
- Error/fatal/panic lines are highlighted red; warning lines yellow
Useful for inspecting runtime crashes, startup errors, and application-level logs without SSH access.
Lists all deploy log files with status filter tabs (all / running / ok / failed).
Each row shows: short SHA, start time (absolute + relative), status badge, duration, and a re-deploy button to re-queue the same SHA.
Auto-refreshes when a live cicd:event arrives.
Full JSONL log viewer for a single deploy:
- Header with project name, SHA, status badge
- Phase headers (
==>lines) in accent colour; error lines in red - HH:MM:SS timestamps on each line
- Duration and re-deploy button in the action bar
The settings hub shows:
Daemon status — version, start time, config root, number of projects loaded.
Disk usage — each mount point with used/total GB and percentage.
Port allocations — base port and reserved range per project.
Project config links — links to the config editor for each project.
Nginx card — click to open the nginx site manager.
Actions:
- Reload configs — re-reads all
project.conffiles (same asobstetrix-ctl config reload) - Edit obstetrix.conf — opens the secrets editor
Four-tab editor:
Structured form for the most common project.conf fields:
| Field | Config key |
|---|---|
| Build command | BUILD_CMD |
| Branch | BRANCH |
| Persistent dirs | PERSISTENT_DIRS |
| Health check URL | HEALTH_CHECK_URL |
| Health timeout (s) | HEALTH_TIMEOUT |
| Default instances | DEFAULT_INSTANCES |
| Rollback on fail | ROLLBACK_ON_FAIL |
| Auto-deploy | AUTO_DEPLOY |
Load template… — choose a build template (Bun, SvelteKit/Bun, Node/npm, Next.js, Go, Python, static) to pre-fill the form fields. Customise and save.
Auto-deploy switch — when off, the poller will still detect new commits but will not queue a deploy automatically. Use Deploy now on the project detail page to deploy manually. Projects that have never been deployed are always manual regardless of this setting.
Raw key=value editor for the full project.conf. Load template fills the whole file. Save invalidates the deploy tab so it re-reads values on next visit.
Environment variables written to /etc/obstetrix/projects/{name}/.env.
Use ${VAR} to substitute values from obstetrix.conf at deploy time.
Sync now — pushes the resolved env to the running deploy directory and performs a rolling restart without a full build.
npm/Bun config written to /etc/obstetrix/projects/{name}/.npmrc.
Edits /etc/obstetrix/obstetrix.conf — the main config file containing the GitHub token, global paths, and port assignments.
By default, values for keys containing TOKEN, SECRET, or KEY are masked with ****. Toggle mask secret values to reveal them.
When saving, any line still containing **** is skipped (preserving the current value). Only lines you actively changed are written back.
Lists all files in /etc/nginx/sites-available/ with enabled/disabled badges (based on whether a matching symlink exists in sites-enabled/).
Actions per site:
- Site name — clickable link to the config editor for that site
- Enable / Disable — creates or removes the
sites-enabledsymlink (does not reload automatically) - Test config — runs
nginx -tand shows output - Reload nginx — runs
systemctl reload nginxand shows output
Full textarea editor for /etc/nginx/sites-available/{site}.
- Unsaved badge appears when you have uncommitted changes
- Save — writes the file and immediately runs
nginx -t; if the test fails, the previous version is restored automatically and the error is shown - Test config — runs
nginx -twithout saving - Reload nginx — applies the current on-disk config to live traffic
- Reset — discards unsaved edits
Overview of all project backups:
- Per-project card with the 3 most recent archives (date, size, download link)
- Backup now button per project
- System backup button — backs up
/etc/obstetrix/and global state - Link to the per-project backup history
Full list of backup archives with date, size, and download link.
Backup now triggers an immediate backup. Downloads stream directly as .tar.gz files.
The GUI maintains a persistent SSE connection to /api/events throughout the session. BuildEvent messages are dispatched as a custom DOM event (cicd:event) that any page can listen to.
| Event type | Effect |
|---|---|
status |
Updates the project's status badge on dashboard and detail page |
deploy_complete |
Updates SHA, last-deploy time, and ok/failed indicator |
log |
Streams to the live log page for the relevant project |
The SSE connection reconnects automatically if dropped. Deploy history and logs pages also re-fetch data when a cicd:event arrives.
nginx / HTTP/2 note: The
/api/eventsresponse must not includeConnection: keep-alive— that header is forbidden in HTTP/2 and causes Firefox to abort the connection (NS_BINDING_ABORTED) while Chrome silently ignores it. The nginx config in install.md uses a dedicated unbuffered location block for SSE routes; if you customise the proxy config, ensureproxy_buffering offandproxy_read_timeout 3600sare set for those paths.