Clean 1.9.0 install, trying to access Appwrite from another PC and get 401 general_access_forbidden
- 0
- 5
- Self Hosted
I've been using Appwrite cloud for several months now, it's great and I love it. Doing some local testing so I setup a new Docker image on a Mini PC. Install failed a few times, I kept restarting the install and eventually it completed. I created my account, logged in and created my first project.
Then I tried to access that instance from my main computer. I opened port 80 and 443 through the windows firewall, but when trying to connect I get this error: Error 401 Router protection does not allow accessing Appwrite over this domain. Please add it as custom domain to your project or disable _APP_OPTIONS_ROUTER_PROTECTION environment variable. general_access_forbidden
In my .env file, _APP_OPTIONS_ROUTER_PROTECTION is already disabled.
What did you type in the env?
It needs to be written disabled and check if itβs saving the env. You should after changing it restart the dockers by
docker compose down && docker compose up -d
In the .env it's listed as: _APP_OPTIONS_ROUTER_PROTECTION="disabled"
I just tried "docker compose up -d" to refresh the container, but the .env was showind disabled from the beginning. I will try the down and up command now to see if it fixes it...
Refreshed the docker with "docker compose down && docker compose up -d" and still getting the 401 error.
In the .env it's listed as: _APP_OPTIONS_ROUTER_PROTECTION="disabled"
I just tried "docker compose up -d" to refresh the container, but the .env was showind disabled from the beginning. I will try the down and up command now to see if it fixes it... Refreshed the docker with "docker compose down && docker compose up -d" and still getting the 401 error.
what are your domain env vars?
They are the default env vars on a fresh install, I didn't modify any of them. Should I? _APP_DOMAIN="localhost" _APP_CUSTOM_DOMAIN_DENY_LIST="example.com,test.com,app.example.com" _APP_DOMAIN_FUNCTIONS="functions.localhost" _APP_DOMAIN_SITES="sites.localhost" _APP_DOMAIN_TARGET="localhost" _APP_DOMAIN_TARGET_CNAME="localhost" _APP_DOMAIN_TARGET_AAAA="::1" _APP_DOMAIN_TARGET_A="127.0.0.1" _APP_DOMAIN_TARGET_CAA=
and how are you accessing your instance?
Its installed on a Windows 11 Home Mini-PC with Docker (with nothing else really installed on that PC) and I"m trying to access it with my Mac development machine that has Antigravity, Cursor and Kiro on it. Both are on the same local network and I was trying to access it via it's local IP address on port 80.
Something of note that I just discovered. On the Mini PC with the Appwrite Docker, I can log into the console by opening a browser and typing "localhost" however I get the 401 error if I try "127.0.0.1" instead of localhost.
I am experiencing the same issue and havenβt been able to find a solution yet.
My reverse proxy was not forwarding the correct host headers properly, now the issue is solved, thanks anyways.
<@310464271068823564> I was getting the same error. You have to add your local IP to the _APP_DOMAIN_SITES env var, which should fix the issue
Thanks a ton. This fixed the issue for me as well in my local dev env. I'm not using the appwrite sites atm so basically that var should not affect how my local deployment runs?
Recommended threads
- Unable to init function via cli
Hello! I have created a new self hosted instance of appwrite 1.9.6 and have connected to that insatnce with the cli 27.2.0 that was released a few hours ago. Wh...
- Appwrite-injected variables are not avai...
I am using rust-1.83 as a runtime and try to access APPWRITE_FUNCTION_API_ENDPOINT or APPWRITE_FUNCTION_API_KEY during runtime. Both are not set during my execu...
- OAuth Missing redirect URL
Hello all, on a Flutter mobile app with latest Appwrite dependency (25.4.0) I always got "Missing redirect URL" - "Your OAuth login flow is missing a proper red...