
But then the base app would be unsecured

Or would that be solved by NPM (Nginx Proxy Manager) ?

are you saying your front end app is not connecting to console.whatever?

do you also have NPM in front of appwrite?

Well, I'm kind of cheating, because I also redirecting myapp.mydomain.tld/v1/
to be served by the appwrite service in the traefik config. Because I don't have yet an certificate for console.
, the app would not work without this

Not yet, but I'm planning on adding it

👀 this doesn't really sound right...

probably best to set this up first especially if you're already hosting multiple apps on the same server. and if you're using NPM, Appwrite's certificates wouldn't really matter

Great, I'll set it up then

_APP_DOMAIN
should be your main domain (like console.whatever). For project specific endpoints, you can use custom domains (https://appwrite.io/docs/custom-domains). But, like I said, if you're using NPM, you may not need to add a custom domain since NPM would handle the certificate generation.
For using NPM in front of Appwrite, you can refer to this: https://medium.com/@stnguyen90/how-to-run-appwrite-behind-nginx-19348ed34243

Awesome! Thanks a lot!! 💯 👏

I didn't understand this from the article:
<IP Address of NPM> How do I get this IP, if it's running on the same server ?

Is it 127.0.0.1, even though it's inside of docker ?

not 127.0.0.1

is the public IP of the server ?

so traefik and NPM should be in the same docker network and have an IP address in that network. You can run docker inspect <network>
to get the containers in the network

Good, I'll try that

Is it (1) IPAM.Config[0].Gateway
or (2) Containers.{ID}.IPv4Address
? Option (2) has a "/16"
subnet mask after the address, does it work with that ?

it would be the IPv4 Address without the subnet mask

Got it

I got the domains working with https in NPM, in the console everything works. But when the frontend app calls the console endpoints, there are some cors errors. The frontend calls this:
GET https://console.myapp.mydomain.tld/v1/account
origin: https://myapp.mydomain.tld
referer: https://myapp.mydomain.tld/
In the devtools logs:
Access to XMLHttpRequest at 'https://console.myapp.mydomain.tld/v1/account' from origin 'https://myapp.mydomain.tld' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost' that is not equal to the supplied origin.
It's very strange because before the GET /v1/account
, the browser sends an OPTIONS /v1/account
, and on the Options method the server replies with the right access-control-allow-origin: https://myapp.mydomain.tld
.
But when the browser calls the Get method, for some reason the server replies with access-control-allow-origin: https://localhost
, which I don't understand why. It doesn't appear to be related to NPM because it works in the Option method, but I dunno.

Did you add the hostname for your app as a web platform for your project in the Appwrite console?

Maybe not, I'll see

Yes, that solved it! Thanks again 👍

[SOLVED] Error when logging to console after account created in Chrome
Recommended threads
- Properly contained appwrite main app can...
Hello! We tried to reinstall our main self-hosted appwrite with a new method but the main app 2 mins after launch throw this error: ```2025/06/22 16:16:14 s...
- Broken message
https://github.com/appwrite/appwrite/issues/10081 I just realized that I can just build appwrite myself, was this bug fixed in latest dev release?
- 404 errors after 7 Days
Local hosted Appwrite via docker. Last version and current version. After exactly 7 days Appwrite stops working. I get 404 route not found, cannot access anyth...
