Skip to main content

Templates and Tabs

Templates define repeatable deployments: containers, compose stacks, environment variables, ports, volumes, scripts. This page explains every tab, the Apply button behavior, and how merges work.

Tabs in a Template

  • Compose: YAML editor for docker-compose style stacks. Supports variables using ${VAR} syntax.
  • Variables: Define default values (with secrets). These can be overridden at deploy time or per device.
  • Tunnel: Defines ports that the tunnel app can forward to the edge network
  • Scripts: Pre- and post-deploy scripts, health checks, and remediation scripts.
  • Alerts: this tab will be added in a future release. the tab will allow you to define alerts that will be triggered when a device meets certain criteria, ie cpu, memory limit or device offline

The Apply button (per-tab merges)

  • Purpose: Apply merges the data from the currently selected tab of the template into one or more devices without performing a full Deploy. Think of it as “synchronize just this section.”
  • Where it appears: Variables, Tunnels and Scripts It does not appear on the Compose tab.
  • What it does by tab:
    • Variables > Apply: Adds any variables that are missing on the device. Existing device-level values are not overwritten unless you explicitly choose overwrite in the dialog (if available). Secret flags are preserved.
    • Tunnels > Apply: Ensures the ports are syncronised with all targeted devices.
    • Scripts > Apply: Syncs the script definitions bundled in the template to the device so they are available for scripted workflows (does not execute them). Execution happens separately.
    • Not on Compose: Compose stacks are deployed atomically via Deploy. There is no per-tab Apply to avoid partial state in multi-service stacks.
  • Preview and confirmation: Clicking Apply opens a preview showing what will be created/updated per device. Review diffs before confirming.
  • Scope: You can Apply to a single device (from its page) or to multiple devices (from Templates > Apply and selecting devices/labels).

Merge rules and conflict handling

  • Non-destructive by default: Apply adds missing items. By default it will not overwrite existing device-level values unless you opt-in.
  • If you want sa variable that is always overwritten (uses the value in the template and not the device-level value) rather hardcode the value in the compose script.

Deploying a Template

  1. Click Deploy and select devices or labels.
  2. Review variables. Any missing variables, ports, and scripts referenced in the Template are automatically surfaced so you can fill them before confirming.
  3. Confirm to start a deployment job and monitor progress per device.

Deploy vs Apply: when to use which

  • Use Deploy when you want to roll out Compose stacks or container changes that should restart/recreate services with the updated configuration.
  • Use Apply (per-tab) for drift correction or to seed devices with missing variables, scripts, or single-container definitions without restarting unaffected services.

Notes

  • Prefer variables for environment-specific values (URLs, tokens, ports).
  • Roll back using the History tab:
    • Open Templates > Your Template > History.
    • Select a prior revision to view the diff of Compose/Containers/Variables.
    • Click Deploy this revision, provide any required variables, and confirm. This redeploys the older config to selected devices.
  • Event tracking: After you click Deploy, a deployment event is created. Open Events and click the row to see state, timestamps, and per-device logs.

Examples

  • Example variables that will be auto-surfaced at deploy time if missing:
# Variables tab defaults
API_URL: https://api.example.com
API_TOKEN: "${SECRET_API_TOKEN}" # marked secret
API_PORT: "8080"