Skip to content

Deployment Overview of Odoo on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the server must meet the following requirements:

  • Operating System: Ubuntu (versions prior to 24.04 or version 24.04) or Debian.

  • Privileges: Root or sudo access is required for package installation and configuration.

  • Ports:

  • 80 (HTTP): Used for initial connection and SSL certificate challenges.

  • 443 (HTTPS): Required for secure web access.

  • 8069: Internal Odoo service port.

FQDN of the final panel on the hostkey.in domain

The application is accessible via a specific subdomain template based on the server ID.

Parameter Value
Prefix odoo
Domain hostkey.in
Full template odoo{Server_ID}.hostkey.in

File and Directory Structure

The following directories are used for configuration and data management:

  • /root/nginx: Contains the Docker Compose file for the Nginx proxy service.

  • /data/nginx/user_conf.d: Stores the Nginx virtual host configuration files.

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

  • /etc/apt/sources.list.d/odoo.list: Repository configuration for Odoo packages.

  • /usr/share/keyrings/odoo-archive-keyring.gpg: GPG keyring for verified Odoo package installation.

Application Installation Process

The application is installed using a combination of the official Odoo repository and system package managers:

  1. Repository Setup: The Odoo GPG key is downloaded and added to the system's trusted keyrings, and the official Odoo nightly repository is added to the APT sources list.

  2. Package Installation:

  3. python3-pip is installed for Python package management.

  4. The odoo package is installed via apt.

  5. Additional dependencies like libssl3 are ensured.

  6. PDF Generation Setup: To support PDF reporting, the system installs wkhtmltopdf along with its required libraries (including xvfb, libqt5core5a, and others) to ensure proper rendering of documents.

  7. Dependency Management: For certain Ubuntu versions, xlwt and num2words are installed via pip3 to support Excel exports and textual amount rendering.

Access Rights and Security

  • Firewall: The system is configured to listen on port 443 for secure traffic.

  • Nginx Configuration: A reverse proxy is configured to forward requests from the external domain to the local Odoo service running on 127.0.0.1:8069.

  • Security Headers: The Nginx configuration includes X-Forwarded-Proto https and Host headers to ensure Odoo correctly handles secure connections.

Databases

The application relies on a database backend (typically PostgreSQL, managed as part of the Odoo ecosystem) for data persistence. Connection details are handled internally by the Odoo service.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to manage SSL certificates and Nginx proxying:

  • nginx-certbot

  • Image: jonasal/nginx-certbot:latest

  • Ports: Uses host network mode to bind directly to system ports.

  • Volumes:

  • nginx_secrets:/etc/letsencrypt (Certificates)

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d (Configuration files)

  • Environment Variables: [email protected]

  • Restart Policy: unless-stopped

Application Update Instructions

To update the main Odoo application, perform the following steps:

  1. Update the local package index:

    sudo apt update
    

  2. Upgrade the installed Odoo packages:

    sudo apt upgrade odoo
    

Location of configuration files and data

  • Nginx Configuration: /data/nginx/user_conf.d/

  • Odoo Repository List: /etc/apt/sources.list.d/odoo.list

  • SSL Certificates: Managed within the nginx_secrets Docker volume.

Available ports for connection

  • HTTPS (Secure): 443

  • HTTP (Redirect/Challenge): 80

Starting and Stopping the application

The Odoo service is managed via the system's service manager:

  • Stop Odoo: sudo systemctl stop odoo

  • Start Odoo: sudo systemctl start odoo

  • Restart Nginx Proxy: docker exec nginx-nginx-1 nginx -s reload

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×