Skip to content

Self-hosting

Keep the map only as files, or run the Cases server yourself.

Applies to Engine
View as Markdown
On this page
  1. Files only
  2. The Cases server
  3. Running your cases without Sypnia Cloud

Files only

Most teams need nothing else: the map in cases/, npx @sypnia/cases check in CI, and pull requests as reviews. No server, no account.

The Cases server

When you want the API, proposals with approvals and the MCP server on your own infrastructure:

Terminal
git clone https://github.com/sespinosav/sypnia-cases && cd sypnia-cases/deploy
cp .env.example .env
docker compose up -d
SettingWhat it is
CASES_DATABASE_URLany Postgres 14+; the server creates its cases schema on first start. The compose file creates the database owned by a role without superuser, cases_server
CASES_AUTH_ISSUERthe OIDC issuer that signs your users’ tokens: a Sypnia Data project, or any other
CASES_PUBLIC_URLthe address people use (HTTPS in production); DPoP proofs and links are checked against it
CASES_SMTP_URLfor review e-mails (optional): smtp://user:password@host:587 (STARTTLS) or smtps://…:465
CASES_MAIL_FROMthe sender of those e-mails (default Sypnia Cases <cases@localhost>)
CASES_APP_DATABASE_URLyour app’s database, to read deliveries and dead letters from its sypnia_cases schema; one app database per server
CASES_SECRET_KEY32 bytes (64 hex characters, or base64) to keep tokens of other products, such as a map’s Telemetry token, encrypted; without it they are not kept
CASES_AUTH_AUDIENCEthe accepted aud of tokens, comma-separated; * accepts any. Default: authenticated, the public address, its /mcp, and CASES_MCP_URL
CASES_MCP_URLthe MCP endpoint’s own public address, when it is not CASES_PUBLIC_URL plus /mcp
CASES_CORS_ORIGINSthe browser origins allowed to call the API, comma-separated
CASES_RATE_LIMITrequests a minute per credential (600 by default; 0: no limit)
CASES_LINK_BUDGET_MShow long a link waits for another product (2000 by default)
CASES_ROLE_CACHE_MShow long a role read from Sypnia is kept (60000 by default)
CASES_ORIGIN_SECRETwhen set, the server answers only requests with this value in the x-origin-secret header (behind a CDN)
CASES_DIRECTORYself (the default: workspaces and members live in the server) or sypnia (workspaces are Sypnia organizations)
CASES_SYPNIA_API, CASES_TELEMETRY_APISypnia’s control plane (https://data.api.sypnia.com) and Telemetry’s API (https://telemetry.api.sypnia.com), for links
CASES_SERVICE_KEYthe key this server shares with a Sypnia Data control plane (at least 32 characters), for calls on behalf of a person it verified, both ways. Empty by default: the server then presents each person’s own token to the other product, so a session bound to a key cannot read it
CASES_SSMon AWS Lambda: settings read from SSM Parameter Store when the function starts, as NAME=/parameter/path pairs separated by commas
PORTthe port to listen on (8070)

The server answers on port 8070: the API at /v1, MCP at /mcp, health at /health. It applies its own migrations at every start, safely from several replicas at once. The visual editor is part of Sypnia Cloud and is not included.

With CASES_APP_DATABASE_URL, members see each listener’s deliveries and dead letters, and owners, editors and approvers send them again or drop them (with a reason) through the API. Without it, those endpoints answer 409 no_app_database.

Running your cases without Sypnia Cloud

Running cases needs neither the Cases server nor Sypnia Cloud. The runtime is part of @sypnia/cases in each area’s service: point every service at the same Postgres and events flow between them through the sypnia_cases tables, with the same retries, dead letters and loop guard (Delivery). On your own AWS account, Sypnia Run’s open-source engine sets up EventBridge and a queue per listener from the map.

  1. Files only
  2. The Cases server
  3. Running your cases without Sypnia Cloud

    Search pages, sections and terms