# Active Record Tenanted

> Enable a Rails application to have separate databases for each tenant

Source: https://talira.ai/catalog/active-record-tenanted-r986dcw9
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / databases / multi tenancy](https://talira.ai/categories/libraries/databases/multi-tenancy), [languages / ruby / rails](https://talira.ai/categories/languages/ruby/rails)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- Backed by: [37signals](https://talira.ai/orgs/37signals.md)
- Funding: bootstrapped[^3][^4][^5]

Active Record Tenanted lets a [Rails](https://talira.ai/catalog/ruby-on-rails-xkdcpj5k.md) app give each tenant (usually a customer account) its own database, with every request, job and broadcast run inside an explicit tenant context, so code can't accidentally read or send one tenant's data to another. Rails routes connections to the current tenant's database and creates and migrates them as needed. Only [SQLite](https://talira.ai/catalog/sqlite-cys3nt23.md) is fully supported so far. 37signals wrote it to give every Fizzy customer a separate SQLite database.

## Links

- GitHub: https://github.com/basecamp/activerecord-tenanted

## Problems it solves

- give every customer account its own SQLite database in our Rails app
- make it hard for a developer to leak one customer's data to another by mistake
- keep each tenant's data physically separate instead of filtering a shared table by account id
- turn an existing single-database Rails app into one with a database per tenant

## Features

- separate database per tenant
- tenant context for requests, jobs and Action Cable
- safeguards against cross-tenant access
- creates and migrates tenant databases

## Limitations

- Only SQLite is fully supported: not PostgreSQL or MySQL yet[^1]

## Trust

Overall: 0.37 out of 1.
Signals: backing 0.55, extensibility 0.00.

- backed by 37signals
- funding: bootstrapped

Warnings:

- GitHub activity not fetched yet

## Sources

[^1]: https://github.com/basecamp/activerecord-tenanted (checked 21 Nov 2026)
[^2]: https://github.com/basecamp/activerecord-tenanted/blob/main/MIT-LICENSE (checked 21 Nov 2026)
[^3]: https://37signals.com/01 (checked 21 Nov 2026)
[^4]: https://37signals.com/jobs (checked 21 Nov 2026)
[^5]: https://basecamp.com/pricing (checked 21 Nov 2026)
