Store sessions in a database instead of the filesystem. This simplifies the configuration of horizontally scalable deployments, by avoiding the need for a distributed filesystem to store the Odoo sessions.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Stores Odoo web user sessions in a PostgreSQL database instead of on the server's filesystem, so several Odoo servers can share the same logins without a shared disk.
This module changes where Odoo keeps the information about who is logged in. Normally each Odoo server writes session files to its own disk; with this module, sessions are saved in a database table instead.
- It only activates when the environment variable
SESSION_DB_URIis set to a database connection address. If that variable is missing, Odoo keeps using its normal file-based sessions. - When active, it creates a table called
http_sessionsautomatically, holding the session identifier, a last-write date and the session content. - Logging in, updating a session and logging out write to or delete from that table.
- Old sessions are cleaned up: a routine removes entries older than the standard session lifetime, and helpers can check which session identifiers are missing and delete sessions by identifier prefix.
- It retries a database operation a few times if the connection drops, and uses a lock to keep concurrent access safe.
There are no menus, screens, buttons or reports: it is purely a background configuration change. It does not add any business models and does not touch sales, accounting or inventory data. The visible effect for users is that logins keep working when traffic is spread over several Odoo servers, and administrators no longer need a shared filesystem for session files.
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 7 confirmed, 2 with no information of 9 versions.
Sources · Odoo 16.0
Confirmed on 2026-11-03 in branch 16.0 of OCA/server-tools.
terminal Installation and usage
OCA documentation · Odoo 19.0Usage
Source · Odoo 19.0Set this module in the server wide modules.
Set a SESSION_DB_URI environment variable as a full postgresql connection string, like postgres://user:passwd@server/db or db.
It is recommended to use a dedicated database for this module, and possibly a dedicated postgres user for additional security.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.