You’ll turn on PR previews for an app connected to GitHub, then open a pull request to get its own URL.
Before you start
The app must be connected with GitHub Auto-Deploy.
Turn previews on
App → Deploy tab → Previews → tick Enable PR previews, save.
wokku previews:settings my-app --on
curl -X PATCH https://wokku.cloud/api/v1/apps/my-app/preview_settings \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"preview_enabled": true}'
Then open a pull request. Wokku builds the PR branch at https://my-app-pr-42.wokku.app (42 is the PR number) and comments the URL on the PR.
Data
Previews don’t get a database of their own yet. By default (No database), Wokku removes your app’s database connection values from the preview’s environment variables (DATABASE_URL, REDIS_URL, and any other variable that holds those credentials), so a preview can never touch production data. Pages that need a database will error in the preview.
To let previews use the production database instead, choose Share production database on the app’s Deploy → Previews page, or run:
wokku previews:settings my-app --database shared
With a shared database, migrations, seed scripts and anything you click in a preview write to production. Only use it if your previews are read-only.
Limits and cleanup
- Up to 3 previews run at once per team. Past that, Wokku comments on the PR instead of building.
- A preview is destroyed when its PR is merged or closed. Idle previews sleep after 7 days and are destroyed after 30.
Remove one by hand:
Deploy tab → Previews → Destroy next to the preview.
wokku previews my-app # list
wokku previews:destroy my-app 42 # tear down PR #42
curl -X DELETE https://wokku.cloud/api/v1/apps/my-app/previews/42 \
-H "Authorization: Bearer $TOKEN"
Ask Claude: “Destroy the PR 42 preview of my-app.”
Troubleshooting
- No preview appeared: check previews are on, the PR is on the connected repo, and your team has fewer than 3 previews.
- No PR comment: re-check the GitHub App still has access to the repo.