raykoshima
raykoshima•2mo ago

can zitadel selfhost do multiple domain?

I have main instance at accounts.domain1.site and I want to add accounts.domain2.com which is same zitadel instance but other organization not same as accounts.domain1.site how do I do it? I using nginx and npm (nginx proxy manager) with docker compose of zitadel
10 Replies
Rajat
Rajat•2mo ago
hey @raykoshima thanks for your question, you can setup and enforce org policies, so when making an auth request, add the org scope amd this will idrect the user to their specific org login
raykoshima
raykoshimaOP•2mo ago
thanks you for answer, I have another question when login is it require like raykoshima@domain2.com to use If you want to login to organization 2 or admin@domain1.site like this? If it require can I get rid of that or I need to create new instance? Oh I get it I'll try that one but what about other domain? do I just put on nginx and point at same IP host?
Rajat
Rajat•2mo ago
you need to add the domin to zitadel and proper header forwarding https://zitadel.com/docs/self-hosting/manage/custom-domain we do have a guide covering setting up zitadel with nginx https://zitadel.com/docs/self-hosting/manage/reverseproxy/nginx lmk if reading these helps 🙂 I didnt get this question
when login is it require like raykoshima@domain2.com to use If you want to login to organization 2 or admin@domain1.site like this?
raykoshima
raykoshimaOP•2mo ago
it for loginname but than I read a org scope that mean I can just put a organization id for domain1 If I want to use domain1 and organization id for domain2 If I want to use domain2 is that right?
Rajat
Rajat•2mo ago
yes urn:zitadel:iam:org:id:{orgId}
raykoshima
raykoshimaOP•2mo ago
Rajat
Rajat•2mo ago
hey @raykoshima you can mark my answer with ✅ and it will auto close this thread 🙂
Gigi the Giraffe (Zitadel)
🎉 Looks like you just helped out another community member! Thanks for being so helpful <@1346540274674827395>! You're now one step closer to leveling up—keep up the amazing peer support! 🚀
raykoshima
raykoshimaOP•2mo ago
hey @Rajat I have other question to use scope this is my code with params
scope: "openid profile email",
scope: "openid profile email",
for the organization id it will be
scope: "openid profile email urn:zitadel:iam:org:id:{orgId}",
scope: "openid profile email urn:zitadel:iam:org:id:{orgId}",
is that right?
Rajat
Rajat•2mo ago
yes but make sure to add your orgId instead of {orgId} 😄

Did you find this page helpful?