What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The most reliable production setup is Odoo 18’s official Debian package on a supported Ubuntu or Debian VPS, with PostgreSQL, the Odoo service, the Odoo-compatible wkhtmltopdf build, and an HTTPS reverse proxy. Use a source checkout instead when you need to develop modules or run several Odoo releases side by side. This guide covers both paths, then shows how to verify reports, WebSockets, backups, and service recovery.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Choose the Odoo release before you install anything
Odoo commands and dependencies are tied to the major release. Repository paths, supported operating systems, Python versions, PostgreSQL versions, configuration defaults, and wkhtmltopdf builds can change between releases. The commands and requirements below use Odoo 18 as the concrete example.
As an Amazon Associate I earn from qualifying purchases.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Odoo 18 packaged installers support Debian Bookworm 12 and Ubuntu Jammy 22.04 LTS or newer. If your VPS runs another distribution or an older Ubuntu release, upgrade or rebuild the server before proceeding rather than mixing repositories from different releases.
Package or source installation?
For a conventional VPS, the official Debian package is the safer default. It creates a service, installs the application in the distribution’s expected locations, creates the required PostgreSQL user, and starts Odoo for you. A source installation gives developers more control but makes dependency isolation, upgrades, service files, and rollback your responsibility.
#1 Best Overall
| Decision factor | Official package | Source checkout |
|---|---|---|
| Best fit | One stable production instance | Module development, patches, or several Odoo versions |
| Operating-system alignment | Use the Odoo 18 Debian or Ubuntu versions listed above | More flexible, but every dependency must match the selected release |
| Service management | Service unit and package lifecycle are provided | You create and maintain the system service |
| Upgrades and rollback | Package-manager workflow is simpler; test upgrades before production | You control the checkout and can pin revisions, but must design rollback |
| Dependency isolation | System package dependencies are handled by apt | Use an isolated Python environment where practical and follow the release requirements file |
| Operational burden | Lower | Higher: Python libraries, custom addons, service users, paths, and permissions are yours |
Do not copy an Odoo 17 or older repository stanza, Python requirement, or wkhtmltopdf instruction into an Odoo 18 server. Confirm every release-specific value in the documentation for the release you selected.
Prepare the Linux VPS
Minimum administration requirements
- A supported Debian or Ubuntu installation with a non-root account that can use
sudo. - A hostname such as
erp.example.comwith DNS pointing to the VPS address. - Console or SSH access that you can recover if a firewall rule locks you out.
- A firewall or cloud security group that allows SSH and, once the proxy is ready, TCP ports 80 and 443.
- A backup destination separate from the VPS for database dumps and the Odoo filestore.
Update the operating system
sudo apt update
sudo apt -y upgrade
sudo reboot
Reconnect after the reboot and confirm the intended release:
cat /etc/os-release
uname -m
Keep SSH restricted to your administration network where possible. Do not open Odoo’s development listener directly to the internet; the public endpoint should be the HTTPS proxy described later.
Install and secure PostgreSQL
“Odoo needs a PostgreSQL server to run properly.” Install PostgreSQL before Odoo and let it start at boot:
sudo apt update
sudo apt install postgresql postgresql-client
sudo systemctl enable --now postgresql
sudo systemctl status postgresql
For Odoo 18 source installations, PostgreSQL 12.0 or newer is supported. A package installation normally uses the PostgreSQL server on the same VPS and connects through a local Unix socket or loopback interface.
Create a dedicated database role
Odoo must not connect as the PostgreSQL postgres superuser. Create a role for the application instead:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutesudo -u postgres createuser --createdb --no-createrole --no-superuser odoo
The package installer creates the required role itself; do not create a conflicting role if the package has already completed that step. Check existing roles with:
sudo -u postgres psql -c "du"
Keep PostgreSQL administration separate from the application login. The Odoo role may create and own its databases, but it should not receive superuser, replication, or unrestricted operating-system privileges.
Rank #2
Using a remote PostgreSQL server
A remote database is possible, but it requires deliberate network and authentication changes. Configure PostgreSQL to listen only on the required private address, add a narrow pg_hba.conf rule for the VPS address and Odoo role, prefer encrypted connections, and set Odoo’s database host, port, user, password, and SSL options in its configuration. Never expose PostgreSQL on the public internet simply to make the connection work.
Install Odoo 18 from the official Debian package
Add the signed Odoo repository
Use the signed-keyring repository method in Odoo’s Odoo 18 packaged-installation documentation. The repository entry must target the 18.0 Debian build and use a keyring referenced with apt’s signed-by option. Avoid deprecated global key installation and do not use a repository for another major release.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesAfter adding the repository, refresh apt and install the package:
sudo apt update
sudo apt install odoo
The package installs Odoo as a system service, creates the expected PostgreSQL application user when needed, and starts the service. Check the result immediately:
sudo systemctl status odoo --no-pager
sudo systemctl is-enabled odoo
sudo journalctl -u odoo -n 100 --no-pager
Installing a downloaded .deb
If you obtained an Odoo 18 Community or Enterprise Debian package rather than using the repository, install it with dpkg, repair dependencies, and run dpkg again:
sudo dpkg -i ./odoo_18*.deb
sudo apt-get install -f
sudo dpkg -i ./odoo_18*.deb
Enterprise package downloads require an eligible paid on-premise customer or partner login. The package route and repository route should not be mixed casually; choose one update path and document it for future administrators.
Recommended Free Tools
Install wkhtmltopdf for correct PDF reports
Odoo does not install wkhtmltopdf through pip. Odoo 18 specifies wkhtmltopdf 0.12.6 for PDF headers and footers, so install the Odoo-supported build separately and verify it:
wkhtmltopdf --version
The command should report the required 0.12.6 build. Distribution packages can be a different version or may omit features needed by Odoo. If invoices have blank pages, missing logos, or no headers and footers, check this version before changing report templates.
Rank #3
Inspect the generated Odoo configuration
Package installations commonly create /etc/odoo.conf. Locate the active file from the service definition if your distribution uses another path:
systemctl cat odoo
sudo sed -n '1,220p' /etc/odoo.conf
Set a long, random admin_passwd. This is the master password for database-management operations in the Odoo database selector; it is not the password of an ordinary Odoo user. Protect the file because it contains security-sensitive settings.
Free tools Windows power users keep installed
One-click scans. No signup required.
Confirm the database connection settings, addons paths, logfile location, and listening address. A local package setup generally uses the local PostgreSQL socket or 127.0.0.1. If you changed the configuration, restart and inspect the log:
sudo systemctl restart odoo
sudo journalctl -u odoo -f
Leave the development listener bound to localhost when a reverse proxy is present. Binding it to every interface makes it possible to bypass HTTPS and proxy controls.
Source installation for developers and parallel versions
Install system dependencies
Use the matching Odoo Community branch or release archive. On Debian or Ubuntu, Odoo supplies a dependency installer that parses the release’s Debian requirements:
sudo ./setup/debinstall.sh
Run that command from the source tree with the required privileges. If you install dependencies manually, install the documented system libraries first and then use that release’s requirements.txt inside an isolated Python environment. Odoo warns that careless pip-based installation can create security and dependency problems; do not blindly install the newest versions of every library.
Create an isolated runtime
Keep each Odoo release in its own directory and Python environment. Store the checkout, custom addons, configuration, filestore, and service unit in predictable locations. The service should run as a dedicated non-root system user, not as your SSH account and never as root.
Create the service
Your service unit must identify the Python interpreter, Odoo source directory, configuration file, working directory, and log destination. After enabling it, test both a cold start and a restart:
Rank #4
sudo systemctl daemon-reload
sudo systemctl enable --now odoo
sudo systemctl restart odoo
sudo systemctl status odoo --no-pager
Install the same Odoo-compatible wkhtmltopdf build used by the packaged route. Keep source revisions and dependency lock information so you can return to a known working build after an upgrade.
Put Odoo behind Nginx and HTTPS
The Odoo HTTP listener is not the public production endpoint. Use Nginx, Apache, or another reverse proxy to terminate TLS, forward requests to Odoo, and preserve the original host, scheme, and client address. Obtain a valid certificate for the DNS name, then configure the proxy before opening the site broadly.
Enable proxy mode
Set proxy_mode = True in the Odoo configuration. Odoo’s deployment guidance states that proxy mode must be enabled when Odoo is behind a reverse proxy; without it, generated URLs, redirects, and secure-cookie behavior can be wrong because Odoo sees the proxy’s local connection instead of the browser’s HTTPS request.
Forward normal HTTP requests
A minimal Nginx server block forwards the original request metadata and keeps the application private:
server {
listen 443 ssl http2;
server_name erp.example.com;
ssl_certificate /etc/ssl/erp/fullchain.pem;
ssl_certificate_key /etc/ssl/erp/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8069;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 720s;
proxy_send_timeout 720s;
}
}
Use your actual certificate paths and hostname. Add an HTTP listener that redirects to HTTPS, and reload Nginx only after its configuration validates:
sudo nginx -t
sudo systemctl reload nginx
Route WebSockets in multi-process mode
When Odoo runs with multiple workers, a dedicated LiveChat worker listens on the configured gevent port. Requests beginning with /websocket/ must be routed to that port; otherwise Discuss, LiveChat, bus notifications, and other real-time features can fail while ordinary pages continue to load.
location /websocket/ {
proxy_pass http://127.0.0.1:8072;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 720s;
}
Use the gevent port configured on your Odoo instance; 8072 is a common configuration, not a value to assume blindly. Confirm the worker is listening with ss -ltnp and test a real-time feature through the HTTPS hostname.
Size workers and resource limits
Worker count is a capacity setting, not a performance guarantee. Odoo’s example uses the theoretical maximum formula (CPU threads × 2) + 1, then validates the result against observed load. Memory, installed modules, request duration, scheduled jobs, and concurrent users can make a lower value safer.
Best Value
| Example published scenario | Value | How to use it |
|---|---|---|
| CPU | 4 CPUs, 8 threads | Input to the example sizing calculation |
| Concurrent users | 60 | Illustrative workload, not a capacity promise |
| Odoo workers | 8 | Example application-worker setting |
| Cron workers | 1 | Separate scheduled-job worker in the example |
| Odoo memory | Approximately 3 GB | Example allocation; PostgreSQL, Nginx, the operating system, and spikes need additional RAM |
Start conservatively, watch CPU, RAM, swap, request latency, and worker recycling, then adjust. Set request and real-time timeouts high enough for legitimate report generation without allowing stuck requests to consume every worker.
First-login and post-install verification
- Check that PostgreSQL is active:
systemctl is-active postgresql. - Check that Odoo starts automatically:
systemctl is-enabled odoo. - Open the DNS hostname over HTTPS and confirm the certificate matches the hostname.
- Use the configured master password to create a test database, then sign in with a separate application administrator account.
- Create a sample invoice or another report and export it to PDF. Confirm that logos, fonts, headers, footers, page breaks, and non-ASCII text render correctly.
- With multi-process mode enabled, test Discuss or LiveChat and watch the browser network panel for a successful WebSocket connection.
- Reboot during a maintenance window and repeat the service checks after startup.
- Confirm that a backup contains both PostgreSQL data and the Odoo filestore, then perform a restore into a separate test database or server.
Troubleshoot the failures that matter most
The service will not start
- Read
journalctl -u odoo -n 200 --no-pagerand the configured Odoo logfile. - Check for a typo in the configuration, an unavailable PostgreSQL socket, a missing Python dependency, or an incorrect file ownership.
- For source installs, verify that the service points to the intended virtual environment and checkout rather than another release.
The database manager rejects the master password
Use the value of admin_passwd from the active configuration file, not the PostgreSQL role password and not an Odoo user password. After changing it, restart Odoo and ensure the service is reading the file you edited.
PDFs are blank or missing headers
Run wkhtmltopdf --version and verify Odoo’s required 0.12.6 build. Also check that the Odoo process can read report assets and that the proxy allows Odoo to generate URLs using the HTTPS scheme.
The page works but LiveChat or notifications do not
Confirm multi-process settings, the gevent worker, the /websocket/ location, Upgrade and Connection headers, and the proxy’s read timeout. A normal page response does not prove that the WebSocket route is correct.
Redirect loops or insecure links appear
Check that TLS terminates at the proxy, X-Forwarded-Proto is passed, and proxy_mode = True is enabled. Make sure Odoo is not generating a redirect to its private HTTP address.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →PostgreSQL authentication fails
Verify the database host, port, role, password, and pg_hba.conf rule. For a local setup, remove accidental remote-host settings and test the dedicated role rather than the postgres superuser.
Backups, updates, and safe operations
Back up PostgreSQL databases and the Odoo filestore together. A database dump without the filestore can lose attachments, documents, and images; a filestore copy without its database is not a usable application backup. Store encrypted copies away from the VPS, monitor backup jobs, and periodically restore them on an isolated system.
Enable both services at boot, monitor logs and resource usage, and keep the operating system, Odoo package or source revision, Python dependencies, and custom addons documented. Test updates on a clone first, take a fresh backup immediately before the change, and keep a rollback plan. For source deployments, preserve the previous checkout and virtual environment until the new version has passed database, PDF, proxy, and WebSocket checks.
Quick Recap
Operational checklist
- Supported Odoo 18 operating system selected: Debian Bookworm 12 or Ubuntu Jammy 22.04 LTS or newer.
- DNS, SSH recovery access, and firewall rules prepared.
- PostgreSQL installed, enabled, and using a dedicated non-superuser role.
- Odoo package or matching source checkout installed, with a protected configuration file.
- Strong
admin_passwdconfigured. - Odoo-compatible wkhtmltopdf 0.12.6 installed and verified.
- HTTPS reverse proxy configured with forwarded headers and proxy mode enabled.
- WebSocket traffic routed to the configured gevent worker when multi-process mode is used.
- PDF, database creation, HTTPS, reboot, and real-time feature tests completed.
- Database and filestore backups created, monitored, and restored successfully in a drill.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




