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:
-
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.
-
Package Installation:
-
python3-pipis installed for Python package management. -
The
odoopackage is installed viaapt. -
Additional dependencies like
libssl3are ensured. -
PDF Generation Setup: To support PDF reporting, the system installs
wkhtmltopdfalong with its required libraries (includingxvfb,libqt5core5a, and others) to ensure proper rendering of documents. -
Dependency Management: For certain Ubuntu versions,
xlwtandnum2wordsare installed viapip3to 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 httpsandHostheaders 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
hostnetwork 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:
-
Update the local package index:
-
Upgrade the installed Odoo packages:
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_secretsDocker 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