Liking cljdoc? Tell your friends :D

Apps

An App is a program Synthigy runs beside the engine, on the same machine. The App holds its images (OCI images, one per version) and which one is active; each client of the App, a confidential OAuth client of the engine, is one running instance of it, with its own credentials, settings, hostnames and volumes. One client per App is the usual case; a tenant App runs many. You write the program, describe it in a manifest, and synthigy app deploy packs it, publishes the image and makes it active.

KindRunsAddress
servicean HTTP server on PORT<name>.<engine host>, or names an admin adds
workera long-running processnone

Scheduled jobs and RPA are not Apps.

The loop

  1. Once per machine: sudo synthigy service install --apps (Linux only, needs Podman, passt and nftables). On a server installed with --domain, Apps are already set up. See Running Synthigy.
  2. Once per App: an admin creates its client (Setting up an App).
  3. In the project: write apps/<name>.app.json (The manifest).
  4. Every release: synthigy app deploy <name>. It packs, publishes the image, makes it the App's active image, and every client of the App starts it next to the one it runs and switches over once it is healthy.
  5. Watch it: synthigy app logs <client-id>.

Deploy goes to the engine the project is connected to (synthigy status), so one manifest serves staging and production.

Setting up an App

An admin, once per App:

synthigy iam add-client shop --id shop-app --type confidential --api Synthigy --role "App Program"
  • --type confidential: only a confidential client gets a secret, and only it can run as an App.
  • --api Synthigy: its tokens are accepted by /data.
  • --role "App Program": its service user may read its own state, variables, hostnames and configuration. Add the roles the program needs for its own data, as for any service user (ACCESS.md).

The first synthigy app deploy creates the App the manifest names, with you as its Owner, and puts the manifest's client in it. The App's Owner and Owner Group (with the App Developer role) may change everything about it; admins always may. The App's deployers (with the App Deployer role) publish its images, choose the active one, delete images nothing runs, and read the state and logs of all its clients; nothing else of the App.

