SaaS Mode: Several Databases in One Project
SaaS mode lets a single project serve several independent Odoo databases from its production deployment. Each database is a separate Odoo instance, with its own users, data, address, and backups, while they all share the same code, Odoo version, and server resources.
It is built for partners and software vendors who run the same Odoo solution for several customers, or companies that need separate databases for separate entities, without creating and maintaining one project per database.
:::info Activation SaaS mode is an add-on to your subscription, activated by our team. Contact sales to enable it on a project. :::
How it works
- One code base, many databases. Every database runs the code of your production branch. A push to production updates all of them.
- One address per database. Odoo picks the database from the hostname: the database
acmeis served atacme.skysize.io, and on any custom domain whose first part isacme, such asacme.yourcompany.com. - Production only. Only the production branch serves several databases. Staging and development branches keep working as usual, with a single database.
- No limit on the number of databases. Plan the server resources (workers and memory) for the total load of all databases together.
When SaaS mode is activated on an existing project, the production deployment restarts once, and its current database becomes the primary database, named after the project.
The Databases tab
Projects in SaaS mode have a Databases tab listing every database of the production deployment with its address, size, and creation date. The primary database is marked primary and uses the project's own domains.
Create a database
- Open the Databases tab and click Create database.
- Enter a name: lowercase letters, digits, and hyphens. The name must be unique across the platform, because it becomes the database's address (
<name>.skysize.io). - Choose the language of the new database.
- Confirm. The database appears as creating and becomes ready in a few minutes.
A new database starts empty, with only the base module installed. Install the apps you need from inside Odoo, exactly like on a fresh instance.
Open a database
Use Login on the production deployment and pick the database, then the user to sign in as. Each access is recorded in the project's audit log with the database it targeted.
Add a custom domain
Click Set custom domain on the database's row. The first part of the domain must be the database name: for the database acme, acme.yourcompany.com works and erp.yourcompany.com does not (a leading www. is ignored). The custom domain replaces the database's automatic skysize.io address.
For the primary database, custom domains are added on the production branch as usual, and their first part must be the project name.
See Domains for the DNS record and the Cloudflare proxy requirements.
Delete a database
Click Delete on the database's row and type its name to confirm. Tick Take a final backup before deleting to keep a copy. Deleting a database removes its data and files permanently; existing backups are kept under the normal retention policy.
Updates
Pushing to the production branch updates every database of the deployment. The installed custom modules of each database are upgraded, and the update is all or nothing: if it fails on any database, all databases are rolled back together, so they never end up on different versions of your code.
The pre-update snapshot covers every database. If you turn it off, keep in mind that a failed update can then leave several databases in a partially upgraded state.
Backups and imports
- Scheduled backups cover every database of the deployment, each backed up separately.
- Manual backups and dumps let you choose one database or all of them.
- Restoring a backup on the production branch lets you pick the target database: choosing an existing database replaces its data, and typing a new name creates a new database from the backup.
- Importing a database from an Odoo backup file (
.zip) works the same way, from the Databases or Backups tab: import into a new name to add a database, or into an existing one to replace it.
See Backups and Import an Existing Odoo Backup.
Good to know
- Renaming the project only changes its display name. Database names and addresses do not change.
- Database names are also hostnames, so reserved names and names already used on the platform are refused.
- On Bring Your Own Server with your own domain, each database is served as
<database>.<your domain>.