500 Error on /v1/console/variables After Nginx Proxy Setup (TypeError: domain is null) #10435
Unanswered
selaromdotnet
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Appwrite Community,
I am not an expert in ubuntu, nginx, docker, or appwrite, so if any of this sounds completely wrong forgive me as I'm definitely doing my best!
I'm trying to set up Appwrite on a VPS and have run into a persistent 500 error that I can't solve after several days of troubleshooting. I'm hoping someone in the community might have seen this specific issue before.
My Goal:
To run Appwrite (version 1.7.4) using Docker Compose on a VPS that already hosts other sites. I am using my own Nginx instance as a reverse proxy to handle SSL and serve Appwrite at https://app.pageinit.net.
The Problem:
The setup almost works. I can reach the Appwrite landing page and the signup page at /console. I can successfully fill out the form to create my root user account. However, after submitting the form, the app tries to redirect me to the onboarding page (/console/onboarding/create-project) and immediately fails with a "500 Server Error" page.
Using the browser's developer tools, I've identified the failing network request:
This error suggests that the Appwrite container doesn't know its own domain when this specific API is called, even though everything else seems to work.
My Configuration
Here are the relevant configuration files for my setup:
I've removed the default Traefik service and exposed ports for the three public-facing services (appwrite, appwrite-console, appwrite-realtime). I am also using bind mounts for persistent, restorable data.
(Showing only relevant services for brevity)
What I Have Already Tried (and did not work)
I have tried every conceivable fix for this, and the error persists every single time. This is a list of my troubleshooting steps:
Verified .env file: Confirmed _APP_DOMAIN and _APP_DOMAIN_TARGET are both set correctly to app.pageinit.net.
Verified Nginx Headers: Ensured that proxy_set_header Host $host; and other X-Forwarded-* headers are present in all relevant location blocks.
Confirmed Environment Variable Inside Container: I ran docker compose exec appwrite printenv | grep _APP_DOMAIN and confirmed that the variable is being passed correctly and is set inside the running container:
Reset Config Volume: I completely stopped Appwrite, removed the /opt/appwrite/volumes/config directory, recreated it as empty, and restarted. The error remained.
Reset Config AND Redis Volumes: Suspecting a bad cache, I stopped Appwrite, removed both the /opt/appwrite/volumes/config AND /opt/appwrite/volumes/redis directories, recreated them as empty, and restarted. The error still remains.
I am completely out of ideas. The container has the correct environment variable set, but it seems to be ignoring it, and resetting the config/cache volumes has not fixed it.
Has anyone ever seen this behavior? Is there another place a corrupted configuration could be stored?
Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions