Odoo with TimescaleDB

  Oct 29, 2025      2m      0   
 

Run Odoo 19 on TimescaleDB for real-time analytics: one-line install, Docker Compose setup, PostgreSQL extensions, and performance tips.

Odoo with TimescaleDB

Please install Docker and Docker-Compose before walking through this tutorial.

Odoo-TimescaleDB

Github: https://github.com/minhng92/odoo-timescaledb/

Star my repository if it helps. Thank you.

Installing Odoo with TimescaleDB

git clone git@github.com:minhng92/odoo-timescaledb.git
cd odoo-timescaledb
docker-compose up -d
  • Open localhost:10019 to access Odoo 19
  • Database master password: minhng.info (configure in etc/odoo.conf)
  • If you get permission errors, ensure the container can access local directories:
sudo chmod -R 777 addons
sudo chmod -R 777 etc
sudo chmod -R 777 _data

Quick command to setup Odoo-TimescaleDB

# Default setup in target directory "odoo-ts"
# Require available ports: 10019, 20019
curl -s https://raw.githubusercontent.com/minhng92/odoo-timescaledb/master/run.sh | bash -s odoo-ts 10019 20019

Some arguments:

  • odoo-ts: target folder on local machine
  • 10019: Odoo port
  • 20019: live chat port

Architecture Overview

This setup integrates Odoo 19 with TimescaleDB (PostgreSQL 17.6 with TimescaleDB 2.22.1) to power real-time analytics and time-series workloads.

  • Odoo 19: Full-featured business apps
  • TimescaleDB: PostgreSQL-based time-series database optimized for analytics

Why TimescaleDB for Odoo

  • Time-series optimization for logs, IoT, events, KPIs
  • Real-time analytics and faster reporting on large datasets
  • Hybrid transactional + analytical workloads on a single database
  • Automatic partitioning and efficient data retention

Database configuration & extensions

  • Database: TimescaleDB (PostgreSQL 17.6 + TimescaleDB 2.22.1)
  • Username: odoo
  • Password: odoo19@2025
  • Host: timescaledb
  • Data volume: ./_data/postgresql:/home/postgres/pgdata/data

Add PostgreSQL extensions

Enable extra Postgres extensions via DB_EXTENSIONS in docker-compose.yml:

environment:
  - DB_EXTENSIONS=vectorscale,pg_trgm,hstore

Notes:

  • Extensions are created automatically when the Odoo container starts
  • If an extension fails to install, it is skipped without stopping the container
  • Leave DB_EXTENSIONS empty or unset if you don't need extra extensions

References


Odoo posts:

Extra:


Khám phá Odoo