Deploying Odoo on Cloud Architecture
While Odoo offers cloud hosting options (Odoo.sh or Odoo Online), deploying Odoo ERP on your own Virtual Private Server (VPS) gives you total ownership over server resources, custom backend scripts, and server tuning configurations. In this guide, we will outline the blueprint to set up Odoo 18 on a managed Ubuntu 24.04 VPS.
Prerequisites
- A VPS running Ubuntu 24.04 LTS (minimum 2 vCPUs, 4GB RAM).
- A registered domain name pointing to your VPS IP address.
- Full root or sudo user access.
Step 1: Install PostgreSQL Database Server
Odoo uses PostgreSQL as its primary database system. Install and configure it using the terminal:
sudo apt update && sudo apt upgrade -y
sudo apt install postgresql postgresql-contrib -y
sudo su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo"
Step 2: Install Odoo System Dependencies
Install Python dependencies, git, nodejs, and less stylesheets processor:
sudo apt install git python3-pip python3-dev build-essential wget xz-utils nodejs npm -y
sudo npm install -g rtlcss
Step 3: Setup Nginx and SSL Certificate
To expose Odoo securely over the web, we configure Nginx as a reverse proxy and secure it with Let's Encrypt SSL certificates:
sudo apt install nginx certbot python3-certbot-nginx -y
sudo certbot --nginx -d your-erp-domain.com
Step 4: Automate Backups
Set up a simple cron job to trigger database backups every midnight and sync them to secure cloud storage (like AWS S3 or a secondary backup server) to prevent catastrophic data loss.