Hi. I'd like to offer theme selection to multiple tenants. So the core database will be my Payload Cloud server and I'll have access to the admin panel via mywebsite.com/admin . If the tenants have their own business domains eg. JohnDoe.com and point their DNS to Payload Cloud server, how do I setup their admin panel? I'd like them to register as a tenant which will create their own sub-directory and then they can choose their content - theme, styling.
What logic do you suggest?
Multi-tenant setup without custom-URLS
In my mind, you would configure each user to have a relationship to a business domain, then use access control that references this.
What rendering approach do I take if I want to use Nextjs and the multi-tenancy website I've described?
I would suggest serving your Next.js websites independently of your multi-tenant Payload instance. They can all ship the same codebase but would make different slightly queries based on the tenant defined in an environment variable.
We now have an official multi-tenant example! Check it out:
https://github.com/payloadcms/payload/tree/master/examples/multi-tenantSpecifically, the "Front-end" section which talks about how to specify the
tenant
query parameter in your requests.
@techinverted please do not post the same question in multiple places, thanks.
Sorry @jarrod_not_jared
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.