Odoo.conf File Explained: Every Attribute You Need to Know
When you install Odoo, one of the most important files you'll work with is odoo.conf — the central configuration file that controls how your Odoo server behaves. From database connections to logging, from performance tuning to email settings, almost everything passes through this file.
In this guide, we'll break down every important attribute in odoo.conf so you know exactly what each one does and when to use it.
Where Is the odoo.conf File?
Depending on your installation method, the config file can be found at:
# Common locations
/etc/odoo.conf
/etc/odoo18.conf
/opt/odoo/odoo.conf
# Or specify it manually when starting Odoo
./odoo-bin -c /path/to/odoo.conf
You can also generate a sample config file using:
./odoo-bin --save --config odoo.conf
Full Example: odoo.conf
Here's a complete, production-ready odoo.conf to reference throughout this guide:
[options]
; ── Database ──────────────────────────────────────────────────────
db_host = localhost
db_port = 5432
db_user = odoo
db_password = strongpassword
db_name = False
db_filter = .*
db_maxconn = 64
db_sslmode = prefer
; ── Paths ─────────────────────────────────────────────────────────
addons_path = /opt/odoo/odoo18/addons,/opt/odoo/custom_addons
data_dir = /opt/odoo/.local/share/Odoo
; ── Server ────────────────────────────────────────────────────────
http_enable = True
http_interface =
http_port = 8069
longpolling_port = 8072
proxy_mode = False
; ── Security ──────────────────────────────────────────────────────
admin_passwd = CHANGE_THIS_IN_PRODUCTION
list_db = True
; ── Performance ───────────────────────────────────────────────────
workers = 4
max_cron_threads = 2
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
limit_time_real_cron = -1
; ── Logging ───────────────────────────────────────────────────────
logfile = /var/log/odoo18.log
log_level = info
log_handler = :INFO
log_db = False
log_db_level = warning
; ── Email ─────────────────────────────────────────────────────────
email_from = [email protected]
smtp_server = smtp.yourdomain.com
smtp_port = 587
smtp_ssl = False
smtp_user = [email protected]
smtp_password = emailpassword
; ── Misc ──────────────────────────────────────────────────────────
without_demo = True
pidfile = /var/run/odoo18.pid
translate_modules = ['all']
Section 1: Database Attributes
These control how Odoo connects to your PostgreSQL database.
db_host
db_host = localhost
The hostname or IP address of your PostgreSQL server. Use localhost for a local database or a remote IP for a separate DB server. Set to False to use a Unix socket (default for most Linux installs).
db_port
db_port = 5432
The port PostgreSQL is listening on. The default PostgreSQL port is 5432. Change this if your database runs on a custom port.
db_user
db_user = odoo
The PostgreSQL user Odoo will use to connect to the database. This user must exist in PostgreSQL and have the right privileges. Created earlier with:
sudo -u postgres createuser -s odoo
db_password
db_password = strongpassword
The password for the db_user. Leave as False if using Unix socket authentication (peer auth), which is common on local Linux setups.
db_name
db_name = False
The default database to use when Odoo starts. Set to False to allow Odoo to show the database selector screen. Set to a specific database name to skip the selector entirely — useful in production with a single database.
db_filter
db_filter = .*
A regular expression to filter which databases are shown in the database selector. Examples:
db_filter = .* ; Show all databases (default)
db_filter = ^mycompany$ ; Show only "mycompany" database
db_filter = ^prod_.* ; Show only databases starting with "prod_"
This is a critical security setting in multi-tenant production environments.
db_maxconn
db_maxconn = 64
The maximum number of simultaneous database connections per Odoo process. Increase this for high-traffic servers. Keep it in sync with PostgreSQL's max_connections setting.
db_sslmode
db_sslmode = prefer
Controls SSL encryption for the database connection. Accepted values:
| Value | Meaning |
|---|---|
disable |
No SSL |
allow |
Use SSL if available |
prefer |
Prefer SSL (default) |
require |
Always use SSL |
verify-ca |
Verify server certificate |
verify-full |
Verify server certificate + hostname |
Section 2: Path Attributes
These tell Odoo where to find modules and where to store data.
addons_path
addons_path = /opt/odoo/odoo18/addons,/opt/odoo/custom_addons
A comma-separated list of directories where Odoo looks for modules. Order matters — Odoo scans directories left to right and uses the first match. Always include:
- The core Odoo addons path
- Your custom addons path
; Example with multiple paths
addons_path = /opt/odoo/odoo18/addons,
/opt/odoo/enterprise,
/opt/odoo/custom_addons
data_dir
data_dir = /opt/odoo/.local/share/Odoo
The directory where Odoo stores uploaded files, attachments, sessions, and other user data. Make sure this path is writable by the odoo user and has sufficient disk space in production.
Section 3: Server / HTTP Attributes
These control how the Odoo web server runs and listens for connections.
http_enable
http_enable = True
Set to True to enable the built-in HTTP server. Set to False if you're running Odoo in a mode where you don't need the web interface (e.g., batch processing only).
http_interface
http_interface =
The network interface Odoo binds to. Leave empty to bind to all interfaces (0.0.0.0). Set to 127.0.0.1 to only accept connections from localhost — recommended when Nginx handles public traffic.
; Accept connections from all interfaces (public)
http_interface =
; Only accept from localhost (behind Nginx)
http_interface = 127.0.0.1
http_port
http_port = 8069
The port the Odoo HTTP server listens on. The default is 8069. Access Odoo in your browser at http://your-server-ip:8069.
longpolling_port
longpolling_port = 8072
The port used for live chat and real-time notifications (bus polling). This must be accessible alongside the main port. In Nginx setups, both ports are proxied together.
proxy_mode
proxy_mode = False
Set to True when Odoo is running behind a reverse proxy like Nginx or Apache. This tells Odoo to trust the X-Forwarded-For and X-Forwarded-Proto headers sent by the proxy — important for correct IP detection and HTTPS handling.
; Enable when using Nginx
proxy_mode = True
Section 4: Security Attributes
admin_passwd
admin_passwd = CHANGE_THIS_IN_PRODUCTION
The master password for the Odoo database manager page (/web/database/manager). This protects operations like creating, duplicating, and deleting databases.
⚠️ Always change this in production. Use a long, random string. Never leave it as
admin.
list_db
list_db = True
Controls whether the database list is shown on the login page and database manager. Set to False in production single-database setups to hide the database selector and reduce exposure.
; Hide database list in production
list_db = False
Section 5: Performance Attributes
These are the most impactful settings for production performance tuning.
workers
workers = 4
The number of worker processes Odoo spawns to handle HTTP requests. Set to 0 to use the single-threaded development mode (default).
Recommended formula for production:
workers = (CPU cores × 2) + 1
For a 2-core server: workers = 5
max_cron_threads
max_cron_threads = 2
The number of worker threads dedicated to running scheduled actions (cron jobs). These run in the background independently of HTTP workers.
limit_memory_hard
limit_memory_hard = 2684354560 ; 2.5 GB
The hard memory limit per worker process in bytes. When a worker exceeds this, Odoo immediately kills it. This prevents a single runaway process from crashing your entire server.
Common values:
limit_memory_hard = 2684354560 ; 2.5 GB
limit_memory_hard = 3221225472 ; 3 GB
limit_memory_soft
limit_memory_soft = 2147483648 ; 2 GB
The soft memory limit per worker. When exceeded, Odoo gracefully restarts the worker after finishing its current request — less abrupt than the hard limit.
limit_request
limit_request = 8192
The maximum number of requests a worker handles before being recycled. This helps prevent memory leaks from accumulating over time in long-running workers.
limit_time_cpu
limit_time_cpu = 60
Maximum CPU time (in seconds) a worker can use per request. Requests that exceed this are killed. Helps prevent expensive queries from hogging the CPU.
limit_time_real
limit_time_real = 120
Maximum real/wall-clock time (in seconds) for a request, including I/O wait time. Broader than limit_time_cpu — this catches slow network calls and blocked I/O too.
limit_time_real_cron
limit_time_real_cron = -1
Real-time limit specifically for cron jobs. Set to -1 for no limit (default) — useful since some scheduled jobs like report generation can legitimately take a long time.
Section 6: Logging Attributes
logfile
logfile = /var/log/odoo18.log
The file path where Odoo writes its logs. If not set, logs go to stdout (the terminal). Make sure the odoo user has write permission to this path.
sudo touch /var/log/odoo18.log
sudo chown odoo:odoo /var/log/odoo18.log
log_level
log_level = info
Controls the verbosity of Odoo's logs. Available levels (from least to most verbose):
| Level | Use Case |
|---|---|
critical |
Only fatal errors |
error |
Errors only |
warning |
Warnings + errors |
info |
General info (recommended for production) |
debug |
Detailed debug output |
debug_rpc |
Logs every RPC call |
debug_sql |
Logs every SQL query |
debug_rpc_answer |
Logs RPC calls + responses |
log_handler
log_handler = :INFO
Fine-grained control over log levels per Python module. Format: module:LEVEL. Examples:
log_handler = :INFO ; Default INFO for everything
log_handler = werkzeug:WARNING,odoo:DEBUG ; DEBUG for Odoo, WARNING for Werkzeug
log_handler = odoo.addons.my_module:DEBUG ; DEBUG only for your custom module
log_db
log_db = False
Set to True to also write logs to the ir.logging table in the database. Useful if you want to view logs directly from the Odoo UI under Settings → Technical → Logging.
log_db_level
log_db_level = warning
The minimum log level to write to the database when log_db = True. Keep this at warning or higher to avoid flooding the database with info-level messages.
Section 7: Email (SMTP) Attributes
email_from
email_from = [email protected]
The default From address used when Odoo sends emails — for notifications, password resets, sale orders, etc.
smtp_server
smtp_server = smtp.yourdomain.com
The hostname of your outgoing mail server (SMTP). Can also use services like Gmail (smtp.gmail.com), SendGrid, or Mailgun.
smtp_port
smtp_port = 587
The SMTP port. Common values:
| Port | Use |
|---|---|
25 |
Plain SMTP (often blocked by ISPs) |
465 |
SMTP over SSL |
587 |
SMTP with STARTTLS (recommended) |
smtp_ssl
smtp_ssl = False
Set to True to use SSL/TLS encryption (port 465). For STARTTLS (port 587), leave as False — Odoo handles STARTTLS automatically.
smtp_user and smtp_password
smtp_user = [email protected]
smtp_password = emailpassword
Credentials for authenticating with your SMTP server. Leave empty if your mail server doesn't require authentication.
Section 8: Miscellaneous Attributes
without_demo
without_demo = True
Set to True to install modules without demo data. Always enable this in production — demo data adds fake customers, products, and orders you don't want in a live system.
pidfile
pidfile = /var/run/odoo18.pid
Path to a file where Odoo writes its process ID (PID). Used by init scripts and systemd to track and manage the Odoo process.
translate_modules
translate_modules = ['all']
Specifies which modules to export translations for when using --i18n-export. Set to ['all'] to include all installed modules.
Quick Reference: All Attributes at a Glance
| Attribute | Default | Description |
|---|---|---|
db_host |
False |
PostgreSQL host |
db_port |
5432 |
PostgreSQL port |
db_user |
odoo |
DB username |
db_password |
False |
DB password |
db_name |
False |
Default database |
db_filter |
.* |
DB name filter (regex) |
db_maxconn |
64 |
Max DB connections |
addons_path |
— | Module directories |
data_dir |
— | User data storage path |
http_port |
8069 |
HTTP server port |
longpolling_port |
8072 |
Live chat/bus port |
proxy_mode |
False |
Behind reverse proxy? |
admin_passwd |
admin |
Master password |
list_db |
True |
Show DB list on login |
workers |
0 |
Worker processes |
max_cron_threads |
2 |
Cron worker threads |
limit_memory_hard |
2.5 GB |
Hard memory limit |
limit_memory_soft |
2 GB |
Soft memory limit |
limit_time_cpu |
60 |
Max CPU time/request |
limit_time_real |
120 |
Max real time/request |
logfile |
stdout |
Log file path |
log_level |
info |
Log verbosity |
smtp_server |
— | Outgoing mail server |
smtp_port |
25 |
SMTP port |
without_demo |
False |
Skip demo data |
Development vs Production Config
Here's a quick comparison of recommended settings for each environment:
; ── DEVELOPMENT ───────────────────────────────────────────────────
[options]
db_host = localhost
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo18/addons,/home/user/custom_addons
http_port = 8069
workers = 0 ; Single-threaded, easier to debug
log_level = debug
without_demo = False ; Keep demo data for testing
list_db = True
; ── PRODUCTION ────────────────────────────────────────────────────
[options]
db_host = localhost
db_user = odoo
db_password = strongpassword
db_filter = ^myproductiondb$
addons_path = /opt/odoo/odoo18/addons,/opt/odoo/custom_addons
http_interface = 127.0.0.1
http_port = 8069
proxy_mode = True
workers = 5
max_cron_threads = 2
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_time_cpu = 60
limit_time_real = 120
log_level = info
logfile = /var/log/odoo18.log
admin_passwd = VERY_STRONG_RANDOM_STRING
list_db = False
without_demo = True