Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk11 min

How to Install Odoo 18 on a Linux VPS

A production-focused Odoo 18 VPS installation guide covering package versus source deployment, PostgreSQL, PDF reports, HTTPS reverse proxying, WebSockets, verification, and recovery.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.com with 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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo -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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First-login and post-install verification

  1. Check that PostgreSQL is active: systemctl is-active postgresql.
  2. Check that Odoo starts automatically: systemctl is-enabled odoo.
  3. Open the DNS hostname over HTTPS and confirm the certificate matches the hostname.
  4. Use the configured master password to create a test database, then sign in with a separate application administrator account.
  5. 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.
  6. With multi-process mode enabled, test Discuss or LiveChat and watch the browser network panel for a successful WebSocket connection.
  7. Reboot during a maintenance window and repeat the service checks after startup.
  8. 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-pager and 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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_passwd configured.
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.