Preview links
A preview is a version of your app at an address of its own. The live version keeps serving everyone as it was. When the preview looks right, promote it and it goes live as it is.
Previews are on every plan. They work for Worker apps and static sites that already have a version live. Container apps can’t have one yet, and neither can an upload from the dashboard.
Put up a preview
Section titled “Put up a preview”jiayang deploy acme/hello --previewVersion 5 (3f2a9c1d0b7e) is up as a preview. The live version is as it was.https://p-4c1f9a2e--hello--acme.jiayang-apps.cloud/Only people acme/hello is shared with can open it, until 2026-10-09 or the app's next preview. To make it live, run `jiayang promote acme/hello 5`.With --json, url is the preview’s address and live_url the live app’s.
The address starts with p- and eight random characters, so it can’t be guessed from the app’s name. It answers like the app’s own address: people sign in, and only the people the app is shared with get in. A preview is never more open than its app. Taking someone’s access to the app away takes their access to its previews away too, within 60 seconds.
A preview uses the app’s current environment variables, secrets and database. Code in a preview that writes to the database writes to the live app’s data.
How long a preview lasts
Section titled “How long a preview lasts”A preview answers for 7 days. Each app has one preview of its own at a time, so the app’s next preview replaces it, whoever puts it up. Pull requests’ previews are kept apart: each pull request has its own, and none of them replaces another or the app’s. A preview also stops answering when whoever put it up can no longer edit the app, and it ends for good: giving them edit access again doesn’t bring it back. After that, its address answers 404 as an address with no app, and we delete what it ran. In a browser it says previews end and that the app’s Versions tab lists the ones still open, the same page anyone gets on a preview address they can’t open.
The version stays in the list either way, and you can still promote it while its build is kept.
Each preview you put up is a version of the app, and counts toward the newest 20 versions we keep. Twenty previews in a row push older versions out, versions that were live before included, and those can’t be rolled back to or promoted any more. The version live now is always kept.
See your previews
Section titled “See your previews”jiayang versions acme/hello 5 deployed 2026-10-02 you@example.com (preview until 2026-10-09: https://p-4c1f9a2e--hello--acme.jiayang-apps.cloud/) 4 deployed 2026-10-01 you@example.com (live) 3 deployed 2026-09-30 you@example.com (preview, ended)The app’s Versions tab in the dashboard shows the same, with the preview’s link beside its version and a Promote button.
Make a preview live
Section titled “Make a preview live”jiayang promote acme/hello 5Version 5 is live.https://hello--acme.jiayang-apps.cloudPromoting is a rollback to the preview’s version: it goes live as it is, for everyone using the app, within a minute or two. Its preview address keeps working until it runs out. jiayang promote only takes a preview. For any other version, run jiayang rollback.
Previews of pull requests
Section titled “Previews of pull requests”With deploys from GitHub Actions set up, an owner of the app can turn on previews of pull requests, naming the GitHub environment their runs deploy in. Each pull request in the repository then gets a preview of its own, commented on the pull request, which ends when the pull request closes. A fork’s pull request never gets one. Your plan sets how many pull requests in the workspace have one at a time: 3 on Free, 10 on Team and 25 on Business. They don’t count toward the newest 20 versions.
In jiayang versions they read as (preview of pull request #7 until 2026-10-09: https://p-...), and the Versions tab names the pull request beside the link. To end one before its pull request closes:
jiayang preview end acme/hello --pull-request 7From an agent
Section titled “From an agent”The deploy_app tool takes preview: true. The agent gets the preview’s address back, and calls rollback with the version’s number to make it live. end_preview ends a pull request’s preview.
Permissions
Section titled “Permissions”Putting up, promoting and ending a preview take an editor or owner of the app, or a workspace admin or owner. Each is recorded in the audit log, and so is every request to a preview’s address.