Preview Environments
Every pull request can get its own URL. HostStack spins up an isolated deploy of your service when a PR opens, updates it on every push, and tears it down when the PR is closed.
How Previews Are Triggered
Previews are automatic. Any service connected to a GitHub, GitLab, or Bitbucket repo with auto-deploy enabled gets a preview deploy whenever a pull request (GitLab: merge request) is opened, reopened, or pushed to against that repo. HostStack uses the same Git app that powers your production deploys, so there's no extra OAuth step and no separate toggle to flip — if a service auto-deploys, its PRs get previews.
URL Scheme
Each preview gets a stable subdomain derived from the PR number and the service slug:
https://pr-{number}-{service-slug}.preview.hoststack.devOn GitHub, the URL is posted as a comment on the PR by the HostStack app, along with the deployed commit and build time, and updates on every redeploy.
Environment & Configuration
A preview is a deploy of the same service from the PR branch, so it uses that service's environment variables, attached env groups, and linked databases — there's no separate preview configuration to maintain. If you need a value to differ for previews, change it on the service.
Secrets remain encrypted at rest and never appear in PR comments or deploy logs. The dashboard's redaction rules apply identically to previews.
Cleanup
When the PR is closed or merged, HostStack stops and removes the preview container on the next webhook. As a backstop, any preview still running after 7 days is reaped automatically by an hourly cleanup job. Reopening the PR creates a fresh preview.