Skip to content

omega-Q/odoo-devsetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ odoo-quickstart

One script. Multiple Odoo versions. Zero configuration headaches.

A no-nonsense Ubuntu installer that gets Odoo 14 through 19 running side-by-side in isolated Python environments β€” system deps, pyenv, PostgreSQL, Node/less, and Odoo source, all configured in a single run.

License: MIT Platform Shell Odoo PRs Welcome


πŸ“‹ Table of Contents


πŸ€” Why

Setting up Odoo on a fresh Ubuntu box is a 30-step process. Running multiple versions side-by-side multiplies that by N. This script collapses it into one prompt:

Select option(s) (e.g. 1 or 1,3,5 or 7):

Pick versions, accept defaults, walk away.


✨ Features

  • 🎯 Multi-version: install Odoo 14, 15, 16, 17, 18, 19 β€” or all at once
  • 🐍 Isolated Python per version via pyenv
  • πŸ—„οΈ PostgreSQL configured with passwordless superuser tied to your OS user
  • πŸ“¦ All system deps: build tools, libxml, libsasl, libldap, libjpeg, libopenblas, Node/npm/less, and more
  • πŸ” Idempotent: re-runs skip already-installed components
  • 🚦 Soft-fail: one broken package doesn't kill the whole run
  • πŸ€– Non-interactive mode via env vars for CI / Docker / Vagrant
  • πŸ“ Clean folder layout: workspace/odoo-19/ with .python-version set, no nested venv chaos

🎯 Supported Matrix

Odoo Version Default Python Status Branch
14 3.8.18 βœ… Supported 14.0
15 3.8.18 βœ… Supported 15.0
16 3.10.13 βœ… Supported 16.0
17 3.10.13 βœ… Supported 17.0
18 3.11.9 βœ… Supported 18.0
19 3.12.3 βœ… Supported 19.0

Python defaults are overridable at the prompt or via env vars.

Ubuntu Status
20.04 LTS βœ… Tested
22.04 LTS βœ… Tested
24.04 LTS βœ… Tested

⚑ Quick Start

Interactive (recommended for first-time setup)

git clone https://github.com/<your-username>/odoo-quickstart.git
cd odoo-quickstart
chmod +x odoo_setup.sh
./odoo_setup.sh

One-liner (when you know what you want)

wget https://raw.githubusercontent.com/<your-username>/odoo-quickstart/main/odoo_setup.sh
chmod +x odoo_setup.sh
ODOO_VERSIONS="18,19" ./odoo_setup.sh

View options

./odoo_setup.sh --help

πŸ”§ What It Does

The script walks through these stages in order:

  1. Prompts for Odoo version(s) and Python version per Odoo version
  2. Updates the system (apt-get update && upgrade)
  3. Installs system dependencies:
    • Python build deps (python3-dev, libxml2-dev, libxslt1-dev, libssl-dev, libffi-dev, …)
    • Numeric stack (libblas-dev, libopenblas-dev, gfortran)
    • LDAP/SASL/JPEG/PostgreSQL client libs
    • Node.js, npm, less, less-plugin-clean-css
    • pyenv build deps (libbz2-dev, libreadline-dev, libsqlite3-dev, …)
  4. Installs PostgreSQL and creates a passwordless superuser matching whoami
  5. Installs pyenv and wires it into ~/.bashrc
  6. For each selected Odoo version:
    • Installs the chosen Python version via pyenv install
    • Creates workspace/odoo-<v>/
    • Clones odoo/odoo at branch <v>.0 (shallow) into that folder
    • Sets pyenv local <python-version> for the folder
    • Installs requirements.txt against that Python

πŸ“ Folder Structure

After running with versions 18 and 19 selected:

~/workspace/
β”œβ”€β”€ odoo-18/
β”‚   β”œβ”€β”€ .python-version       ← 3.11.9 (pyenv local)
β”‚   β”œβ”€β”€ odoo-bin
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ addons/
β”‚   β”œβ”€β”€ odoo/
β”‚   └── ...
└── odoo-19/
    β”œβ”€β”€ .python-version       ← 3.12.3 (pyenv local)
    β”œβ”€β”€ odoo-bin
    β”œβ”€β”€ requirements.txt
    β”œβ”€β”€ addons/
    β”œβ”€β”€ odoo/
    └── ...

No virtualenvs. Each Odoo folder is pinned to a specific Python interpreter via pyenv. Packages install into ~/.pyenv/versions/<X.Y.Z>/lib/python*/site-packages/.


πŸ€– Non-Interactive Mode

Skip all prompts using environment variables β€” useful for Dockerfiles, CI pipelines, or scripted provisioning.

# Install Odoo 18 and 19 with default Python versions
ODOO_VERSIONS="18,19" ./odoo_setup.sh

# Install all versions
ODOO_VERSIONS="all" ./odoo_setup.sh

# Custom Python per version
ODOO_VERSIONS="17,18" PY_17=3.11.9 PY_18=3.12.3 ./odoo_setup.sh

# Custom workspace location
ODOO_WORKSPACE="/srv/odoo" ODOO_VERSIONS="19" ./odoo_setup.sh
Variable Purpose Example
ODOO_VERSIONS Comma list or "all" "16,18,19"
ODOO_WORKSPACE Where to clone Odoo (default: ~/workspace) /srv/odoo
PY_<N> Override Python for Odoo N PY_18=3.11.9

▢️ Running Odoo

After install completes, reload your shell:

source ~/.bashrc

Then start any installed version:

cd ~/workspace/odoo-19
python odoo-bin -d mydb

Odoo serves on http://localhost:8069. Master password is set on first DB creation.

Switching versions

Just cd into a different folder. pyenv auto-switches Python based on .python-version:

cd ~/workspace/odoo-18 && python --version  # Python 3.11.9
cd ~/workspace/odoo-19 && python --version  # Python 3.12.3

πŸ”₯ Troubleshooting

Some pip packages fail to compile

Usually means a missing system library. Check the error for the missing *.h header, then sudo apt-get install <lib>-dev. Re-run:

cd ~/workspace/odoo-<v> && pip install -r requirements.txt
pyenv: command not found after install

Your shell hasn't picked up the new ~/.bashrc entries. Either:

source ~/.bashrc

…or open a new terminal.

PostgreSQL connection refused
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql

If the role doesn't exist:

sudo -u postgres createuser -s "$(whoami)"
Python version install fails with build errors

A pyenv build dep is missing. Re-run the script β€” step 3 covers them β€” or manually:

sudo apt-get install -y make libbz2-dev libreadline-dev libsqlite3-dev \
    libncursesw5-dev xz-utils tk-dev libxmlsec1-dev liblzma-dev
Odoo 14/15 wkhtmltopdf issues

Older Odoo versions need wkhtmltopdf 0.12.5 (not the version in Ubuntu repos):

wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt-get install -f
Port 8069 already in use

Another Odoo instance is running. Either kill it or specify a different port:

python odoo-bin -d mydb --http-port=8070

🀝 Contributing

PRs welcome. See CONTRIBUTING.md for details.

Quick guide:

  1. Fork
  2. Branch: git checkout -b feat/your-feature
  3. Test on a clean Ubuntu VM (Multipass, Vagrant, Docker)
  4. Commit: git commit -m 'feat: add support for X'
  5. PR

πŸ“œ License

MIT Β© 2026


If this saved you an afternoon, give it a ⭐

About

Multi-version Odoo development environment installer for Ubuntu. One bash script to set up Odoo 14-19 side-by-side with isolated Python via pyenv, PostgreSQL, Node/less, and all system deps.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages