Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Extra Tools
  3. Redis Session Store - Odoo Redis Sessions for Load Balancer and Multiple Servers v 19.0
  4. Sales Conditions FAQ

Redis Session Store - Odoo Redis Sessions for Load Balancer and Multiple Servers

by Modvanta https://modvantaapps.tech/odoo-apps/redis-session-store/
Odoo

$ 11.97

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
You bought this module and need support? Click here!
  • Description
  • Manifest
  • License
Redis Session Store for Odoo 19 - Shared Sessions for Multiple Servers

Redis Session Store for Odoo 19 - Shared Sessions for Multiple Servers

Odoo keeps every login session in files on the local disk, so two Odoo servers behind a load balancer log users out each other. This module moves the sessions to Redis: every Odoo process reads the same sessions, they expire by themselves, and if Redis goes down Odoo keeps working on the filesystem.

Server wide moduleodoo.conf or environmentPassword and TLSKey prefixExpiry by TTLFilesystem fallbackDisk to Redis migrationDevice logoutStatus screen
Buy Now - $12Ask a Question
Written and supported by Modvanta - modvantaapps@gmail.com
37
automated tests
2
lines in odoo.conf to switch on
0
code changes in Odoo
30 s
default retry after an outage
What you need
A Redis server (tested with Redis 5.0) and the Python package redis (pip install redis) in the Odoo environment. For several Odoo servers you also need a shared filestore (NFS, shared volume) - that part is not about sessions and stays your set-up.

What it does

The module replaces Odoo's session store with a Redis one. It is loaded as a server wide module, so it is active before any database is opened - the login page, the database selector and every request use Redis.

Sessions are stored as JSON under a key prefix you choose, with a time to live that is refreshed on every request, so idle sessions disappear by themselves. Odoo's own session rotation, logout, device revocation (log out of other devices) and the session garbage collector keep working.

If Redis cannot be reached, the module logs one warning, writes sessions to the filesystem and retries Redis after 30 seconds. When Redis is back, sessions written during the outage are moved to Redis the next time they are used. A button moves all existing disk sessions in one go, keeping their remaining lifetime.

Who it is for

Several Odoo servers or containers
Run Odoo behind a load balancer without sticky sessions and without users being logged out.
Kubernetes and Docker set-ups
Pods come and go; sessions live in Redis instead of the pod's disk.
Busy single servers
Stop millions of small session files from piling up in the data directory.

Key Features

Screenshots from an Odoo 19 test server started with the module in server_wide_modules and a local Redis 5.0.

1Status at a glance
Active backend, Redis version, memory, number of sessions, key prefix, expiry, Odoo's inactivity limit, and where each setting comes from (odoo.conf, environment or default).
Sessions stored in Redis
Sessions stored in Redis
2Keeps working when Redis is down
Redis was stopped on purpose: Odoo switched to the filesystem, logged a warning and counted the fallback events. Users could still log in.
Automatic filesystem fallback
Automatic filesystem fallback
3Move disk sessions to Redis
One click copies every session file to Redis with its remaining lifetime and deletes the file - nobody is logged out when you switch.
Disk sessions moved to Redis
Disk sessions moved to Redis
4Test the connection
Checks the configured server, password and TLS settings and reports the Redis version and response time.
Connection test
Connection test
5Session garbage collection
Redis expires sessions by TTL. When Odoo's inactivity limit is shorter than the expiry, idle sessions are removed by Odoo's own daily clean-up or on demand.
Garbage collection on demand
Garbage collection on demand

Everything included

Sessions in Redis for every Odoo processSession rotation and logout as in standard Odoo
Loaded with server_wide_modules or --loadLog out other devices (device revocation)
Settings in odoo.conf or environment variablesSession GC with Odoo's inactivity limit
Host, port, database number, username, passwordFilesystem fallback with retry interval
redis:// and rediss:// URLsOutage sessions moved back to Redis automatically
TLS with CA, client certificate and keyBulk move of existing disk sessions
Key prefix to share one Redis between instancesStatus screen for administrators
Expiry (TTL) refreshed on every requestOld configuration names of other modules accepted

How it works

1
Install the package
pip install redis in the Odoo environment and install the module in a database.
2
Configure
redis_session_enabled = True plus host, port, password, prefix and expiry in odoo.conf (or ODOO_REDIS_SESSION_* variables).
3
Load it server wide
server_wide_modules = base,web,mdv_redis_session_store and restart Odoo.
4
Check
Settings -> Redis Sessions shows the backend, the session count and the configuration.

Settings

redis_session_enabledTrue to use Redis (env ODOO_REDIS_SESSION=1).
redis_session_host / _port / _dbRedis server, default localhost, 6379, database 0.
redis_session_urlFull redis:// or rediss:// URL instead of host and port.
redis_session_username / _passwordRedis ACL user and password.
redis_session_ssl, _ssl_ca_certs, _ssl_certfile, _ssl_keyfile, _ssl_cert_reqsTLS connection settings.
redis_session_prefixKey prefix, default odoo:session: - use one per Odoo instance.
redis_session_expirySession lifetime in seconds, default 7 days, refreshed on each request.
redis_session_timeout / _retry_intervalSocket timeout (2 s) and pause before retrying after a failure (30 s).

FAQ

Does it cache the ORM or speed up pages?
No. It only stores HTTP sessions. The benefit is shared sessions across servers and no session files on disk.
What happens if Redis restarts and loses its data?
Users have to log in again, exactly as when session files are deleted. Enable Redis persistence if you want sessions to survive a Redis restart.
Is the module active if I only install it in a database?
It becomes active when Odoo loads it, but add it to server_wide_modules so it is active from the first request, before a database is chosen.
Can several Odoo instances share one Redis?
Yes, give each one its own key prefix or Redis database number.
Do I need Redis 6 or newer?
No, it was tested on Redis 5.0. TLS needs a Redis server built with TLS (6.0 or newer).

Compatibility

Odoo 19 CommunityOn-premise

Depends on base and web. Python package: redis. Not for Odoo Online or Odoo.sh, where you cannot change the server configuration.

Put your Odoo sessions in Redis
Shared sessions for every server, with a safe fallback.
Buy Now - $12Hire Me for Odoo Work
EMAIL
modvantaapps@gmail.com
AUTHOR
Modvanta
INCLUDED
Module, updates for Odoo 19, email support

Support: modvantaapps@gmail.com - questions before buying are welcome.

Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 627
Technical Name mdv_redis_session_store
LicenseOPL-1
Websitehttps://modvantaapps.tech/odoo-apps/redis-session-store/
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with