
I can see that the root _APP_DOMAIN_FUNCTIONS
is blocked from being used for functions on the below file line
https://github.com/appwrite/appwrite/blob/c076dfe6f14ddacc4f658fdff85fbdbe31e05636/app/controllers/general.php#L63
For my current implementation, that means that the domain root cannot be used? I was originally interested in using an Appwrite function to host a site at the root, as well as sites on subdomains, but currently that seems impossible.

I guess this is mostly just a request for confirmation 🙂

I would suggest using a dedicated domain for your appwrite instance like appwrite.mycompany.com
because your appwrite instance can have multiple projects. For 1 of your sites (which I'm assuming is 1 function in one of your projects), you could create a custom function domain with whatever domain you want (myapp.com
)

so that is what I am doing, for appwrite itself, but with the goal of hosting sites on *.mycompany.com
I had set the _APP_DOMAIN_FUNCTIONS
env var to mycompany.com
This is largely due to my current implementation with Cloudflare proxy, and a nginx reverse proxy handling LetsEncrypt certificates.
I suspect that I would need to adjust my proxy implementation a bit for this to work properly

with the _APP_DOMAIN_FUNCTIONS
, appwrite generates a custom unique subdomain for each function like:
asjidojriweoj.domain.com
so it doesn't make sense to use that for a website URL/domain.

I was manually assigning the subdomains I wanted to specific functions Like this one right here: https://test.plygrnd.org

I'm reading through your medium nginx post right now

maybe you can do:
_APP_DOMAIN=appwrite.mycompany.com
_APP_DOMAIN_FUNCTIONS=functions.appwrite.mycompany.com
And then if you want a site at test.mycompany.com
, create a custom function domain for that in the function

Cloudflare wont do this with the free plan functions.appwrite.mycompany.com
And from what I have seen, if I dont set _APP_DOMAIN_FUNCTIONS
to the root domain, then the domain verification pops up with the CNAME prompt, which never works

with _APP_DOMAIN_FUNCTIONS
as the domain root, the domains are validated automatically it seems

in nginx you'd have multiple domains for the same proxy host:
- appwrite.mycompany.com
- *.functions.appwrite.mycompany.com
- test.mycompany.com

I was just doing *.mycompany.com
with a cloudflare DNS challenge

if that works on the cloudflare side, sure.
on the nginx side...i think *.mycompany.com
only goes 1 level so you'd need another entry for *.functions.appwrite.mycompany.com
. maybe, im not sure

I'll give it a shot, thank you!


it just refuses to verify

even though if I navigate to plygrnd.org I get the appwrite login page

WAIT! even better, verification fails, but the function is working!

thats a riot
Recommended threads
- Cannot find module failure
Sorry, Newbe question here. I just installed Appwrite and am trying to install my first Function an am having absolutely no luck what-so-ever getting this done...
- Problems with adding my custom domain
- Can't push functions when self-hosting o...
Hello, I'm a bit new to appwrite functions and recently hosted a fresh 1.7.4 on my portainer setup. Tried to create a new function and when trying to push it I ...
