Skip to main content
deploy is a block inside an app service that sets the default and the lock of three behaviors: zero-downtime (blue-green) deploys, automatic rollback and rollback with data. It only restricts: the plan still decides what exists, and a manifest never enables something the plan does not include.

The three settings

Changing a locked setting to another value returns 403 TEMPLATE_SETTING_LOCKED; sending the value of the template is always accepted. Quote "off" and "on" in YAML, or the parser reads them as booleans. For how blue-green and rollback work for a regular app, see Rollback and zero-downtime deploys.

When to lock blue-green off

Blue-green runs the old and the new copy at the same time while traffic moves. Lock it off (default: "off", locked: true) whenever two copies running together would do harm. Leave it open (auto, unlocked) for stateless web apps and APIs that keep their data in a managed database and answer requests without side effects at startup.

When to require rollback with data

Use rollback: { with_data: required } when the new version migrates the database or the data files on startup. Rolling back only the code would leave an old program reading a schema it no longer understands. With required, the manual and the automatic rollback of the code alone are blocked, and the way back is to restore the snapshot taken before the update, which brings the code, /app and the stack’s databases back together. Use optional (the default) when the code can be rolled back independently, as in a stateless bot whose state is only a token.

Updates to the template

Whoever uses the template receives a new version only when they choose to update. Before the update, the platform takes a safety snapshot of /app and of the stack’s databases, updates the services one after another and, if a step fails, goes back to the snapshot. with_data: required is what tells the platform that restoring the databases is part of going back.

Example: n8n and the starter bot

n8n migrates its database, runs schedules and may keep SQLite, so it locks blue-green off and requires rollback with data:
The starter bot has no data to migrate, but two copies with the same token would answer twice:
Last modified on October 30, 2026