Protection, releases and versions
Who may see your deployments, when a new version reaches production and for what share of visitors, and how a page left open keeps working after a deploy.
Deployment protection#
By default anyone with a preview's address can open it. In Settings → Deployment protection protect previews (and production if you want):
| Mode | Who gets in |
|---|---|
off | Anyone with the address. |
team | Members of the team that owns the project, after signing in to the dashboard. Every plan. |
password | Anyone who knows the password. Pro plan. |
After signing in, a cookie is set on that address and lasts 24 hours. "Sign everyone out" (or changing the password) ends every cookie.
- Shareable links (Pro): a link with an expiry (up to 90 days) that opens without signing in; revoking it also ends the visits that came through it, at once.
- Bypass token for automation (tests, crawlers): send it in the
x-protection-bypassheader or the query parameter of the same name. Shown once. - Exceptions: domain names that are never protected (up to 20).
- OPTIONS requests: when on, they pass without signing in, so CORS preflight requests work.
cloudhost protection set --previews team --project shop
cloudhost protection bypass --project shop
cloudhost protection link create --hours 72 --label "client review" --project shopDeploy without promoting, and promote#
Turn off "Auto-promote" in Settings → Advanced and a production build no longer goes live when its checks pass: the version waits at its own address (rel-<version>--<name>). Press "Promote" on the deployment page to make it production at once, or start a gradual release. Instant rollback works as before.
cloudhost routing set --auto-promote off --project shop
cloudhost routing --project shop # candidates waiting
cloudhost promote 42 --project shopGradual release#
A gradual release sends a share of production traffic to a new version, for example 10 → 25 → 50 → 100 percent. Each visitor stays on one side (a cookie), and raising the share only moves new visitors. Take the steps by hand or on a schedule (one step every N minutes). The release page shows requests and errors per version, minute by minute.
cloudhost release start 42 --steps 10,25,50,100 --every 30 --error-rate 2 --project shop
cloudhost release --project shop # the share, the plan, requests and errors per version
cloudhost release set 50 --project shop
cloudhost release stop --project shopVersion skew protection#
When a new version goes live, a page left open from the previous one still asks for that version's files and endpoints. Turn this on in Settings → Advanced and the production versions of the last few hours (12 by default, up to 168) stay up, and a request that names its version goes to that version.
| How a request names its version | |
|---|---|
?dpl=<id> | A query parameter, for example on static file addresses. |
x-deployment-id: <id> | A header on the requests the page's code sends. |
کوکی _dpl · _dpl cookie | Every page load sets it to the version that served the page; it counts for that page's later requests, never for a new page load, which always gets the newest version. |
The deployment id is in the CLOUDHOST_DEPLOYMENT_ID variable at build time and at run time. Frameworks that support a deployment id (for example Next.js's deploymentId option) pick it up by themselves and send ?dpl= and the header; nothing else is needed. In your own code, add the id to file addresses (?dpl=) or to your requests' x-deployment-id header, or rely on the cookie.
cloudhost routing set --skew on --skew-hours 12 --project shopFrom an AI assistant#
MCP tools: get_protection, set_protection, create_protection_bypass, delete_protection_bypass, create_share_link, revoke_share_link, get_routing, set_routing, promote_version, start_release, get_release, list_releases, set_release_percent, advance_release, stop_release.