Skip to main content

CLI tool for managing and optimizing Odoo configurations (`odoo.conf`)

Project description

OdooConf Tool

Python License

CLI tool for managing and optimizing Odoo configurations (odoo.conf).

📦 Installation

Option 1: Install with pip

pip install odooconf

Option 2: Install with pipx (recommended for isolation)

pipx install odooconf

🔧 Key Features

  • 🛠 Generation of optimized base configurations
  • 🔍 Automatic detection of addons paths
  • 👁 Real-time monitoring with watchdog
  • ⚡ Automatic optimization of server parameters
  • 🔒 Secure credential management

🚀 Basic Usage

Generate initial configuration

odooconf new /path/to/destination
  • users: Number of concurrent users the server is expected to have (default: 2)

Find addons and update paths

odooconf paths /path/to/addons --odoo-conf /path/to/odoo.conf --internal-path /mnt/odoo/addons
  • /path/to/addons: Path on the filesystem where addons will be searched (host).

  • --odoo-conf: Path to the file or folder containing the odoo.conf to be updated.

  • --internal-path: (Optional) Internal path to be used instead of the host path when writing to odoo.conf. Ideal for containerized environments (e.g., Docker).

Optimize server for 50 users

odooconf server /path/to/odoo.conf --users 50 --auto-ram

🔧 Advanced Server Configuration (server)

The server command automatically optimizes performance parameters in odoo.conf:

🖥️ Hardware Parameters

--users N       # Calculates workers: (users/6) + 1 (required for automatic calculation)
--ram X         # RAM total in GB (e.g., --ram 8 for 8GB)
--auto-ram      # Automatically detects RAM (overrides --ram if present)

⏱️ Time Limits

--time-cpu N    # CPU limit per request (default: 60s)
--time-real N   # Maximum real time per request (default: 120s)

🔐 Database Configuration

--db-host HOST  # PostgreSQL host (default: db)
--db-port PORT  # Port (default: 5432)
--db-user USER  # User (default: odoo)
--db-pass PASS  # Password (default: odoo)
--hide-db       # Hide the list of databases (web/database/selector)

🔄 Automatic Values

With --auto-ram or --ram, the following are calculated:

  • limit_memory_soft: 75% RAM/worker
  • limit_memory_hard: 95% RAM/worker
  • workers: Based on --users (default: 2)

🔒 Security

The admin password can be generated with:

--admin-passwd PASS  # Generates PBKDF2 hash (does not store plain text)

💻 Complete Example

odooconf server /etc/odoo.conf \
  --users 100 \
  --auto-ram \
  --time-cpu 90 \
  --time-real 180 \
  --admin-passwd "S3cr3tP@ss" \
  --db-host db-prod \
  --db-port 5433

Alias

The utility can be used as an alias for the command oc or odooconf.

📄 License

This project is licensed under the GNU GPLv3.

🌍 Repository

git+https://github.com/Alitux/odooconf

🤝 Contributions

Contributions are accepted via merge requests in the Github repository.

💡 Support

Report issues at: https://github.com/Alitux/odooconf/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odooconf-0.1.7.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odooconf-0.1.7-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file odooconf-0.1.7.tar.gz.

File metadata

  • Download URL: odooconf-0.1.7.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.14.3 Linux/6.19.11-arch1-1

File hashes

Hashes for odooconf-0.1.7.tar.gz
Algorithm Hash digest
SHA256 5053d46ac434b886079f8eca2bb345760e6fdab59077cfc7af4800442ab72454
MD5 bebfb4c778fdb3404bb9efdd6e1bfc58
BLAKE2b-256 92532ee22b72d42029410f71b67e6eebb33f704bfab741495b8cec6dcf929331

See more details on using hashes here.

File details

Details for the file odooconf-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: odooconf-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.14.3 Linux/6.19.11-arch1-1

File hashes

Hashes for odooconf-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b785d254b93d187c43fd66efe0a63243419926ed5928298ab02b6d361cf40e3c
MD5 801db72987a204f94e725a1ef5a5d4a6
BLAKE2b-256 e952d29ccea8d7ebae512ad9134c8165112be284bb35f81ef5df594f87c8885e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page