Site preview domains 404: API redirects to /auth/preview, a route the bundled Console does not implement (2.2.0 self-hosted) · Issue #13713 · appwrite/appwrite · GitHub
Skip to content

Site preview domains 404: API redirects to /auth/preview, a route the bundled Console does not implement (2.2.0 self-hosted) #13713

Closed

Description

@JoshiJoshiJoshi

🐛 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

  1. Self-hosted 2.2.0 via the official docker-compose.yml, with _APP_DOMAIN_SITES configured.
  2. Deploy a Site and open its deployment-specific preview domain:
    https://<deploymentId>.sites.example.com/
  3. 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-console service is unmodified from the upstream 2.2.0 docker-compose.yml
  • Traefik in front, reverse proxy upstream of that

Activity

  1. added
    product / authFixes and upgrades for the Appwrite Auth / Users / Teams services.
    product / databasesFixes and upgrades for the Appwrite Database.
    product / domainsFixes and upgrades for the Appwrite Domains.
    product / functionsFixes and upgrades for the Appwrite Functions.
    product / messagingFixes and upgrades for the Appwrite Messaging.
    product / self-hostedIssues only found when self-hosting Appwrite
    product / sitesFixes and upgrades for Appwrite Sites.
    product / storageFixes and upgrades for the Appwrite Storage.
    on Sep 15, 2026
  2. HarshMN2345 commented on Sep 15, 2026

    @HarshMN2345
    Member

    @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?

  3. JoshiJoshiJoshi commented on Sep 16, 2026

    @JoshiJoshiJoshi
    Author

    @HarshMN2345 It did work. Thank you very much for the fast fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / authFixes and upgrades for the Appwrite Auth / Users / Teams services.product / consoleConsole, UI and UX issuesproduct / databasesFixes and upgrades for the Appwrite Database.product / domainsFixes and upgrades for the Appwrite Domains.product / functionsFixes and upgrades for the Appwrite Functions.product / messagingFixes and upgrades for the Appwrite Messaging.product / self-hostedIssues only found when self-hosting Appwriteproduct / sitesFixes and upgrades for Appwrite Sites.product / storageFixes and upgrades for the Appwrite Storage.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions