# Sypnia Run documentation > Sypnia Run puts your code on the internet: static sites, server-rendered apps, containers, functions, scheduled jobs and queues. You push to Git or run one command; Run builds it, gives it an address and keeps every deploy so you can go back in one step. Sypnia comes two ways, and every page says which one it is about: - **Sypnia Run engine** (open source, in your own aws account): Ingest, storage, aggregation, problem grouping, sessions, replay data and uptime checks. You read it through: The HTTP API, the MCP server, the CLI and the Console: one built-in page with the problems list and the session replay viewer. - **Sypnia Cloud** (hosted by us, paid with credits): The same engine, run by us. You read it through: The full app: replay player, performance, uptime, daily summary, search and teams. Every page is also plain Markdown: add `.md` to its address (`https://run.docs.sypnia.com/start/open-source-and-cloud.md`). All pages in one file: https://run.docs.sypnia.com/llms-full.txt ## Start here What Sypnia Run is, how it works, what is open source and what is Sypnia Cloud, and the quickstarts. - [Start here: overview](https://run.docs.sypnia.com/start.md): Section index for Sypnia Run: deploys static sites, server-rendered apps (Next.js via OpenNext, Astro, SvelteKit…), containers, functions, cron jobs and queues on AWS, from Git or the CLI, with previews per pull request, instant rollbacks, secrets, custom domains, and logs and traces into Sypnia Telemetry. Open-source engine in your AWS account, or Sypnia Cloud. [Engine, Cloud] - [What Sypnia Run is](https://run.docs.sypnia.com/start/what-it-is.md): What Sypnia Run is: static sites (S3+CloudFront), SSR apps (Next.js/Astro/SvelteKit/Nuxt on Lambda via OpenNext-style adapters), containers (Fargate or Lambda container images), functions (Lambda), cron (EventBridge Scheduler), queues (SQS+Lambda). Immutable deploys, previews per PR, secrets, free .sypnia.app in Cloud, logs/traces to Sypnia Telemetry, use cases run from the Cases map (services per area, starts → routes/endpoints/schedules/subscriptions, outbox), use-case diff per deploy. Not a database, not file storage, not Kubernetes, AWS only. [Engine, Cloud] - [How it works](https://run.docs.sypnia.com/start/how-it-works.md): How Sypnia Run works: build (isolated machine, framework detection, artifacts) → deploy (immutable version with its own address --dpl-.sypnia.app) → release (environment pointer switched at the edge; rollback = move back) → serve (CloudFront → S3 / Lambda / Fargate; logs; traces to Telemetry). Optional [run] table in the project's sypnia.toml. Open source: @sypnia/run CLI and engine; private: console. [Engine, Cloud] - [Open source and Sypnia Cloud](https://run.docs.sypnia.com/start/open-source-and-cloud.md): Engine vs Sypnia Cloud for Run: engine runs apps in your AWS account (you pay AWS, builds local or CodeBuild, no free address, no console); Cloud runs in Sypnia accounts isolated per project, builds on Sypnia machines, free .sypnia.app, console, prepaid credits. Same config, API, CLI and MCP; moving = install engine, point CLI, deploy. [Engine, Cloud] - [Quickstart: Sypnia Cloud](https://run.docs.sypnia.com/start/quickstart-cloud.md): Quickstart Sypnia Cloud for Run: npx @sypnia/run login (device flow) → npx @sypnia/run deploy (writes the app's [run.apps.] table in sypnia.toml, prints https://.sypnia.app) → run env set NAME --secret --env production → deploy again → run deploys → run rollback. [Cloud] - [Quickstart: your AWS account](https://run.docs.sypnia.com/start/quickstart-self-host.md): Self-host quickstart for Run: npx @sypnia/run engine install --region us-east-1 (CloudFormation stack sypnia-run: API, deployer, CodeBuild project, artifacts bucket, edge router; admin key saved in ~/.config/sypnia/run-engine.json mode 600) → run use → run deploy --local (or CodeBuild) → run domains add (ACM certificate, Route 53 records if same account). [Engine] - [How Sypnia uses it](https://run.docs.sypnia.com/start/how-sypnia-uses-it.md): Dogfooding: Telemetry (the pilot, built on Sypnia end to end) is deployed by Run from its repository in Sypnia Git (organization sypnia), project telemetry in Sypnia's organization, paid with its credits. Apps: telemetry-site (static, telemetry.sypnia.com), telemetry-docs (static, telemetry.docs.sypnia.com), telemetry-console (server-rendered, telemetry.app.sypnia.com), telemetry-engine (Rust; one service per area of its map: ingest behind telemetry.ingest.sypnia.com, api behind telemetry.api.sypnia.com, problems, alerts, uptime). Its cases: ingest-batch (external), open-problem and analyze-problem (event), send-alert (event), send-daily-summary (scheduled, each organization's morning), check-uptime (scheduled every minute), roll-up-hour (scheduled) through cases.handlers; outcomes such as problems.open-problem.ProblemOpened.v1 go through the outbox to analyze-problem and send-alert. Every pull request gets a preview; production waits for a person in App; automatic rollback on Telemetry's own release markers. Names in Sypnia Domains, secrets in Run, files in Files, sign-in with Data. Rest of the suite: every product's site and console runs on Run, and their cases run as Run services. [Engine, Cloud] ## Apps and runtimes Static sites, server-rendered apps, containers and functions: what each one is for and how it runs. - [Apps and runtimes: overview](https://run.docs.sypnia.com/apps.md): Static sites, server-rendered apps, containers and functions: what each one is for and how it runs. [Engine, Cloud] - [Static sites](https://run.docs.sypnia.com/apps/static-sites.md): Static sites in Run: output uploaded to S3 under a per-deploy prefix, served by CloudFront; detection for Vite, Astro (no adapter), Next.js export, plain HTML; spa:true fallback to index.html; clean URLs; hashed assets cached 1 year, HTML revalidated; headers and redirects in the app's table of sypnia.toml; 404.html. [Engine, Cloud] - [Server-rendered apps](https://run.docs.sypnia.com/apps/server-apps.md): SSR apps in Run: static assets on S3, server code as an AWS Lambda behind CloudFront (function URL callable only by CloudFront). Adapters: Next.js 14+ via OpenNext maintained by Run (app/pages router, middleware, image optimization, ISR revalidation), Astro node adapter, SvelteKit adapter-node, Nuxt Nitro aws-lambda, React Router/Remix node. Request flow, per-deploy caching, AWS limits (timeout default 30 s, cold starts, min_instances); use containers for WebSockets/long requests. [Engine, Cloud] - [Containers](https://run.docs.sypnia.com/apps/containers.md): Containers in Run: built from Dockerfile (or Run buildpacks for Node/Python/Go); runtime lambda (default: Lambda container image, scale to zero, ≤15 min, ≤10 GB) or fargate (always-on tasks, unlimited request length, WebSockets, up to 16 vCPU/120 GB). Requirements: listen on PORT (default 8080), health check path, logs to stdout/stderr, graceful SIGTERM in 30 s. Fargate releases are health-checked blue/green. [Engine, Cloud] - [Functions](https://run.docs.sypnia.com/apps/functions.md): Functions in Run: single HTTP handler (standard Request/Response via @sypnia/run/function handler), standalone or under a path in another app; env vars in process.env, SYPNIA_DEPLOY_ID/SYPNIA_APP/SYPNIA_ENV; TS/JS bundled, Python/Go/Rust via container image or prebuilt zip; memory 128 MB–10 GB (default 512), timeout 1–900 s (default 10), concurrency cap. [Engine, Cloud] ## Use cases How Run runs the use cases on your map: one service per area, a route, endpoint, schedule or subscription per start, and outcomes that reach whoever needs them. - [Use cases: overview](https://run.docs.sypnia.com/cases.md): Run executes the use cases of a Cases map (cases/*.case.yaml) with their Sypnorm code: the cases of each area are bundled into one service; each start becomes infrastructure (in_app → app route, external → public endpoint with schema and idempotency key, scheduled → schedule, event → subscription with its own queue and dead letters); each outcome goes back to the caller, to every listener through the outbox (written in the case's transaction, published at once, swept every minute) and always to Telemetry. [Engine, Cloud] - [How use cases run](https://run.docs.sypnia.com/cases/how-cases-run.md): Run reads the map (cases/*.case.yaml, or use_cases = "sypnorm" in the [run] table of sypnia.toml) at build time and matches each case with the Sypnorm useCase that names its id (place-order ↔ useCase('place-order', …)); a case on the map without code, or code without a case, fails the build like cases check. The cases of one area run together in one service - (Lambda by default, Fargate with runtime = "fargate"), deployed with the app as part of the same immutable deploy. Code in other languages: cases.handlers maps a case to a function/container route returning {outcome|failure, data}; the handler writes its own outbox row. Split a case into its own service with cases.split in the app's table of sypnia.toml (memory, timeout, runtime, concurrency) when it needs other resources. Each run: input checked against the case's schema, actor from the Sypnia Data session (in_app) or the start's credential, one transaction, span with sypnia.case and sypnia.case.outcome, outcome delivered. Deploys show which cases were added, removed or changed. [Engine, Cloud] - [How each case starts](https://run.docs.sypnia.com/cases/starts.md): starts → infrastructure. in_app: a route of the app, POST /_cases/, called by the case's screen with the person's Sypnia Data session (actor from the session; refused 401/403 by the case's allowed actors); not public to other apps. external: a public endpoint POST /hooks/ on the app's address, input checked against the schema, authenticated by a case key (Authorization: Bearer syp_rck_…, one case only) or an HMAC signature (signature: { header, secret }), idempotency_key names an input field: a repeat within 24 h returns the first answer without running again. scheduled: an EventBridge Scheduler schedule (cron or every N, IANA timezone, DST handled), overlap skip by default, at least once; same as jobs but declared on the map. event: a subscription to another case's outcome (area.case.Outcome.vN): its own SQS queue and dead letters per listener, EventBridge rule with the filter; on: any of several, on_all: several with a correlation key and a window (a window that closes first runs nothing and ends as WindowExpired, visible in Telemetry). A case with no start fails the build (orphan). [Engine, Cloud] - [Outcomes and events](https://run.docs.sypnia.com/cases/outcomes-and-events.md): Outcome delivery: to the caller (the HTTP answer of in_app/external), to every listener, always to Telemetry (span with sypnia.case, sypnia.case.outcome). Every run ends with ctx.outcome(name, data), outcomes and failures alike. Outbox: when anything listens to an outcome, the runtime inserts it into sypnia_cases.outbox in the same Data transaction as the case's writes (direct runner and Data API atomic transaction); nobody listening = no row. Fast path: right after commit the service publishes its rows (EventBridge in Sypnia Cloud and the engine in your AWS account) and marks them sent; sweep: every minute a sweeper publishes rows unsent for 30 s. Event envelope: id (uuid), name area.case.Outcome.vN, data, occurred_at, key, traceparent, cause (chain of case ids), depth. Each listener: own SQS queue (FIFO with message group = order_by), 5 attempts with backoff, then its dead letters (run cases dlq [--replay]), shown on the map; at least once; the runtime skips an event id the listener already handled (kept 7 days). on_all waits in sypnia_cases.waits by key and window; a window that closes first runs nothing and ends as WindowExpired, visible in Telemetry. Loops: refused at build unless loop: bounded with max and until; at run time a case already in the cause chain, or depth > 10, is not run: LoopStopped on the trace and a Telemetry alert. Without AWS (Docker, your own server): a background task in each service drains the outbox, woken by LISTEN/NOTIFY right after commit and sweeping every minute; listener queues are Postgres tables with the same attempts and dead letters. Limits: event data up to 256 KB (bigger → Files path); name versions: a new version is published beside the old for 90 days, then the old stops. [Engine, Cloud] ## Builds and deploys Deploying from Git or the CLI, preview deploys per pull request, promotions and rollbacks. - [Builds and deploys: overview](https://run.docs.sypnia.com/deploys.md): Deploying from Git or the CLI, preview deploys per pull request, promotions and rollbacks. [Engine, Cloud] - [Builds](https://run.docs.sypnia.com/deploys/builds.md): Run builds: fresh Linux machine per build (x86_64/arm64) with Node/pnpm/npm/yarn/bun/Python/Go and Docker; in Cloud on AWS CodeBuild with a per-build role (writes only its artifacts), internet egress for packages, no internal network; build-time vs runtime vars, secrets masked; steps fetch → cache restore (lockfile hash) → frozen install → build → package + cache save; logs streamed and kept; time and size limits (timed_out never touches production). [Engine, Cloud] - [Deploy from Git](https://run.docs.sypnia.com/deploys/from-git.md): Deploy from Git in Run: connect Sypnia Git (no app) or GitHub (Sypnia GitHub App: code read, checks and deployments write) with run git connect; push to production branch deploys to production; PR branches get previews with a PR comment; check runs; settings production.branch, production.auto=false (manual promote), ignore paths, root for monorepos; or CI with npx @sypnia/run deploy and a deploy token. [Engine, Cloud] - [Preview deploys](https://run.docs.sypnia.com/deploys/previews.md): Run previews: deploy per pull request at https://--pr-.sypnia.app (plus per-deploy --dpl-), optional wildcard on own domain; preview environment variables separate from production; protection none | sypnia (org members, default in Cloud) | password, enforced at the edge with bypass header for machines; updated per push, removed on close/merge. [Engine, Cloud] - [Promote and roll back](https://run.docs.sypnia.com/deploys/promote-and-rollback.md): Promote and rollback in Run: run promote --env, run rollback [--to ]; target must be ready (built, resources created, health check); edge mapping switched in seconds; in-flight requests finish on old deploy; releases recorded with reason; gradual releases (--gradual 10%, sticky per visitor, promote --continue) with Telemetry comparison; auto_rollback watches error rate 10 min; rollbacks do not undo migrations, stored files or sent e-mails. [Engine, Cloud] ## Configuration The [run] table of sypnia.toml, environment variables, secrets, addresses and custom domains. - [Configuration: overview](https://run.docs.sypnia.com/config.md): The [run] table of sypnia.toml, environment variables, secrets, addresses and custom domains. [Engine, Cloud] - [The configuration file](https://run.docs.sypnia.com/config/run-file.md): Run reads the [run] table of sypnia.toml, the one configuration file of the project at the repository root (top-level format = 1 and project = ""; other products' tables are ignored; the Run CLI rewrites only [run] and keeps comments; never secrets). Each app is a table [run.apps.] (name: lowercase letters, digits, dashes, unique in the project) with keys in snake_case: root, kind (static|ssr|container|function), framework, build {command, output, node, env}, runtime (lambda|fargate), memory, timeout, min_instances, max_instances, cpu, health_check {path, timeout}, spa, headers/redirects/rewrites, functions, jobs, queues, previews.protection, release.auto_rollback, telemetry, use_cases, cases.split, cases.handlers. Unknown keys in [run] are errors. [Engine, Cloud] - [Environment variables and secrets](https://run.docs.sypnia.com/config/environment-and-secrets.md): Run environment variables and secrets: per environment (production, preview, development, custom), snapshot per deploy; commands env set [--secret] [--build], env ls, env pull; secrets encrypted with a per-project KMS key in SSM Parameter Store, never shown again, masked in logs, not written to artifacts; public prefixes (NEXT_PUBLIC_, PUBLIC_, VITE_) refused for secrets; connected Sypnia products inject their variables; deploy tokens scoped to app+environments (shown once, hashed), GitHub Actions OIDC trust. [Engine, Cloud] - [Addresses and custom domains](https://run.docs.sypnia.com/config/addresses-and-domains.md): Run addresses: free https://.sypnia.app in Cloud (unique name, never under sypnia.com so deployed code cannot read Sypnia account cookies); custom domains via Sypnia Domains (automatic), Route 53 in engine account (automatic), or any DNS (CNAME/ALIAS + TXT ownership proof); ACM certificates auto-renew; one domain per app; apex/www redirect; domains attached per environment. [Engine, Cloud] ## Jobs and queues Scheduled jobs, queues and background work. - [Jobs and queues: overview](https://run.docs.sypnia.com/jobs.md): Scheduled jobs, queues and background work. [Engine, Cloud] - [Scheduled jobs](https://run.docs.sypnia.com/jobs/cron.md): Run scheduled jobs: [run.apps..jobs.] tables in sypnia.toml with schedule (cron or rate()), timezone (IANA, DST handled), run file (@sypnia/run/job), timeout (default 300 s, ≤900 on Lambda, unlimited fargate), retries (attempts in all, default 5, 1–20, growing waits), overlap skip|allow, environments (production only by default); EventBridge Scheduler; at-least-once (make idempotent); runs recorded (run jobs runs), manual trigger (run jobs trigger). [Engine, Cloud] - [Queues](https://run.docs.sypnia.com/jobs/queues.md): Run queues: [run.apps..queues.] tables in sypnia.toml (consumer file, batch, retries = attempts in all, default 5, 1–20, concurrency); send with @sypnia/run/queue queue(name).send(body, {delaySeconds, dedupeId}); consumer() handler; one SQS queue per app environment plus DLQ; failed batches retried with backoff then moved to DLQ (run queues dlq [--replay]); at-least-once; dedupeId 5-minute window; delay ≤15 min; scaling up to concurrency; 256 KB message limit (use Files for bigger). [Engine, Cloud] ## Logs and traces Logs, traces into Sypnia Telemetry, and which use cases each deploy changed. - [Logs and traces: overview](https://run.docs.sypnia.com/observe.md): Logs, traces into Sypnia Telemetry, and which use cases each deploy changed. [Engine, Cloud] - [Logs](https://run.docs.sypnia.com/observe/logs.md): Run logs: build logs, request logs (method, path, status, duration, deploy, cache), app logs (stdout/stderr of functions, containers, jobs, consumers); run logs [--deploy] [--since] [--level] [--job] [--where]; JSON lines kept as fields; no sampling, overflow counted; stored in CloudWatch Logs per app+environment; secrets masked. [Engine, Cloud] - [Telemetry and use cases](https://run.docs.sypnia.com/observe/telemetry-and-use-cases.md): Run + Sypnia Telemetry: telemetry = true or run telemetry connect adds project key and SYPNIA_RELEASE, wires @sypnia/telemetry/next for Next.js, uploads/removes source maps, forwards logs, release markers per release (used by release.auto_rollback). Use cases: with use_cases (sypnorm or map file) each build records the use-case map; deploy shows added/removed/changed use cases vs production with files and commits; Telemetry traces tagged per use case; diff in preview PR comments. [Engine, Cloud] ## SDK, CLI and MCP The @sypnia/run package, the run command and the MCP tools for agents. - [SDK, CLI and MCP: overview](https://run.docs.sypnia.com/tools.md): The @sypnia/run package, the run command and the MCP tools for agents. [Engine, Cloud] - [The @sypnia/run package](https://run.docs.sypnia.com/tools/sdk.md): @sypnia/run package subpaths: /function (handler), /job (job), /queue (queue().send, consumer), /client (typed API client createRun: deploys.create/wait…), CLI via npx @sypnia/run; auth by device-flow session, PAT or deploy token; ESM with types; Node 20+, Bun, Deno. [Engine, Cloud] - [The CLI](https://run.docs.sypnia.com/tools/cli.md): Run CLI commands: login/logout/whoami (device flow, session in ~/.config/sypnia mode 600), use , deploy [--env --local --prebuilt], deploys, promote/rollback, logs, env set|unset|ls|pull|apply, domains add|ls|rm, git connect|disconnect, jobs ls|runs|trigger, queues ls|dlq --replay, tokens create|ls|revoke, telemetry connect, engine install|upgrade|uninstall; --json, --token/SYPNIA_RUN_TOKEN; exit codes 0/1/2/3/4. [Engine, Cloud] - [MCP for agents](https://run.docs.sypnia.com/tools/mcp.md): Run MCP server at https://mcp.run.sypnia.com: OAuth with DCR + PKCE (MCP authorization) or PAT with the Sypnia account; tools list_apps, get_app, list_deploys, get_deploy, deploy (approval for production), promote/rollback (approval for production), get_logs, list_env/set_env (secrets never returned; approval on production), add_domain, trigger_job, replay_dlq (approval); pending actions confirmed in console or run approve ; calls audited; engine serves /mcp with its API keys. [Engine, Cloud] ## API reference The Run API: addresses, authentication, errors, pagination and limits. - [API reference: overview](https://run.docs.sypnia.com/api.md): Run API base https://run.api.sypnia.com/v1 (engine: /v1); Bearer auth with Sypnia session, PAT syp_pat_, deploy token syp_rdt_, engine API key syp_rk_; scopes run:read/run:deploy/run:admin; error shape {error:{code,message,doc_url}}; codes 400 invalid_request/invalid_config, 401, 403 forbidden/approval_required, 404, 409 conflict/deploy_not_ready/domain_taken/name_taken, 402 credits_exhausted, 429 rate_limited, 5xx; cursor pagination; Idempotency-Key 24 h. [Engine, Cloud] - [Endpoints](https://run.docs.sypnia.com/api/endpoints.md): Run API endpoints: apps (GET/POST/PATCH/DELETE /apps), deploys (POST /apps/{app}/deploys with git ref, upload or prebuilt; POST /uploads signed URL; GET deploys; GET /deploys/{id}; build logs SSE), releases (POST environments/{env}/release {deploy, gradual, reason}, rollback, releases history), deploy statuses, vars (GET/PUT/DELETE, secrets never returned), domains (POST returns records), tokens, jobs (runs, trigger), queues (dlq, replay), logs (filters, follow), approvals (GET /approvals, POST decision). [Engine, Cloud] ## Architecture How Sypnia Run is built: its parts, where Rust and TypeScript run, and how they connect. - [Architecture: overview](https://run.docs.sypnia.com/architecture.md): Run architecture: control plane (Run API in Rust on Lambda, Postgres state, SQS work queue, builder on CodeBuild, deployer in Rust on Lambda) vs data plane (CloudFront + edge router CloudFront Function with KeyValueStore → S3 files / Lambda / Fargate); control-plane outage stops deploys but never takes apps offline; adapters in TypeScript inside builds; console private. [Engine, Cloud] - [Request paths](https://run.docs.sypnia.com/architecture/request-paths.md): Run request paths: deploy (API checks scopes and credits, writes deploys/builds rows, queues build; builder starts CodeBuild with per-project role and signed URLs; deployer uploads to s3 deploys//, publishes Lambda version or Fargate task definition, schedules, queues; health check; ready; auto release); release (deployer writes host→deploy to CloudFront KeyValueStore, shifts Fargate target group; previous deploy intact); visitor (CloudFront TLS, edge CloudFront Function reads KVS and rewrites to deploy origin path; S3 cached, Lambda function URL with OAC, or Fargate via load balancer; real-time logs). [Engine, Cloud] - [Data model](https://run.docs.sypnia.com/architecture/data-model.md): Run control-plane data model in Postgres: apps, environments (current_deploy_id), builds, deploys (immutable, resources, env snapshot ref, use_case_diff), releases (from/to/actor/reason/gradual), env_vars (metadata only; values in SSM Parameter Store), domains (certificate ARN), jobs, queues, job_runs, tokens (hashed), approvals, audit_log; artifacts in S3; prefixed random ids; orgs/projects from the Sypnia account. [Engine, Cloud] - [Reference implementation on AWS](https://run.docs.sypnia.com/architecture/reference-implementation-aws.md): Run on AWS: CloudFront (multi-tenant distribution per cell, custom domains as tenants with ACM certs), CloudFront Functions + KeyValueStore (edge router host→deploy), S3 (one bucket per cell, prefixes, OAC), Lambda (API, deployer, SSR, functions, containers, consumers; version per deploy, alias per environment, function URLs signed by CloudFront), Fargate/ECS behind per-cell ALB with host rules, ECR per app, CodeBuild with per-project build role, EventBridge Scheduler, SQS (FIFO for deploy steps, standard for app queues + DLQ), SSM Parameter Store SecureString, KMS key per project, ACM, CloudWatch Logs, RDS Postgres Multi-AZ; cells = AWS accounts holding a share of projects. [Engine, Cloud] - [Isolation](https://run.docs.sypnia.com/architecture/isolation.md): Run isolation in Cloud: builds in fresh per-build CodeBuild containers with per-project IAM role (read own source, write own prefix, no Run API, no SSM, no control-plane network), secrets only when marked build-time; apps in Firecracker micro-VMs (Lambda, Fargate) with per-app execution/task roles limited to own parameters and project KMS key; static files per-deploy prefixes read only by CloudFront OAC; no shared VPC for functions, Fargate security groups allow only the ALB; function URLs require CloudFront signing; customer apps on sypnia.app (Public Suffix List) never sypnia.com; shared: cell CloudFront, ALB, quotas, with per-project limits; dedicated cells for hard separation. [Engine, Cloud] - [Failures and scaling](https://run.docs.sypnia.com/architecture/failures-and-scaling.md): Run failures: failed build (production untouched), failed health check (resources removed, production untouched), API/DB outage (apps keep serving; no deploys), deployer step retries (idempotent, FIFO per app), lost Git webhook (polling fallback), certificate pending, Lambda regional issue (static cache keeps serving), Fargate task crash (replaced, unhealthy taken out of LB), DLQ pages on-call. Scaling: CloudFront for static, Lambda per request up to max_instances (min_instances avoids cold starts), Fargate autoscaling on CPU/requests, builds parallel up to plan concurrency then queued, control plane stateless proportional to deploys. [Engine, Cloud] - [Codebase](https://run.docs.sypnia.com/architecture/codebase.md): Run codebase: repo sypnia-run (in Sypnia Git, with a read-only mirror on GitHub): crates core, api (axum, /mcp), builder, deployer, edge (CloudFront Function + KVS format), aws (SigV4 clients), server (Lambda adapter, local server, CLI binary); images (build images, buildpacks); deploy (CloudFormation: engine, cell, app stack); spec (openapi.yaml, config JSON Schema); packages/run (@sypnia/run: CLI, the reader of the [run] table of sypnia.toml, framework adapters, API client). [Engine, Cloud] ## Self-hosting Install the Run engine in your own AWS account, or try it locally with Docker. - [Self-hosting: overview](https://run.docs.sypnia.com/self-hosting.md): Install the Run engine in your own AWS account, or try it locally with Docker. [Engine, Cloud] - [Install on AWS](https://run.docs.sypnia.com/self-hosting/aws.md): Run engine on AWS: npx @sypnia/run engine install --region [--domain --certificate-arn] deploys published template deploy/engine.yaml; creates Lambda run-api and run-deployer, RDS Postgres db.t4g.micro (or --database-url), S3 bucket, CodeBuild projects, SQS + DLQs, CloudFront with edge router, ALB on first Fargate app, KMS key + SSM paths, IAM roles (least privilege, resources tagged sypnia-run); parameters Domain, CertificateArn, AppsDomain (wildcard for apps), DatabaseUrl, ContainerSupport, AlarmEmail; uninstall deletes app stacks then engine, keeps bucket and DB unless --delete-data. [Engine] - [Try it locally with Docker](https://run.docs.sypnia.com/self-hosting/docker.md): Run locally with Docker: clone sypnia-run, docker compose up (engine, Postgres, LocalStack, local edge proxy), run use http://localhost:7400, run deploy --target local serves at http://.localhost:7480; for trying and developing, not production. [Engine] - [Configuration](https://run.docs.sypnia.com/self-hosting/configuration.md): Run engine configuration env vars: SYPNIA_RUN_DATABASE_URL (Secrets Manager), SYPNIA_RUN_BUCKET, SYPNIA_RUN_APPS_DOMAIN, SYPNIA_RUN_BUILD_TIMEOUT (1800), SYPNIA_RUN_MAX_CONCURRENT_BUILDS (4), SYPNIA_RUN_DEPLOY_RETENTION (30 days, last 10 per env kept), SYPNIA_RUN_LOG_RETENTION (30), SYPNIA_RUN_TELEMETRY_URL, SYPNIA_RUN_ADMIN_KEYS (SSM path, hashed); API keys via engine keys create --scope. [Engine] - [Upgrades and backups](https://run.docs.sypnia.com/self-hosting/upgrades.md): Run upgrades: run engine upgrade [--to] updates stack and runs DB migrations before switching functions; apps not redeployed (engine upgrade --apps when needed). Backups: state in RDS automated backups (7 days), artifacts with S3 versioning, secrets exported with env pull --include-secrets, app data not in Run; restore RDS snapshot and engine reconciles with tagged AWS resources. [Engine] ## Security Build and runtime isolation, secrets, the threat model and the checklist. - [Security: overview](https://run.docs.sypnia.com/security.md): Build and runtime isolation, secrets, the threat model and the checklist. [Engine, Cloud] - [Threat model](https://run.docs.sypnia.com/security/threat-model.md): Run threat model: malicious builds (fresh container, per-project role, no SSM/control plane), malicious apps (per-app roles, per-project KMS, CloudFront-only prefixes, no inter-app network), bypassing the edge (CloudFront-signed function URLs, ALB-only security groups), cookie theft (sypnia.app on PSL), post-install exfiltration (no secrets in builds unless marked, masked), leaked deploy token (scoped, revocable, OIDC), agent mistakes (approval for production), subdomain takeover (names reserved 30 days, detach before DNS removal), DoS (per-project limits, Shield Standard), compromised control plane (no clear secrets, tag-scoped roles, audit). security@sypnia.com. [Engine, Cloud] - [Checklist](https://run.docs.sypnia.com/security/checklist.md): Run production checklist: secrets with --secret and no public prefixes; previews on test DB/keys; preview protection; CI with scoped deploy token or GitHub OIDC; agent production approvals; auto_rollback; backward-compatible migrations; security headers; no secrets/PII in logs; DNS account with 2FA or Sypnia Domains. [Engine, Cloud] ## Sypnia Cloud Projects, metering in credits, limits and plans. - [Sypnia Cloud: overview](https://run.docs.sypnia.com/cloud.md): Projects, metering in credits, limits and plans. [Engine, Cloud] - [Credits and limits](https://run.docs.sypnia.com/cloud/credits-and-limits.md): Run in Sypnia Cloud: metered build minutes, Lambda GB-s + requests, Fargate vCPU-h/GB-h, warm instance-hours, bandwidth GB, deploy storage GB-month, job invocations/queue messages, log GB; console shows usage and projected credit spend; plans include amounts, overage from prepaid credits per item, extra capacity per item per month, no post-paid charges; limits per plan (apps, concurrent builds, timeouts, memory, max_instances, Fargate tasks, domains, kept deploys, log retention) published with plans. [Cloud] - [Plans](https://run.docs.sypnia.com/cloud/plans.md): Run plans: Run alone (free + paid), global Sypnia subscription tiers including Run, per-item extra capacity; all prepaid (subscription or credits; credits expire 12 months after purchase, oldest spent first, minimum top-up USD 5, no refunds unless the mistake is Sypnia's, and then only in credits); larger of product plan vs global tier per item. When credits run out: notices at 80/100 % (80 % of the balance after the last top-up), 7 days of grace (production, jobs and queues keep running, builds wait), then free-plan limits (exceeding apps show a notice page), nothing deleted; credits restore in minutes. [Cloud] ## Reference Glossary, design decisions, the changelog and common questions. - [Reference: overview](https://run.docs.sypnia.com/reference.md): Glossary, design decisions, the changelog and common questions. [Engine, Cloud] - [Glossary](https://run.docs.sypnia.com/reference/glossary.md): Sypnia Run vocabulary: app, kind, deploy, build, artifact, environment, release, rollback, preview, edge router, deploy token, job, queue, dead-letter queue, cell, engine, Sypnia Cloud, credits. [Engine, Cloud] - [Design decisions](https://run.docs.sypnia.com/reference/decisions.md): Run design decisions: (1) customer apps are served on .sypnia.app, a domain in the Public Suffix List, never on sypnia.com where Sypnia's sessions live; (2) isolation: shared cells for every plan, a dedicated cell (own AWS account) on request, priced separately; (3) containers run on Lambda by default, Fargate for WebSockets, long requests or steady traffic; (4) free plan: static sites and functions with small monthly amounts, server-rendered apps with a low max_instances, no always-on containers or min_instances; (5) builds run on AWS CodeBuild; (6) one region, us-east-1, with CloudFront at the edge; (7) licenses: AGPL-3.0 engine, MIT @sypnia/run; (8) acceptable use: no crypto mining, phishing or open proxies; new addresses checked against phishing lists; outbound limits on the free plan. [Engine, Cloud] - [Common questions](https://run.docs.sypnia.com/reference/faq.md): Run FAQ: vs Vercel/Netlify (plus containers, jobs, queues, one account and bill with Data/Files/Mail/Domains, open-source engine in your AWS); AWS resources visible when self-hosted; no app changes for supported frameworks (containers need PORT + health check); apps keep serving if control plane is down; you can leave. [Engine, Cloud] - [Changelog](https://run.docs.sypnia.com/reference/changelog.md): Run changelog: 2026-11-17 Sypnia Run and its documentation. [Engine, Cloud]