The rest is in Studio's Apps tool, per client:

  • Operators: people (or a CI client's service user) who may restart the client and change its variables and hostnames; they do not choose the image. They also need the App Deployer role. synthigy app operator add|rm|ls.
  • Variables: settings and secrets the program gets at start (What a running App gets). A sensitive variable is readable only by the App itself, and stays sensitive.
  • Limits: memory, CPU and volume space above the defaults (admins only).
  • Sandbox type (admins only): strict, the default, or relaxed (Sandbox type).
  • Volumes: persistent folders, within the volume limit.
  • Hostnames: the client's operators and admins add labels and custom domains; the first deploy writes the generated one. A name another App answers on, or one the engine would not route, is refused when saved.

The project

myproject/
  .synthigy/            connection profile (gitignored)
  apps/
    shop.app.json       one manifest per App; the file name is its local name
  services/shop/        whatever the build needs
  dist/                 pack output (gitignored)

The project root is the first folder, walking up from the working directory, that holds apps/ and either .synthigy/ or .git.

The manifest

apps/<name>.app.json. <name> is lowercase letters, digits and -, at most 63. Unknown fields are an error.

{
  "app": "shop",
  "clientId": "shop-app",
  "kind": "service",
  "rootDir": "services/shop",
  "buildCommand": "mkdir -p out && docker build --platform linux/amd64 -t shop . && docker save -o out/shop.tar shop",
  "image": "out/shop.tar",
  "healthCheckPath": "/healthz",
  "resources": { "memoryMB": 128, "cpuMillicores": 250 }
}
Field
apprequiredthe App the image is published to; deploy creates it when no App has that name, with you as its Owner
clientId a client to put into the App on the first deploy; a client already in another App is refused, never moved. Hostnames are set on the client, not here
kindrequiredservice or worker
imagerequiredthe image archive buildCommand leaves, relative to rootDir: docker save, podman save or an OCI layout tar
rootDir where buildCommand runs, relative to the project root; default .
buildCommand run with sh -c (Windows: Git Bash or WSL)
startCommand exec form, e.g. ["/app/server", "--port", "8080"]; replaces the image's entrypoint and command
healthCheckPathservicemust answer 2xx or 3xx before the App counts as started
landingPathservicewhere a link to the App's domain opens, e.g. /dashboard; default /
signInservice{"callbackPaths": ["/auth/callback"]}: the App signs people in. See Sign-in below. Without it the App is a backend-only client
resources {"memoryMB", "cpuMillicores"} the App asks for
volumeMB on a deploy with no volume yet, creates one of this size at /data
description free text

Settings and secrets never go in the manifest: they are variables on the engine, per environment. Neither do the engine, the hostname or the version.

Building the image

The image is yours: base, libraries, updates. It must be linux/amd64, with an entrypoint, a command, or a startCommand.

LanguageWithout Docker
Gomkdir -p out && KO_DOCKER_REPO=app ko build --bare --platform linux/amd64 --push=false --tarball out/app.tar .
Java, ClojureJib, jib:buildTar
anything elsedocker build --platform linux/amd64 then docker save -o out/app.tar <tag>, or the same with Podman

docker save and ko do not create the output folder: mkdir -p it first. A static site is an image with a small file server and the built files.

The App runs as user 65532 whatever the image says, on a read-only root, so files it reads must be readable by any user and it writes only to /tmp or a volume.

Pack

synthigy app pack [name] [--version V]

Without a name it packs every manifest in apps/.

  1. Version: --version, else git describe --tags --always --dirty. With neither, pack refuses.
  2. Runs buildCommand, with SOURCE_DATE_EPOCH at the HEAD commit's time.
  3. Checks the archive: exactly one linux/amd64 image, something to run. It warns when the image runs as root or is over 500 MB compressed.
  4. Writes dist/<name>-<version>.tar and its .sha256. The same input gives the same bytes.

Pack needs no Docker or Podman itself; only your buildCommand might. CI packs once and deploys the .tar.

Deploy

synthigy app deploy [name | dist/<name>-<version>.tar] [--version V] [--timeout 10m]
synthigy app deploy dist/shop-1.4.0.tar --app shop-preview --client-id shop-preview

Without an argument it deploys every manifest in apps/.

  1. Packs, or takes a .tar pack wrote.

  2. Finds the App named app, or creates it with you as Owner. With clientId, a client with no App goes into it; a client in another App is refused. --app and --client-id send it to another App on the same engine, for a preview.

  3. Compares with the App's images of this version:

    The App hasDeploy
    this version, same image, active and runningnothing: "already running"
    this version, same imagemakes it active again, no upload: a rollback
    this version, another imagerefused: publish it under a new version
    nothing of this versionuploads the archive and publishes the image
  4. Makes the image the App's active image. The engine moves the App's clients to it one after another; each starts it next to what it runs and switches once it is healthy, and the next one starts only after it has stayed up for a minute. A client that fails keeps the image it ran; one that crashes in that minute halts the rollout too. Its state says why, and the clients after it wait.

  5. Waits until each client of the App runs it, fails (exit 1) or is switched off. An App with no clients yet just has the image active.

Ctrl-C stops the waiting; the engine carries on. The engine keeps the newest 10 images per App, and always the active one and those a client runs. Rollback is deploying an older version again.

In Studio's Apps tool you can also upload a packed .tar and choose the active image.

What a running App gets

Environment:

Variable
SYNTHIGY_ENDPOINTthe engine's URL
SYNTHIGY_CLIENT_ID, SYNTHIGY_CLIENT_SECRETthe App's credentials
PORT8080, service only
SYNTHIGY_APP_URLthe App's own public URL, service only
your variablesthe App's variables of type environment

The SDKs read the first three, so an App connects with no configuration (SDKS.md). A change to an environment variable reaches the App at its next start: restart it to apply it (Studio says when a restart is needed). Variables of type sdk are not in the environment: the App reads them over /data, so a change is there at its next read.

The secret belongs to the engine. When nothing of the App runs, a deploy sets a new one, and the old one stops working everywhere. Rotating it (synthigy iam rotate-client, or Studio) restarts the running App with a new one and prints nothing.

Network: the internet, and the engine at SYNTHIGY_ENDPOINT. The host, private address ranges and cloud metadata are blocked. Files and data are reached only through the engine's API, with the App's token.

Address (service): <client name, kebab-cased>.<engine host>, e.g. shop.box.example.com, or under the apps domain when the server has one. Renaming the client does not move it. On a machine without the proxy it answers on a loopback port only.

Sign-in (signIn in the manifest): when the image a client runs declares it, the engine gives the client the authorization_code and refresh_token grants, and registers / and each callback path as Redirect URIs on every hostname the client has. A new hostname gets them too. Redirect URIs on other origins, and paths you added yourself on the App's hosts, are kept. An image without signIn changes nothing: grants and Redirect URIs set by hand stay. Each callback path starts with one /, without spaces or #.

Limits: 256 MB memory, 500 millicores and 64 processes unless the App's limits say more. An ask above the limits fails the deploy.

Disk: read-only root, 64 MB /tmp in memory, and its volumes.

Health: a service must answer within 60 s, on healthCheckPath with 2xx or 3xx, or on / with anything below 500. Redirects are not followed. A worker must stay up for 3 s.

Stop: SIGTERM, then SIGKILL after 10 s.

Crashes: the App is restarted in place, after 10 s, doubling to 5 min, without end. The client stays running, with the crash in its Last Error until it is up again.

Sandbox type

TypeThe App
strict (default)runs only its own program; it cannot start containers or change its system
relaxedmay run containers of its own, inside its own limits, such as a whole Synthigy whose users deploy Apps into it

A relaxed App gets more access to the server than a strict one: its root user (still mapped to unprivileged ids), more capabilities, setuid helpers, fuse and tun devices, a writable cgroup and up to 1024 processes. Use it only for images you trust. Apps inside it are strict, and a relaxed App cannot be nested in another. It answers on one hostname, and its user ids never overlap strict Apps'. It needs 196608 sub-ids for the Apps user, which sudo synthigy service install --apps sets up; running Apps restart once while it does.

Logs

synthigy app logs shop-app
synthigy app logs shop-app --kind event --since 1h
synthigy app logs shop-app --since 2026-11-23T10:00:00Z --json
Kind
outputthe program's stdout and stderr, at most 100 lines/s
eventstarts, crashes, restarts, certificates

Its operators, the App's deployers, admins and the App itself may read them. A failed start's last 20 lines are also in the client's Last Error.

Stopping and removing

  • Stop a client: switch it off in Studio; switched on, it starts the App's active image again.
  • Restart it (Studio, or {"op": "app-restart", "oauth_client": "<xid>"} on /data): a new container of the image it runs, with its current variables and limits. Its operators may. app-state says what it runs, whether a restart is needed, how it last crashed and how full its volumes are.
  • Hard Reset it (app-hard-reset): stop, empty all its volumes, start again. Only the App's owners and admins.
  • Remove: synthigy iam remove-client <id> stops it and deletes its state, variables, configuration and hostnames; its volumes are kept 7 days. An App is deleted once it has no clients.

Running an image by hand

On a machine set up for Apps, without an engine in the loop, for trying an image:

synthigy app run dist/shop-1.4.0.tar --name shop --health /healthz -e GREETING=hi
synthigy app ls
synthigy app stop shop

It gets no client, secret or hostname from an engine.

When something fails

You seeCause
deploy prints the program's last lines and exits 1it crashed or failed its health check; the client still runs the image it ran
clientName is gonean old manifest: name the App with app instead
a client "is in the App …, not …"the manifest's clientId is in another App; deploy never moves a client
creating the App failsan App you may not change has that name; pick another
a limit refusalresources asks more than the App's limits
a client failed with restarts and a next tryit crashed; the portal restarts it (10 s, doubling to 5 min) and it is running again once it stays up
a client running with a Last Errora certificate that does not cover a hostname
publish refused with IMAGE_OVER_CAPthe manifest asks more memory, CPU or volume than a client of the App may use
other clients stay on the old imagea client before them failed on the new one; restart it once fixed, and the rollout goes on
the App gets 401 from the engineit uses a secret from before a rotation or redeploy: read SYNTHIGY_CLIENT_SECRET at start, never copy it

Error codes: ERRORS.md.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close