Odoo reference
Reference for running Odoo on TurboStack: where the files live, how the service runs, the default ports, and the odoo.conf configuration keys. For setup see Deploy Odoo on TurboStack; for tuning see Odoo best practices.
File layout
Everything lives under your system user's home directory. ~ is that home directory (for example /var/www/prod/).
For ownership and permissions, see Application file layout and permissions.
The Odoo service
Odoo runs as a systemd user service, so it needs no root access. The unit lives at ~/.config/systemd/user/application.service. It starts odoo-bin from your pyenv-managed Python and loads its environment from ~/conf/.env:
[Unit]
Description=Odoo application (main) for %u
Wants=network-online.target
After=network-online.target
Requires=dbus.socket
StartLimitIntervalSec=0
[Service]
LimitNOFILE=819200
LimitNPROC=819200
LimitMEMLOCK=infinity
TimeoutStartSec=900
Type=simple
WorkingDirectory=%h/application/odoo
EnvironmentFile=%h/conf/.env
ExecStart=%h/.pyenv/shims/python %h/application/odoo/odoo-bin -c %h/conf/odoo.conf
ExecStop=/bin/kill -s TERM $MAINPID
Restart=on-failure
RestartSec=10s
KillSignal=SIGQUIT
StandardOutput=append:%h/logs/odoo.log
[Install]
WantedBy=default.target
The high file-descriptor and process limits (LimitNOFILE, LimitNPROC, LimitMEMLOCK) keep Odoo from hitting kernel resource caps under load. TimeoutStartSec=900 gives module upgrades enough time to finish before systemd considers the start failed. The service restarts on failure after 10 seconds and appends its output to ~/logs/odoo.log. Manage it with systemctl --user - see How to manage user system services.
Default ports
TurboStack fronts Odoo with an Nginx reverse proxy and sets these ports for you. They are advanced overrides; leave them at the defaults unless you have a specific reason to change them.
Configuration keys
The workers count is derived from the server's vCPUs; the other limits are fixed platform defaults. This table is a scannable reference; for when and how to change each value, see Odoo best practices.
Sizing heuristics
When you do tune odoo.conf by hand, size the limits from the server's resources:
limit_memory_hard- about half of total RAM.limit_memory_soft- about a quarter of total RAM.max_cron_threads- about one third of the CPU cores (up to half in large setups).limit_time_real_cron-0means unlimited; set it to86400(24 hours) to cap long cron jobs.
Tuning by server size
Copy-pasteable starting points for two common server sizes. Adjust from the heuristics above and measure before changing further.
8 GB RAM / 4 CPU cores:
workers = 8
limit_memory_hard = 4294967296 ; 4 GB
limit_memory_soft = 2147483648 ; 2 GB
limit_request = 8192
limit_time_cpu = 3600
limit_time_real = 7200
limit_time_real_cron = 0
max_cron_threads = 2
proxy_mode = True
48 GB RAM / 12 CPU cores:
workers = 36
limit_memory_hard = 6442450944 ; 6 GB
limit_memory_soft = 4294967296 ; 4 GB
limit_request = 8192
limit_time_cpu = 3600
limit_time_real = 7200
limit_time_real_cron = 0
max_cron_threads = 4
proxy_mode = True
Related
- Deploy Odoo on TurboStack
- Odoo best practices
- Troubleshooting Odoo
- Application file layout and permissions
- How to manage user system services