How to Install Odoo 18 Community Edition on Ubuntu Server

koderstorykoderstory
3 min read

Odoo is a powerful open‑source ERP suite used by thousands of businesses worldwide. This guide walks you through installing Odoo 18 CE on an Ubuntu server—from system preparation to your first Odoo startup.


Prerequisites

  • A clean Ubuntu 22.04+ server (root or sudo user access)

  • At least 2 GB RAM (4 GB+ recommended)

  • Domain name or static IP (for remote database connections)

  • Basic familiarity with Linux command line


1. Update & Install Core Dependencies

First, update your package lists and install the essential tools, libraries, and security services:

sudo apt update
sudo apt install -y \
  openssh-server \
  fail2ban \
  python3-pip python3-dev python3-venv \
  libxml2-dev libxslt1-dev zlib1g-dev \
  libsasl2-dev libldap2-dev \
  build-essential libssl-dev libffi-dev \
  libmysqlclient-dev libpq-dev \
  libjpeg8-dev liblcms2-dev \
  libblas-dev libatlas-base-dev \
  git curl fontconfig \
  libxrender1 xfonts-75dpi xfonts-base
  • openssh-server: secure remote access

  • fail2ban: intrusion prevention

  • python3‑dev / venv: compile and isolate Odoo’s Python environment

  • lib…-dev: database, XML, image, math libraries


2. Install OpenSSL 1.1

Odoo 18 may require OpenSSL 1.1 for certain Python modules. Replace $LIBSSL_URL with the proper download link from your mirror:

wget "http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_amd64.deb" -O libssl1.1.deb
sudo apt install -y ./libssl1.1.deb
rm libssl1.1.deb

3. Install wkhtmltopdf for PDF Reports

wkhtmltopdf generates Odoo’s PDF exports (invoices, reports). Download the matching .deb for Ubuntu 22.04/20.04 and install:

wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb" -O wkhtmltox.deb
sudo apt install -y ./wkhtmltox.deb
rm wkhtmltox.deb

4. Clone the Odoo Repository

Fetch the Odoo 18 community branch and install its Python dependencies:

git clone -b "18.0" --single-branch --depth 1 https://github.com/odoo/odoo.git odoo_ce
cd odoo_ce
pip3 install -r requirements.txt
  • --depth 1: keeps the clone lightweight

  • requirements.txt: installs necessary Python packages


5. Generate Default Configuration & Database

Use Odoo’s built‑in initializer to create a basic database and config file:

./odoo-bin --save --config /etc/odoo/odoo.conf --stop-after-init

This writes /etc/odoo/odoo.conf (you can move or edit it later).


6. Configure PostgreSQL

Create a PostgreSQL user and database, then allow remote connections if needed:

sudo -u postgres createuser --interactive
sudo -u postgres createdb <your_db_name> --owner=<db_user>

Edit /etc/postgresql/16/main/postgresql.conf:

listen_addresses = '*'

Restart and open access in /etc/postgresql/16/main/pg_hba.conf:

host  all  all  0.0.0.0/0  md5
sudo systemctl restart postgresql

Secure the postgres account (optional):

ALTER USER postgres PASSWORD 'mySecurePassword';

7. Start Odoo

Finally, launch Odoo pointing to your config:

/srv/odoo_ce/odoo-bin -c /etc/odoo/odoo.conf -i base,web
  • -i base,web: installs the core and web modules

  • By default, Odoo listens on port 8069

Visit http://<your-server-ip>:8069 in your browser and complete the on‑screen setup.


Conclusion

You now have a running Odoo 18 CE instance! From here you can:

  • Configure additional modules via the Apps menu

  • Harden your server (firewall, SSL certificates)

  • Automate Odoo startup with systemd

Feel free to adapt paths, database names, and security measures to your environment.

0
Subscribe to my newsletter

Read articles from koderstory directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

koderstory
koderstory

Koderstory is a lean software company focused on building viable, straightforward products that empower small businesses to grow.