Parameters Inside Odoo Configuration File (odoo.conf)

When setting up or managing an Odoo instance, one of the most critical files you’ll work with is the Odoo configuration file (odoo.conf).

This file controls how your Odoo server behaves—covering everything from database connections and logging to performance tuning and security.

Whether you're a developer, system administrator, or Odoo consultant, understanding these parameters is essential for maintaining a stable, secure, and optimized environment.

What is the Odoo Configuration File?

The odoo.conf file is a plain text configuration file used to define how the Odoo server starts and operates.

It is typically located in:

  • /etc/odoo.conf (Linux installations)
  • Custom path (Docker / manual setups)

You run Odoo using this file:

odoo -c /etc/odoo.conf

Basic Structure of odoo.conf

[options]

db_host = localhost

db_port = 5432

db_user = odoo

db_password = secret

addons_path = /opt/odoo/addons,/opt/custom/addons

logfile = /var/log/odoo/odoo.log

1. Database Configuration

These parameters define how Odoo connects to PostgreSQL:

  • db_host → PostgreSQL server hostname or IP
  • db_port → Default: 5432
  • db_user → Database username
  • db_password → Database password
  • db_name → Optional default database to auto-load

💡 Tip: Use False for db_host if PostgreSQL runs locally via Unix socket (faster).

2. Server & Network Configuration

Controls how Odoo is exposed over the network:

  • xmlrpc_port → Default port (8069)
  • xmlrpc_interface → Bind IP (0.0.0.0 for all interfaces)
  • netrpc_port → Deprecated (not used in newer versions)

Example:

xmlrpc_port = 8069

xmlrpc_interface = 0.0.0.0

3. Addons Path

Defines where Odoo looks for modules:

  • addons_path → Comma-separated directories

addons_path = /opt/odoo/addons,/opt/custom/addons

💡 This is where your custom modules live—critical for development.

4. Logging Configuration

Helps monitor and debug your system:

  • logfile → Log file location
  • log_level → Logging verbosity

Common levels:

  • info (default)
  • debug
  • warn
  • error
  • critical

💡 Best Practice:

  • Use debug only in development
  • Use info or warn in production

5. Admin Password (Database Management)

  • admin_passwd → Master password for database operations

Used for:

  • Creating databases
  • Restoring backups
  • Dropping databases

⚠️ Keep this secure—this is super-admin access.

6. File Storage & Data Directory

  • data_dir → Stores:
    • Filestore (attachments)
    • Sessions
    • Cache data

Example:

data_dir = /var/lib/odoo

💡 Ensure proper backups—this contains critical business data.

7. Performance Parameters

These settings directly affect scalability and speed:

  • workers → Number of worker processes
  • limit_memory_soft / hard → Memory limits
  • limit_time_cpu / real → Request time limits

Example:

workers = 4

limit_memory_soft = 2684354560

limit_memory_hard = 3221225472

💡 Rule of thumb:

  • 1 worker ≈ 6 users
  • Always reserve RAM for PostgreSQL

8. Email & SMTP Settings

Used for sending:

  • Notifications
  • Invoices
  • Automated emails

Typical setup:

smtp_server = smtp.gmail.com

smtp_port = 587

smtp_user = your@email.com

smtp_password = yourpassword

💡 Alternatively, configure this from the Odoo UI (recommended).

9. Proxy Mode

  • proxy_mode = True

Enable this when using:

  • Nginx
  • Apache
  • Load balancers

💡 Required for:

  • Correct IP detection
  • HTTPS handling

10. Security & Misc Parameters

Additional useful options:

  • list_db = False → Hide database list page
  • dbfilter → Restrict visible databases
  • limit_request → Max requests per worker

Example:

list_db = False

dbfilter = ^mydb$

Best Practices for Production

✔ Use separate PostgreSQL server for large deployments

✔ Always enable proxy_mode with Nginx

✔ Secure admin_passwd

✔ Set proper workers based on CPU cores

✔ Monitor logs regularly

✔ Backup both:

  • Database
  • Filestore (data_dir)

The Odoo configuration file (odoo.conf) is the backbone of your Odoo deployment.

From database connectivity to performance tuning and security, every parameter plays a crucial role in how your system behaves.

By properly understanding and configuring these settings, you can ensure:

  • ✅ Better performance
  • ✅ Improved security
  • ✅ Higher scalability
  • ✅ Stable production environments
Share this post
Tags
Archive
Odoo 19 Performance Optimization: SQL, Caching, and Server Tuning