Back

Sefl-hosted appwrite function domain

  • 0
  • Self Hosted
Anthony
20 Apr, 2024, 04:27

Hey all. I'm having trouble hosting my appwrite function domain. First, I already registered a domain say, example.com, and I have configured wildcard ssl certificate and wildcard domain to host my appwrite on this example.domain (appwrite.example.com), and I also configured nginx to proxy_pass appwrite.example.com to localhost. I also changed _APP_DOMAIN_FUNCTIONS in .env to appwrite.example.com. Everything works fine until I deploy a function and a random function ID is assigned to the appwrie.example.com domain. It seems that I have to configure wildcard * to appwrite.example.com. And, the domain section in the function section doesnt have a CNAME.

TL;DR
Developers need to configure a separate domain for hosting Appwrite functions. To do this, they should set up a CNAME record to point *.functions.example.com to appwrite.example.com. Then, configure Nginx to forward traffic accordingly. It's crucial to ensure the function domain differs from the main domain. To resolve issues with random function IDs being assigned to the domain, developers must set up a wildcard domain that passes traffic to Appwrite on localhost.
Anthony
20 Apr, 2024, 04:29
Anthony
20 Apr, 2024, 04:39

and how to setup wildcard domain for deployed functions in nginx so it can pass to appwrite on localhost ?

Steven
20 Apr, 2024, 04:50

The function domain should be different than your main domain

Steven
20 Apr, 2024, 04:51

Like functions.example.com. then, you'll need to make sure *.functions.example.com points to appwrite.example.com using a cname record.

Then, configure nginx to forward the traffic

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