Skip to content
Back

[SOLVED] Unable to connect over this domain.. _APP_OPTIONS_ROUTER_PROTECTION

  • 0
  • Resolved
  • Self Hosted
punti_z
2 Jun, 2026, 22:06

I stood up a fresh VPS and deployed Appwrite 1.9.0 using CLI. Now when I try to access Appwrite using servers IP address I get an Unable to connect over this domain error.

I have disabled the _APP_OPTIONS_ROUTER_PROTECTION flag in .ENV file but nothing seems to work..

Please help as I am unable to migrate a customer project to the new VPS..

TL;DR
Issue was resolved successfully with guidance provided. User is grateful and offers to send beers as a token of appreciation.
Albert Cameron
3 Jun, 2026, 01:00

The router protection flag change not taking effect is almost always because the containers weren't restarted after the .env edit Appwrite reads those variables at startup, so a live edit does nothing until you bring the stack down and back up. Quick question though are you accessing Appwrite via the raw IP address, or do you have a domain pointed at the VPS? The reason I ask is that even with protection disabled, 1.6+ versions have some quirks around IP-only access that might need a different fix.

punti_z
3 Jun, 2026, 08:57

Did docker compose down and then back up with docker compose up -d .. doesn’t do anything .. I am migrating a in production app so can’t switch domains already. If the quirks exist then I would need to buy another domain just for migration :/

Ibaraki Douji
3 Jun, 2026, 09:24

small question, what value did you use for the env ? is it a true/false ? enabled/disabled ? 1/0 ? it should be _APP_OPTIONS_ROUTER_PROTECTION=disabled, also with docker inspect <container> can you confirm it's on the appwrite-api container ?

Ibaraki Douji
3 Jun, 2026, 09:25

regarding the domains, you could try by setting a local DNS (on linux it's /etc/hosts) to point the domain to the new server

punti_z
3 Jun, 2026, 09:28

In 1.9.0, it defaults to disabled, so I tried, false, blank and disabled again but nothing works. It’s _APP_OPTIONS_ROUTER_PROTECTION=“disabled”. Will check Appwrite-api inspect when I am back in front of my machine.

punti_z
3 Jun, 2026, 09:32

I am accessing the instance from my local machine and ssh into the server terminal for other changes. For local DNS to work, I would need to be on my server browsing to localhost.. don’t have that setup.

Ibaraki Douji
3 Jun, 2026, 09:35

not really in the /etc/hosts you just say what IP your domain is pointing on.

so if your forwarding the port into your local machine, you can just set localhost and it should work.

if your accessing appwrite via :

  • PC > SSH Port foward > Server (then on your pc it's localhost, because you access it with 127.0.0.1:<forwarded_port>)
  • PC > Server (then direct server IP in the hosts file)

(basicly what should go in the /etc/hosts is the IP you put in the browser to access appwrite, the domain can be anything, as long as it match the domain you put in the appwrite config)

Ibaraki Douji
3 Jun, 2026, 09:39

the reason it work is because the browser just put the domain in the Host header, and it's what appwrite check to say if your using a domain (you could even mabe just curl -H "Host: <your domain>" http(s)://<appwrite_ip>/v1) and it might work

punti_z
3 Jun, 2026, 09:41

Ah that’s right.. clever, let me try that today and confirm.. thanks for your guidance. I really appreciate it..

punti_z
3 Jun, 2026, 21:36

[SOLVED] Unable to connect over this domain.. _APP_OPTIONS_ROUTER_PROTECTION

punti_z
3 Jun, 2026, 21:37

Thanks <@493852865907916800> your trick worked. But now migration refuses to work. Stuck at pending and the migrations container log has an expection _APP_MIGRATION_host is not set ? 😫😫 .. Any ideas ?

Ibaraki Douji
3 Jun, 2026, 21:59

when you say you migrate, are you using the GUI to move things ? can't you just do a copy of the database and storage to the new VPS so everything goes back online ? (redis don't really need copy, unless you want to keep sessions and cache alive)

if your usinjg the GUI, if it's complaining on the new server, maybe it's the migration host which is the server hostname from outside (maybe if you add hosts directly in the old VPS containers, maybe you can trick them to not use a real DNS name)

but i really don't know for the GUI as i only did a direct copy of the docker volumes to the new server and it worked fine for me

aslo i didn't mention but do a backup of all the data in case you haven't already, just in case something bad happen

punti_z
3 Jun, 2026, 23:13

Interesting approach.. but copying over DB and storage would recreate the project structure, DB and tables with same id and env variables defines ? Can you please let me know in a bit more detail how you achieved this ?

Ibaraki Douji
4 Jun, 2026, 07:16

basicly since docker is a reproducible environment :

  • i copied the docker compose with all the envs to the new server (make sure it will use the same image and not update)
  • started the new server to create the volume (then down to avoid conflict)
  • on the old one i just shutdown appwrite
  • tar.gz all the differents appwrite volumes (in /var/lib/docker/volumes)
  • restore them in the new server
  • spin back up appwrite on the new server
  • don't forget to move the DNS (else functions/sites won't be able to reach appwrite API)

basicly everything you did in appwrite is stored somewhere, and by copying the docker volume you just copy the persistent mariadb volumes as well as the bucket upload, builds, ... just everything

and when i said you don't need to copy redis data, it's because redis just act as a cache, so a cache can just be repopulated from the actual database, maybe people will get disconnected if the sessions are in redis, but just that

punti_z
4 Jun, 2026, 12:14

Interesting .. let me try that .. if it works, I’d owe you a couple of beers 🙂

Ibaraki Douji
8 Jun, 2026, 11:17

where you able to test that method for migrating to the new server ?

punti_z
9 Jun, 2026, 12:43

Hey it worked.. learned a bunch of things in the process .. thanks a ton for your guidance and let me know where I need to ship those beers 🍺

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