Skip to main content
A template is a single orgo.ai/v1 document, written in YAML or JSON. This page is the field-by-field reference. The canonical machine-readable contract is the JSON Schema at GET /api/template-schema - point your editor at it for autocomplete and inline validation.

Two forms

Templates accept a canonical form and a shorter sugar form. Both normalize to the same document and the same digest.

Sugar → canonical

Top-level fields

template

Identity and provenance. name and version are required.

hardware

The VM’s resource shape. Every field is optional; sensible defaults apply.
Hardware in a Create computer request overrides these defaults at launch.

vars and interpolation

vars are compile-time strings, interpolated across the document before build.
  • ${var.X} resolves from vars.
  • ${env.X} resolves from a literal env value (not secret-backed ones).
  • $${var.X} escapes to a literal ${var.X}.
  • An unknown reference is a validation error with the exact field path.

env

Environment variables written to the VM. Keys must be UPPER_SNAKE_CASE. Each value is a literal string, or a {secret: <name>} reference resolved from the launching user’s vault at create time.
See Secrets for the full secret-injection model.

build

Package and command steps run once when baking the golden snapshot, before app installs. This is where dependencies get pre-installed so launches are instant.

files

Files materialized into the VM. Each entry sets exactly one of from or inline.
to must be an absolute path with no ... Reserved system paths are rejected: /proc, /sys, /boot, /dev, /tmp, /run, plus the Orgo runtime (/etc/orgo, /var/orgo, /orgo, /etc/supervisor, and Orgo’s own binaries under /opt and /usr/local/sbin). Your apps can still write under /opt and elsewhere - only Orgo’s own runtime files are off-limits.

apps

An app bundles an install step with the long-running services, health checks, and ports it needs. Services are managed by supervisord, so they start at boot and respawn on crash.

services

health

A polled liveness check. After retries consecutive failures, on_fail runs - this is the per-app watchdog. on_fail is one of restart_service:<name>, restart_vm, alert, or none.

ports

terminal

Pre-staged tmux sessions, created detached at first boot. Orgo’s browser terminal attaches to them by name.
Sessions are not auto-restarted. For a process that must respawn, use an app service instead.

hooks

Shell that runs at lifecycle points. Each runs with set -e; the default timeout is 10 minutes.
on_resume is the right place to do per-VM work that depends on launch-time state (like a freshly injected secret), because it runs on every restore - see Secrets.

telemetry

egress_policy

Per-VM network filtering, enforced on the host.
Rules are domain patterns, exact domains, IPs, or CIDRs. The VNC and desktop API paths are always reachable.

streaming

Outbound RTMP(S) streams of the desktop.
streaming is parsed and validated today; the runtime streamer is rolling out. Track status in the JSON Schema.

Next steps

Secrets

The full secret-injection model.

Triggers

Sources, actions, and dedup.

Examples

Annotated real templates.

Publish API

Ship a template over HTTP.