Bookmark this page

This appendix consolidates the most frequently needed configurations and commands in one place. You will return to it often after deployment.

Recommended Directory Layout

tree
/opt/odoo/
├── community/     ← Odoo Community (git)
│   └── addons/    ← Built-in Community addons
├── enterprise/    ← Odoo Enterprise (git)
├── custom/        ← Your custom addons
├── logs/
│   └── odoo.log   ← Application log file
└── venv/          ← Python virtual environment
    └── bin/
        ├── python3
        └── pip
tree
/etc/odoo/
└── odoo.conf      ← Main configuration (mode 640, owner odoo)

/etc/systemd/system/
└── odoo.service   ← systemd unit file

/etc/nginx/
├── sites-available/
│   └── odoo       ← Nginx virtual host config
└── sites-enabled/
    └── odoo       ← Symlink to sites-available/odoo

/usr/local/bin/
├── odoo-help
├── odoo-status
├── odoo-start
├── odoo-stop
├── odoo-restart
└── odoo-log

Complete odoo.conf

Production configuration for a small Oracle Cloud Free Tier VM with 1 GB RAM.

ini
[options]

admin_passwd = CHANGE_ME

db_user = odoo

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

logfile = /opt/odoo/logs/odoo.log

proxy_mode = True
http_interface = 127.0.0.1

workers = 0
max_cron_threads = 1

dbfilter = ^master$
list_db = False

limit_memory_soft = 268435456
limit_memory_hard = 536870912
limit_time_cpu = 120
limit_time_real = 240

Complete systemd Unit File

ini
[Unit]
Description=Odoo
Documentation=https://www.odoo.com/documentation
After=network.target postgresql.service
Requires=postgresql.service

[Service]
Type=simple
User=odoo
Group=odoo
WorkingDirectory=/opt/odoo/community
Environment="PATH=/opt/odoo/venv/bin"
ExecStart=/opt/odoo/venv/bin/python3 /opt/odoo/community/odoo-bin \
    -c /etc/odoo/odoo.conf
Restart=always
RestartSec=5
TimeoutStopSec=60
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

systemd Commands

bash
sudo systemctl daemon-reload
sudo systemctl enable odoo
sudo systemctl start odoo
sudo systemctl stop odoo
sudo systemctl restart odoo
sudo systemctl status odoo --no-pager
journalctl -u odoo -n 100 --no-pager
journalctl -u odoo -f

Nginx Configuration Summary

ItemDetail
Config file/etc/nginx/sites-available/odoo
Symlink/etc/nginx/sites-enabled/odoo
Odoo upstream127.0.0.1:8069
Public ports80 (HTTP redirect), 443 (HTTPS)
SSL certificatesManaged by Certbot / Let's Encrypt
WebSocket path/websocket
Static caching/web/static/ — 10 days
Max upload size100 MB (client_max_body_size)
bash
sudo nginx -t
sudo systemctl reload nginx
sudo systemctl restart nginx
sudo journalctl -u nginx -n 50 --no-pager

Daily Administration Commands

TaskCommand
Check all service statussudo systemctl status odoo postgresql nginx --no-pager
Restart Odooodoo-restart or sudo systemctl restart odoo
View live Odoo logodoo-log or tail -f /opt/odoo/logs/odoo.log
View systemd journaljournalctl -u odoo -n 100 --no-pager
Reload Nginx after config changessudo nginx -t && sudo systemctl reload nginx
Test SSL renewalsudo certbot renew --dry-run
Check open portssudo ss -tlnp
Check firewall rulessudo iptables -L INPUT -n --line-numbers
Update Odoo (Community)cd /opt/odoo/community && git pull
Check disk usagedf -h /opt/odoo

Full Deployment Checklist

Use this checklist to confirm a complete, successful deployment.

Server Preparation

  • Ubuntu 24.04 updated (apt update && apt upgrade)
  • System dependencies installed
  • PostgreSQL installed and running
  • odoo PostgreSQL role created
  • /opt/odoo directory structure created

Odoo Installation

  • Community repository cloned
  • Enterprise repository cloned (same branch)
  • Python virtual environment created
  • Python dependencies installed (requirements.txt)

Configuration & Service

  • /etc/odoo/odoo.conf created with correct settings
  • admin_passwd changed from default
  • proxy_mode = True and http_interface = 127.0.0.1 set
  • addons_path includes Enterprise
  • systemd service created, enabled and running
  • Odoo accessible on 127.0.0.1:8069

Networking & Security

  • Nginx installed and configured as reverse proxy
  • WebSocket location block configured
  • Default Nginx site disabled
  • DNS A record pointing to Oracle VM
  • DNS propagation verified
  • TLS certificate obtained from Let's Encrypt
  • HTTP redirects to HTTPS
  • Certbot auto-renewal configured (certbot.timer active)
  • Oracle Security List: ports 22, 80, 443 open; 8069 closed
  • iptables: ports 80, 443 allowed; rules saved persistently
  • Port 8069 not accessible from Internet

Administration

  • Helper commands installed in /usr/local/bin
  • Odoo accessible at https://yourdomain.com
  • Odoo login page loads correctly
Back to top