Back

[SOLVED] Using appwrite for different project

  • 0
  • General
Nevus
5 Apr, 2023, 09:36

If I have appwrite setup at appwrite.domain.com, could I have multiple domain names - one for each project like appwrite.project1.domain.com and appwrite.project2.domain.com? Multiple domain so cookies aren't treated as third party cookies. Trying to use CNAME record for appwrite.project1.domain.com gives me Invalid Origin. Register your new client (appwrite.project1.domain.com) as a new Web platform on your project console dashboard"

TL;DR
Solution: To add an organization domain in Appwrite, you need to open the `.env` file and update the values of `_APP_DOMAIN` and `_APP_DOMAIN_TARGET`. Save the changes and restart Appwrite using the command `docker compose down && docker compose up -d`. If you don't have an organization domain, you can use one of your projects instead. However, keep in mind that if the first domain goes down, all other projects will stop working due to the domain configuration. In that case, you would need to configure another project's domain as the organization domain. To have multiple domain names for each project, you
Meldiron
5 Apr, 2023, 09:37

Hey there 👋 This is possible. You should set .env file to have your organization domain, and then for your projects, add domains as custom domains. You add custom domains in Appwrite Console, in project settings.

Nevus
5 Apr, 2023, 09:38

So that would be domain.com for above case?

Meldiron
5 Apr, 2023, 09:40

If you dont have organization domain, you can use one of the project instead of oranization, and only add custom domains to the rest of the projects.

If you do that, keep in mind, if this first domain goes down (project is discontinued), all the other projects will stop working because of domain configuration. You would need to configure domain of some other project as organization domain in that case

Nevus
5 Apr, 2023, 09:53

How do I add organization domain?

Meldiron
5 Apr, 2023, 09:54

Oh, my bad, I meant organization like in real world, not as concept in Appwrite. To add the main domain (the one that cant stop working or everything else fails), you open .env and update values of _APP_DOMAIN and _APP_DOMAIN_TARGET. After saving changes, restart Appwrite with docker compose down && docker compose up -d

Tessa
7 Apr, 2023, 21:13

@Nevus did you get this resolved? Checking to see if we close this 🙂

Nevus
8 Apr, 2023, 02:04

Yes it's resolved. Thank you.

Drake
8 Apr, 2023, 02:31

[SOLVED] Using appwrite for different project

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