Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Deployments

Preview changes, publish an app update and recover from a failed deployment.

Use this guide after deploying your first app. Run commands from that app’s project with a current login. The CLI reuses the configured or saved installation. You need management access to the app and compatible CLI, management and agent builds.

Publish a preview

The app must already exist. Create a branch for your changes, check the project, then publish a preview:

git switch -c review
pnpm check
widefleet preview

The CLI builds locally and prints the preview URL after activation. Open it, sign in and exercise the change. Repeating the command updates the same preview and preserves its data. Widefleet names the preview after your branch. When source storage is disabled or unavailable, you can instead use widefleet preview --name review without creating a Git branch.

Previews start with their own empty databases and file storage. On builds supporting app access groups, they inherit the parent’s rule. Configure network permissions and app connection grants separately for each preview.

The installation determines the preview’s address. Standard installations use an extra hostname label; organizations with a hostname suffix use a flat address. See preview addresses for examples and required builds. The operator must provide DNS and TLS for the returned hostname. A successful deployment confirms app activation; initial certificate issuance may still be pending.

Publish the update

If you used a branch for the preview, merge your changes into main first:

git switch main
git merge review

Then deploy the app:

widefleet deploy

This builds and publishes the current project to the app named in wrangler.jsonc, preserving that app’s existing data. Open the printed app URL and verify the changed behavior.

Widefleet Cloud automatically saves your source code to the app’s Git repository when you deploy. Support for self-hosted installations is coming soon. See saving and recovering source code to pick up your work in another session or keep using your existing Git repository.

For scripts, widefleet deploy --json returns the completed deployment, including appId, deployment id, status and url. Build output and progress go to stderr. With --no-wait, the result reports the queued deployment; activation follows asynchronously.

Inspect a failure

Use widefleet apps to find APP_UUID, then inspect its deployment history:

widefleet history APP_UUID
widefleet events APP_UUID DEPLOYMENT_UUID
widefleet logs APP_UUID --level error --since 1h

Use the same app or preview ID for all three commands; omitting it from logs selects the app in the current project’s configuration. Replace DEPLOYMENT_UUID with the history entry’s id. Deployment events describe installation progress; runtime logs describe app execution and require the installation’s telemetry services.

Symptom Next step
Local build fails Run pnpm check and pnpm build, fix the reported error, then retry.
Deployment remains queued Ask the operator to check the registered agent and its availability.
Activation fails Read the deployment events. A rejected update retains the previously serving version.
Preview has a certificate error Ask the operator to check that DNS and TLS cover the returned preview hostname.
An external request is denied Check widefleet network for the selected app or preview; grants are separate.

Roll back code

From the history, select the artifactId of a previously successful deployment:

widefleet rollback APP_UUID ARTIFACT_UUID

Rollback waits for activation unless --no-wait is supplied. It restores code; database contents, uploaded files and current access rules are retained. Check that the old code is compatible with the current schema before rolling back, then open the app and verify it.

See configuration for resource declarations and the explicit migration workflow, and CLI reference for command syntax.

See preview reference for naming, parent selection, cleanup and DNS requirements.

Last updated on November 16, 2026