Skip to content
Back

Hello guys

  • 0
  • Self Hosted
Bajzik
19 Aug, 2025, 15:13

First of all thank you very much for so good application. I have self-hosted AppWrite instance on my VPS. It is working on http protocol 90 and https 543. These are working perfecly fine. I wanted to make it work on my domain, so i've created A DNS record for api.domain.com for AppWrite and added nginx configuration to reverse proxy api.domain.com to VPS_IP:543. This is also working fine and i'm able to reach this domain on SSL and do all the stuff.

Problem is when i'm trying to fetch data from my frontend app, also hosted and reverse proxied on my VPS under app.domain.com. While on localhost request to login is passed (email request is OK, account request is OK and save fallbackCookie to local storage), when i try to request this from app.domain.com, email request is OK, but account request returns error User (role: guests) missing scope (account). I've realised that no cookie is present on website app.domain.com, nor local storage has fallbackCookie set.

From env, i set publicly visible domain as APP_DOMAIN _APP_DOMAIN=api.domain.com

What could be the cause that session is not stored on production, but it is stored on localhost?

TL;DR
Developers are facing an issue where the session is not stored on the production domain but is fine on localhost. Possible cause could be the misconfiguration of the publicly visible domain and the way cookies are handled. Double-check the environment settings and ensure cookies are set properly for the production domain.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more