If you are wondering how to host Odoo on VPS infrastructure, this walkthrough covers the entire process from picking the right server to verifying your first backup restore. Hosting Odoo yourself gives you full control over the environment and removes any recurring per user hosting fee, but it also means you own the server, the database, security patches and uptime. This guide breaks the setup into clear stages so you know exactly what to do at each point and where self hosting stops making sense.
Key Takeaways
- A minimum VPS for Odoo is 2 vCPU, 4 GB RAM and 40 GB SSD running Ubuntu LTS, which comfortably supports 1 to 10 users.
- The install sequence covers a system update, PostgreSQL, Python dependencies, the Odoo source, a configuration file, a systemd service, an Nginx reverse proxy and SSL through Certbot.
- Automated backups are not a nice to have. Schedule a daily pg_dump and filestore backup, store a copy offsite and restore it on a test server once a month.
- Budget VPS providers work fine for testing but often oversell shared resources. For production workloads, DigitalOcean, Hetzner, Linode or AWS Lightsail give steadier performance.
- Self hosting suits teams with some Linux comfort and a preference for cost control. Once operations eat more time than the ERP itself, managed hosting becomes the better trade.
Table of Contents
- Who Should Host Odoo on a VPS
- Choosing the Right VPS for Odoo
- How to Host Odoo on VPS Step by Step
- Configuring the Database and Admin Access
- Setting Up a Domain and SSL
- Configuring Nginx as a Reverse Proxy
- Backing Up Odoo on a VPS
- Performance Basics for Small Teams
- When to Move to Managed Hosting
- Frequently Asked Questions
Who Should Host Odoo on a VPS
Choose a VPS when
- Someone on your team is comfortable with SSH, the Linux command line and basic server administration.
- You want to avoid a recurring per user hosting fee and manage your own infrastructure spend.
- You are running Odoo Community edition, which is only available as a self managed install.
- You need a server in a specific region for latency or data residency reasons.
- You are building a development, staging or testing environment rather than production.
Avoid it when
- No one on the team can manage a Linux server, since Odoo will run fine on day one and stall the day a patch or a disk cleanup is needed.
- There is no backup plan in place. Running production data without tested backups is a gamble, not a strategy.
- You expect a vendor to fix problems automatically. On a VPS you are the support desk.
- You need staging environments and Git based deployment, which take real effort to build manually compared with a platform like Odoo.sh that ships them by default.
Choosing the Right VPS for Odoo
Odoo VPS setup starts with picking hardware that matches your team size. Undersizing the server is the most common reason a fresh Odoo instance feels slow within the first month.
VPS Specifications by User Count
- 1 to 10 users, 2 vCPU, 4 GB RAM, 40 GB SSD, roughly 1500 to 3000 rupees a month.
- 10 to 30 users, 4 vCPU, 8 GB RAM, 80 GB SSD, roughly 3000 to 6000 rupees a month.
- 30 to 60 users, 4 to 8 vCPU, 16 GB RAM, 160 GB SSD, roughly 6000 to 12000 rupees a month.
- 60 or more users, a dedicated server with 8 or more vCPU and 32 or more GB RAM, roughly 12000 to 25000 rupees a month.
Best VPS Providers for Odoo Hosting in India
- DigitalOcean, Bangalore region, dependable performance and simple pricing, with 4 GB RAM near 1700 rupees a month.
- Hetzner, strong price to performance, with 8 GB RAM near 1200 rupees a month. No India data centre, but Europe latency is fine for most teams.
- AWS Lightsail, Mumbai region, a simplified slice of AWS infrastructure with predictable billing, near 2500 rupees a month for 4 GB RAM.
- Hostinger, Contabo and similar budget providers, very cheap at 500 to 1000 rupees for 4 GB RAM, but shared resources are often oversold. Fine for a trial, risky for production.
How to Host Odoo on VPS Step by Step
This is the core of any Odoo VPS setup. Work through the steps in order on a fresh Ubuntu LTS server.
Preparing the Server
- Update packages with
sudo apt update && sudo apt upgrade -yand set the timezone withsudo timedatectl set-timezone Asia/Kolkata. - Create a non root user if one does not already exist, then add it to the sudo group.
- Lock down SSH by disabling root login and password authentication so only key based access works.
- Enable the firewall with
sudo ufw allow OpenSSH && sudo ufw allow 'Nginx Full' && sudo ufw enable.
Installing Dependencies
- PostgreSQL with
sudo apt install postgresql -y. - Python and build tools with
sudo apt install python3-pip python3-dev python3-venv build-essential libxml2-dev libxslt1-dev libpq-dev libjpeg-dev zlib1g-dev -y. - wkhtmltopdf for PDF reports, using the build recommended in Odoo's own documentation rather than the default apt package.
- Node.js, npm and Git with
sudo apt install nodejs npm git -y.
Getting Odoo Onto the Server
- Create a dedicated system user with
sudo useradd -m -d /opt/odoo -U -r -s /bin/bash odoo, and never run the service as root. - Give that user database rights with
sudo su - postgres -c "createuser -s odoo". - Switch to the odoo user and clone the source with
git clone https://github.com/odoo/odoo.git --depth 1 --branch RELEASE_BRANCH /opt/odoo/odoo-server, choosing the branch that matches your release. - Install the Python requirements with
pip3 install -r /opt/odoo/odoo-server/requirements.txt.
Configuration File and Service
- Create
/etc/odoo-server.confwith contents like this.
[options]
admin_passwd = your_strong_master_password
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo-server/addons
logfile = /var/log/odoo/odoo-server.log
data_dir = /opt/odoo/.local/share/Odoo
- Lock permissions with
sudo chown odoo: /etc/odoo-server.conf && sudo chmod 640 /etc/odoo-server.conf. - Create a systemd unit at
/etc/systemd/system/odoo-server.service, then runsudo systemctl daemon-reload && sudo systemctl enable odoo-server && sudo systemctl start odoo-server. - Confirm it started with
sudo systemctl status odoo-server, which should read active and running.
Configuring the Database and Admin Access
- Open
http://your-server-ip:8069in a browser to reach the database creation screen. - Enter a database name, the master password from your configuration file, an admin email and a strong admin password, then pick your country and default language.
- Once the database exists, install only the apps you need, such as CRM, Sales, Inventory or Accounting, from the Apps menu.
- In production, set
list_db = Falseso the database manager page is hidden from anonymous visitors. - Change the master password to something long and unique, since anyone holding it can manage any database on the server.
Setting Up a Domain and SSL
- Create an A record in your domain registrar pointing your chosen subdomain, for example erp.yourcompany.com, to the VPS IP address, which usually propagates within half an hour.
- Install Certbot with
sudo apt install certbot python3-certbot-nginx -y. - Request a certificate with
sudo certbot --nginx -d erp.yourcompany.com, and Certbot will configure Nginx for HTTPS and handle renewal automatically every 90 days. - Visit the site over HTTPS to confirm the padlock appears. If it does not, check the Nginx configuration and the Certbot logs for the exact error.
Configuring Nginx as a Reverse Proxy
Odoo listens on port 8069 by default, and users should never connect to that port directly. Nginx takes HTTPS traffic on port 443, serves static assets efficiently and forwards everything else to Odoo internally.
- Create
/etc/nginx/sites-available/odoowith an upstream block for Odoo on 8069, an upstream block for the longpolling service on 8072, a redirect from port 80 to HTTPS, and a server block on port 443 with generous proxy timeouts for long running reports.
upstream odoo { server 127.0.0.1:8069; }
upstream odoochat { server 127.0.0.1:8072; }
server {
listen 80;
server_name erp.yourcompany.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name erp.yourcompany.com;
proxy_read_timeout 720s;
client_max_body_size 200m;
location / { proxy_pass http://odoo; proxy_set_header Host $host; }
location /websocket { proxy_pass http://odoochat; proxy_set_header Upgrade $http_upgrade; }
}
- Enable the site with
sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/and remove the default site. - Test and reload with
sudo nginx -t && sudo systemctl reload nginx.
proxy_mode = True to the Odoo configuration file once Nginx is in front of it, otherwise Odoo will not read the real client IP correctly from the forwarded header.Backing Up Odoo on a VPS
Any complete Odoo backup and restore process covers both the PostgreSQL database and the filestore, and it needs to be automated rather than remembered.
Automated Backup Script
- Write a small script that runs
pg_dumpfor the database andtarfor the filestore directory, saving both with a timestamp. - Schedule it with cron for a quiet hour, for example a daily 2 AM run.
- Delete local copies older than 30 days so the disk does not fill up.
Copying Backups Offsite
- A backup that lives only on the same server is not really a backup, since one disk failure takes both copies with it.
- Sync the backup folder to object storage such as S3 or to a separate server using rsync.
- Add that sync command to the end of your backup script so it runs automatically.
Testing a Restore
- Spin up a small temporary VPS for a few rupees an hour, install PostgreSQL and Odoo on it, and import the latest backup.
- Copy the filestore into the matching path and start the service.
- Log in, check that recent records are present and confirm a report actually generates.
- Do this once a month. A restore you have never tested is not a plan you can rely on.
Performance Basics for Small Teams
- Set worker counts to match RAM, roughly two workers for 4 GB and four for 8 GB, since each worker consumes 150 to 300 MB.
- Set memory limits in the configuration file so a runaway process gets recycled rather than taking down the server.
- Tune PostgreSQL settings such as shared buffers and effective cache size to match available RAM.
- Configure log rotation for the Odoo log directory so it does not grow without bound.
- Keep
max_cron_threadsat 1 so scheduled actions do not eat into a regular worker slot.
When to Move to Managed Hosting
- If server administration eats more than a few hours a month, that cost often exceeds the premium of a managed hosting and administration plan.
- If you deploy custom modules often and need real staging environments, building those by hand takes far longer than a managed platform where it is a single click.
- If you have had a close call, a failed backup, a security scare or an outage you could not resolve quickly, treat it as a signal the risk has outgrown your team.
- Your code sits on disk and your data sits in PostgreSQL, so both are portable whenever you graduate to a managed setup.
Need Help Setting Up or Migrating Your Odoo Server?
Tatvamasi Labs sets up Odoo on VPS, Odoo.sh and cloud providers, and helps teams move an existing self managed instance to a properly supported platform.
Get Setup Help
