# /etc/odoo/odoo.conf # Odoo Production Configuration Template # Version: 2.1 | Last Updated: September 2025 # Created by: Aria Shaw # # Instructions: # 1. Replace placeholder values with your actual configuration # 2. Adjust worker counts based on your server specs # 3. Update database credentials # 4. Set secure admin password # 5. Configure logging paths [options] # ============================================================================== # BASIC CONFIGURATION # ============================================================================== # Database Configuration db_host = localhost db_port = 5432 db_user = odoo_user db_password = YOUR_SECURE_DB_PASSWORD_HERE db_maxconn = 64 # Admin Interface Security admin_passwd = YOUR_SUPER_SECURE_ADMIN_PASSWORD_HERE list_db = False # ============================================================================== # SERVER CONFIGURATION # ============================================================================== # Network Configuration xmlrpc_interface = 127.0.0.1 netrpc_interface = 127.0.0.1 xmlrpc_port = 8069 longpolling_port = 8072 # Proxy Configuration (Enable when using nginx/Apache) proxy_mode = True # ============================================================================== # WORKER PROCESS CONFIGURATION # ============================================================================== # Worker calculation: (CPU_CORES * 2) + 1 # Adjust based on your server specifications: # - 2 cores: workers = 5 # - 4 cores: workers = 9 # - 6 cores: workers = 13 # - 8 cores: workers = 17 workers = 9 max_cron_threads = 2 # ============================================================================== # MEMORY MANAGEMENT # ============================================================================== # Memory Limits (in bytes) # Hard limit: Process killed if exceeded limit_memory_hard = 2684354560 # 2.5GB # Soft limit: Process recycled after current request limit_memory_soft = 2147483648 # 2GB # Request Limits limit_request = 8192 # Requests before worker restart limit_time_cpu = 600 # CPU time limit per request (10 min) limit_time_real = 1200 # Real time limit per request (20 min) # ============================================================================== # LOGGING CONFIGURATION # ============================================================================== # Log Configuration logfile = /var/log/odoo/odoo.log log_level = warn logrotate = True log_db = False # Debug Logging (Enable only for troubleshooting) # log_level = debug # log_handler = :DEBUG # ============================================================================== # SECURITY CONFIGURATION # ============================================================================== # Secure Configuration secure_cert_file = /etc/ssl/certs/odoo.crt secure_pkey_file = /etc/ssl/private/odoo.key # Session Security session_timeout = 3600 # 1 hour session timeout # ============================================================================== # FILE STORAGE CONFIGURATION # ============================================================================== # Data Directory data_dir = /var/lib/odoo # File Upload Configuration limit_request_size = 134217728 # 128MB max file upload # ============================================================================== # EMAIL CONFIGURATION # ============================================================================== # SMTP Configuration (Uncomment and configure for email functionality) # smtp_server = smtp.gmail.com # smtp_port = 587 # smtp_user = your-email@domain.com # smtp_password = your-email-password # smtp_ssl = True # ============================================================================== # PERFORMANCE TUNING # ============================================================================== # Database Connection Optimization db_template = template0 # Cache Configuration enable_cache = True # ============================================================================== # DEVELOPMENT/TESTING OPTIONS # ============================================================================== # Uncomment these options only for development environments # Never use in production! # without_demo = False # dev_mode = reload,qweb,werkzeug,xml # test_enable = True # test_tags = standard # ============================================================================== # CUSTOM ADDONS CONFIGURATION # ============================================================================== # Additional Addon Paths (if you have custom modules) # addons_path = /opt/odoo/addons,/opt/odoo/custom_addons # ============================================================================== # DATABASE FILTER CONFIGURATION # ============================================================================== # Database Filter (for multi-database setups) # dbfilter = ^%d$ # ============================================================================== # MULTI-PROCESSING CONFIGURATION # ============================================================================== # Enable only if you need multi-processing features # server_wide_modules = base,web # workers = 0 # Disable multi-processing for development # ============================================================================== # MONITORING AND HEALTH CHECKS # ============================================================================== # Health Check Configuration # Enable built-in health monitoring # http_health_check = True # ============================================================================== # NOTES AND RECOMMENDATIONS # ============================================================================== # Performance Recommendations: # 1. Monitor memory usage and adjust limits as needed # 2. Worker count should not exceed available RAM capacity # 3. Enable log rotation to prevent disk space issues # 4. Regular database maintenance (VACUUM, ANALYZE) # 5. Monitor connection counts vs db_maxconn limit # Security Recommendations: # 1. Change admin_passwd immediately after setup # 2. Keep list_db = False in production # 3. Use proxy_mode = True with reverse proxy # 4. Regular security updates for OS and dependencies # 5. Monitor access logs for suspicious activity # Troubleshooting: # 1. Check logs at /var/log/odoo/odoo.log # 2. Monitor worker processes with: ps aux | grep odoo # 3. Check database connections with: sudo -u postgres psql -c "SELECT count(*) FROM pg_stat_activity;" # 4. Verify configuration with: odoo --test-tags=base --stop-after-init # For support and updates, visit: https://ariashaw.github.io