Back

proper way for setting up domains and subdomains

  • 0
  • Self Hosted
anonvt
9 Aug, 2024, 12:17

Hi,

So , I want the following:

For the Appwrite admin panel, I want to use: admin.example.com

For my backend APIs, I want to use: api.example.com

For my frontend (web app), I want to use example.com

I am using a self hosted version. However, it is not very clear to me how to set this exact setup.

When I create Appwrite instance using docker, should I give my hostname as admin.example.com ?

And then, how do I setup domains for backend and frontend? Will this setup cause any problems?

TL;DR
Developers are confused about setting up domains and subdomains for Appwrite. The correct setup involves pointing A records to the server IP for different subdomains like admin.example.com and api.example.com. Using self-hosted version, set hostname as admin.example.com for Appwrite. No reported problems with this setup.
darShan
9 Aug, 2024, 12:24

your setup should work fine.

  1. hostname as admin.example.com > appwrite console
  2. other subdomains > you should correctly manage this via pointing A records to your Server IP.
anonvt
9 Aug, 2024, 12:32

This is where I am confused. How should I set up My DNS

Should I do this?

A record for admin.example.com should point to my public IP of the instance.

But then, how should I setup the A record or Cname record or whatever to ensure that the backend requests go to api.example.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