[Kratos] Multi-tenancy options/support

I’m currently looking for an Identity Management solution for a multi-tenant application I’m building. I first tried using things like Firebase and Auth0, but then figured that I’d rather have full control over my user information.

I found Kratos, tried it with the quickstart and loved it immediately. The only thing I was unable to find an answer to is if there is currently a way to support multi-tenancy and if so, how? I can’t find any docs about it.

Would I have to run a Kratos instance per tenant or can I use a single instance for all tenants? Ideally I’d have a siloed model where each tenant has their users separated from the other tenants, which leads me to believe that I’d need multiple instances.

Please share with me your advice.

Thanks in advance!

Thank you!

Yes, but it’s different from e.g. Keycloak where you have one database for multiple tenants. Instead, you create one database schema per tenant and modify the config (if neccessary). Because Kratos is so lightweight (< 10MB < 0.0001% CPU when idle) there is almost no overhead in deployment. So yes, this assumption is correct:

That’s how we’re be solving it for our cloud service as well!

Thanks for the swift reaction and clear explanation! This is of much help to me.

1 Like

We should probably include a page on the docs for this. I’m tracking this over here:

Help appreciated :slight_smile: