Repository navigation
Description
🐛 Bug Report
Site preview domains are unreachable on self-hosted 2.2.0. The API redirects preview
requests to the Console route /auth/preview, but the bundled Console image
(appwrite/new:1.1.96-self-hosted) does not implement that route, so the browser
lands on the Console's 404 page and preview authorization can never complete.
Steps to reproduce
- Self-hosted 2.2.0 via the official
docker-compose.yml, with_APP_DOMAIN_SITESconfigured. - Deploy a Site and open its deployment-specific preview domain:
https://<deploymentId>.sites.example.com/ - Follow the redirect.
Expected
The Console serves a preview-authorization screen, sets the preview cookie, and
returns to the deployment URL.
Actual
GET https://<deploymentId>.sites.example.com/
→ 301 https://console.example.com/auth/preview?projectId=<projectId>&origin=…&path=%2F
GET https://console.example.com/auth/preview?…
→ 404 "404 — Page not found" (Console error page, title "Appwrite Console")
The Site's own active domain works fine — that path is not a preview domain, so
$isPreview is false and the preview check never runs.
Evidence
Measured against a 2.2.0 instance (GET /v1/health/version → {"version":"2.2.0"}):
| Request | Status |
|---|---|
/sign-in |
200 — Console routing itself is healthy |
/sign-up |
200 |
/auth/preview |
404 |
/console/auth/preview |
302 → /auth/preview → 404 |
The route is absent from the shipped Console bundle. In
/assets/index-<hash>.js (~6.4 MB) the string auth/preview occurs 0 times,
and no preview-related route is registered at all (previewAuth, previewToken,
disablePreviewAuth: 0 occurrences each).
The redirect is built in
app/controllers/general.php (2.2.0):
->redirect($url . (System::getEnv('_APP_CONSOLE_URL_SCHEME', 'legacy') !== 'root'
? '/console/auth/preview?'
: '/auth/preview?')
. \http_build_query([...]));Both values of _APP_CONSOLE_URL_SCHEME end in the same 404: with root the API
targets /auth/preview directly; with legacy it targets /console/auth/preview,
which the Console redirects (302) to /auth/preview. So the setting is not a workaround.
Environment
- Appwrite 2.2.0, self-hosted, Docker Compose
- Console image
appwrite/new:1.1.96-self-hosted(as shipped in the 2.2.0 compose file) - The
appwrite-consoleservice is unmodified from the upstream 2.2.0docker-compose.yml - Traefik in front, reverse proxy upstream of that
Activity
HarshMN2345 commentedon Sep 15, 2026
@JoshiJoshiJoshi Thanks for reporting this! Could you try updating your appwrite-console image to appwrite/new:1.1.101-self-hosted, redeploy, and let me know if opening a deployment preview now signs you in and redirects back correctly?
JoshiJoshiJoshi commentedon Sep 16, 2026
@HarshMN2345 It did work. Thank you very much for the fast fix!