Skip to content
Back

Setup custom domain on selfhosted behind cloudflared

  • 0
  • Self Hosted
Flyto
13 Jun, 2026, 13:37

Hello everyone, can anyone help me to setup a custom domain on a selfhosted appwrite instance thats running behind cloudflare tunnels? Current setup: Appwrite running on backend.domain1.com, for another project I would like to add custom domain backend.domain2.com.

-) I have tried adding a CNAME to domain2 with forward to domain1 but then the cert generation fails. -) I have tried adding a cloudflare tunnel to point at the port of the appwrite instance but I cannot log in. -) I have tried setting up /.well-known/acme-challenge/* as a tunnel rule while keeping a simple cname to forward to but it also doesnt work.

Am I missing something or how can I make this work? I would like to use appwrite for both domains in parallel. so be accessible via backend.domain1.com and backend.domain2.com.

TL;DR
User wants to set up custom domain backend.domain2.com on their selfhosted Appwrite instance behind Cloudflare tunnels. They've tried adding a CNAME and Cloudflare tunnel, but encountered issues with certificate generation and logging in. They also attempted setting up /.well-known/acme-challenge/* as a tunnel rule with a simple CNAME forward, but it didn't work. They are looking for a solution to make Appwrite accessible via both backend.domain1.com and backend.domain2.com.
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