How To Host Odoo On A VPS For Better Performance?

Fast software shapes how a team feels about its workday. When Odoo responds in a blink, quotations leave sooner, stock counts update instantly, and month end closes on schedule. Choosing the right server for Odoo hosting turns that experience into a daily habit for every employee.

A VPS gives Odoo reserved CPU, memory, and disk, which removes the guesswork of shared plans. Choosing a VPS for upscaling also means a company adds capacity without migrating data. Follow these seven steps to configure, secure, and monitor the deployment for steady speed.

Learn how to host odoo on a VPS for better performance.

How to Host Odoo?

A well-hosted Odoo system rewards the time spent on its foundation. Server size, database behavior, and web traffic handling all shape how quickly every module responds. The steps below follow the order of a real deployment, from the first server login to the final backup test.

Step 1: Right-Size Resources

Count concurrent users, not employees. Twenty-five users working together fit on 4 vCPUs, 8 GB of RAM, and 80 GB of NVMe storage. One hundred users require 8 vCPUs and 16 GB of RAM. Leave about a fifth of the memory free for the operating system cache, because PostgreSQL leans on it heavily.

Ubuntu LTS is the safest operating system choice, since Odoo packages and community guides target it first. A data centre close to your users reduces latency, and root access is non-negotiable. Ask the provider for the guaranteed CPU cores before paying.

Step 2: Prepare the System

Run the apt install command for python3-pip, build-essential, libpq-dev, libxml2-dev, libldap2-dev, and wkhtmltopdf, the package that renders PDF reports.

Compare the Python3 –version output with the Odoo release notes, because each version supports a defined Python range. Set the timezone and regional settings at this stage, since incorrect values disturb scheduled actions later.

Create a dedicated Odoo system user and install PostgreSQL from the distribution repository. Download the branch matching your Odoo version with the git clone command and place it in the /opt/odoo directory.

The pip install -r requirements.txt command, run inside the virtual environment, installs every Python package required by Odoo. Keep custom addons in a separate folder, because an upgrade replaces the core directory.

Step 3: Set Worker Limits

Odoo starts in threaded mode by default, which uses a single process and underuses multi-core hardware. Setting workers solves that. Odoo’s documentation recommends (CPU cores × 2) + 1 workers, and each worker serves about six concurrent users. On a 4-core VPS, setting workers to 8 and max_cron_threads to 1 works well in the odoo.conf file.

Memory caps matter just as much. Set limit_memory_soft = 2147483648 and limit_memory_hard = 2684354560 to restart a bloated worker before it impacts the others. Pair them with limit_time_cpu = 600 and limit_time_real = 1200 to cap runaway reports.

Run the systemctl restart odoo command, then review memory usage after a full working day. Stable numbers show the limits match your team’s workload.

Step 4: Tune PostgreSQL

PostgreSQL ships with settings for small, low-memory machines, and an Odoo server performs better after a few adjustments. Raise shared_buffers to 25 percent of RAM, effective_cache_size to 60 percent, and work_mem to 16 MB.

On NVMe, random_page_cost = 1.1 nudges the planner toward index scans. Restart PostgreSQL afterwards and confirm each value with SHOW.

Keep max_connections near 100, because every Odoo worker opens a database connection. Autovacuum handles table upkeep, but run the ANALYZE command after big imports and monitor pg_stat_statements weekly.

Slow queries announce themselves there long before users complain. Please keep the database on the same VPS until the team reaches approximately 200 users.

Step 5: Add Nginx Caching

Nginx serves static files and slow client connections far more efficiently than Odoo workers. Point Nginx to port 8069 for traffic on ports 80 and 443. Nginx compresses text responses once the gzip-on command appears in the config.

Add the expires 365d command to the /web/static/ block, because the files there rarely change. Append http2 to the listen 443 ssl line, and browsers will fetch several files in parallel.

Uploads need client_max_body_size set to 100m, while long reports need proxy_read_timeout set to 720s. Websocket traffic belongs on a separate upstream at port 8072, away from regular requests. Static files then skip the workers entirely. Verify the result with the curl -I command and read the cache headers.

Step 6: SSL and Long-Polling

Browsers warn visitors on any Odoo login or checkout page served over plain HTTP, which makes the certificate a launch requirement. Run the certbot –nginx command to obtain a free certificate, and the redirect from HTTP to HTTPS follows in the same prompt.

Set proxy_mode = True in odoo.conf, which tells Odoo to trust the forwarded headers. Renewals run through a systemd timer. Test the renewal with the certbot renew –dry-run command.

Live chat and notifications need a dedicated route. Send /websocket to port 8072 on Odoo 16 and later, or /longpolling on earlier versions, then test it by opening Discuss in two browsers. Finish with UFW rules for ports 22, 80, and 443, key-based SSH, and the Fail2ban tool.

Step 7: Monitor and Back Up

A tuned server drifts without watching. Netdata or Grafana tracks CPU, RAM, and disk I/O, and an alert at 75 percent usage signals the next upgrade. Rotate logs with logrotate and read them weekly.

Run nightly pg_dump backups with filestore copies, store them off the server, and rehearse a restore every month on a staging VPS. Document the restore steps and aim for under one hour. MilesWeb provides managed VPS hosting with free professional email accounts and daily backups, a practical match for Odoo’s mail gateway and recovery routine.

Concluding Insights

Seven steps turn a blank VPS into a dependable Odoo workspace. Once the setup finishes, run a load test with 25 simulated users and save the response times as a baseline. Repeat the test every quarter, and the numbers will show exactly when more cores or memory make sense.

With MilesWeb, you can easily scale cores and memory with just a few clicks, and the configuration above remains unchanged. After each upgrade, invoices open in an instant, and response times remain level, even with new customers on board.

Finance closes every quarter ahead of schedule, sales teams send quotations the same day, and the whole company enjoys a system that grows as confidently as the business itself.

DEEPAK GUPTA

DEEPAK GUPTA

Deepak Gupta is the Founder of Scientech Easy, a Full Stack Developer, and a passionate coding educator with 8+ years of professional experience in Java, Python, web development, and core computer science subjects. With strong expertise in full-stack development, he provides hands-on training in programming languages and in-demand technologies at the Scientech Easy Institute, Dhanbad.

He regularly publishes in-depth tutorials, practical coding examples, and high-quality learning resources for both beginners and working professionals. Every article is carefully researched, technically reviewed, and regularly updated to ensure accuracy, clarity, and real-world relevance, helping learners build job-ready skills with confidence.