Aller au contenu

Odoo Server Deployment Overview

Prerequisites

The following conditions are required for the application to function correctly:

  • Operating System: Debian or Ubuntu (including version 24.04).

  • Access Rights: Superuser (root) privileges to install system packages and manage Docker.

  • Ports:

    • 80 — for obtaining SSL certificates via HTTP.

    • 443 — primary port for HTTPS application traffic.

    • 8067 — internal Odoo service port.

FQDN of the final panel on hostkey.in domain

The domain name template is formed as follows:

Parameter Value
Prefix odoo
Domain hostkey.in
Full Template odoo{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

Main directories used in the system:

  • /etc/apt/sources.list.d/odoo.list — Odoo repository file.

  • /usr/share/keyrings/odoo-archive-keyring.gpg — Repository security key.

  • /root/nginx — Working directory for Nginx and Docker Compose configurations.

  • /data/nginx/user_conf.d — Custom Nginx configuration files.

  • /data/nginx/nginx-certbot.env — Environment variables file for the Nginx container.

Application Installation Process

The application is installed by adding the official Odoo repository (version 18.0) and installing the odoo package via the apt system package manager. Additionally, dependencies for correct export functionality (xlwt, num2words Python libraries) and components for PDF document generation (wkhtmltopdf) are installed into the system.

Access Rights and Security

  • Firewall: Ports 80 and 443 must be open.

  • Repository Security: A GPG key is used to verify the authenticity of Odoo packages.

  • Containerization: The proxy server runs in an isolated Docker container, using shared volumes for certificates.

Docker Containers and Execution

To ensure HTTPS operation, an Nginx container with automatic Certbot certificate acquisition is used.

Parameter Value
Image Name jonasal/nginx-certbot:latest
Ports host (using network_mode: host)
Volumes nginx_secrets:/etc/letsencrypt, /data/nginx/user_conf.d:/etc/nginx/user_conf.d
Environment Variables [email protected]
Restart Policy unless-stopped

Application Update

Updates are performed by updating system packages:

apt update && apt upgrade odoo
An Nginx configuration reload is also required to apply changes:
docker exec nginx-nginx-1 nginx -s reload

Permission Settings

The following directory permissions are used for the service:

  • /root/nginx: owner root, group root, mode 0755.

  • Configuration files in /data/nginx/user_conf.d have appropriate read permissions for Nginx.

Location of Configuration Files and Data

  • Proxy configuration: /data/nginx/user_conf.d/odoo{Server_ID}.hostkey.in.conf.

  • Docker environment file: /data/nginx/nginx-certbot.env.

Available Connection Ports

  • https://odoo{Server_ID}.hostkey.in — Primary access to the Odoo interface.

Starting and Stopping the Application

The proxy server is managed via Docker Compose:

  • Start: docker compose up -d (inside the /root/nginx directory).

  • Reload Nginx Configuration: docker exec nginx-nginx-1 nginx -s reload.