-
Notifications
You must be signed in to change notification settings - Fork 0
Customer installations
Checklist for installing on a real customer machine. The goal: install without fear, knowing that if anything goes wrong the system goes back to what it was.
- OS: Ubuntu ≥ 22.04, Debian ≥ 11 or Fedora ≥ 40. Exercised in CI up to Ubuntu 24.04, Debian 12 and Fedora 44: on a newer release the installation goes ahead, but with a warning. What differs between the families: Multi-distribution support.
- Access as a normal user with
sudo(not root directly). - ≥ 5 GB free; port 8069 free (80/443 too with Nginx — unless it is Nginx itself holding them, which is not a conflict).
- A strong admin password decided (never
adminin production). - If the machine already has a PostgreSQL or an important database: no problem, the installer does not touch it — but read The rollback model to know exactly what is protected.
- If you will use wkhtmltopdf: check that the checksum pins are populated (see Security), or the installation will stop on the safe side.
On a customer machine you install the package, you do not compile: .deb for Ubuntu/Debian, .rpm
for Fedora, each with its .sha256 to verify before installing. They drop only the invok command
into /usr/bin (plus the vok alias) — no service, no user, no dependency: Odoo is installed by the
command, at runtime, when you run it.
Full commands and checksums: README → Install.
If the machine should not be left with the installer on it, use the musl
.tar.gz: it is the same executable, you run it where you unpacked it and delete it afterwards.
invok --config /path/to/customer.env --dry-runIt changes nothing: it shows what would be done and what is already there. Use it to validate the
customer's configuration before going ahead. It runs without sudo too, but then some steps cannot
inspect the system and the plan comes out incomplete — the installer says so. For the full plan, run
it with sudo.
sudo invok --config /path/to/customer.envThe run is traced to /var/log/invok.log (ask for it if there is trouble): it exists from the
first installation and stays even after a rollback.
You can interrupt with Ctrl-C: the installation rolls itself back and the system returns to what it was.
No manual intervention needed. If a step fails, the installer performs an automatic rollback:
it undoes the executed steps in reverse order and brings the system back to its initial state.
Resources that were already there (a database with the same name, a pre-installed PostgreSQL,
/opt/odoo, the user's .bashrc) are left intact. Read the error, fix the cause — usually the
config or a prerequisite — and run it again: the installer resumes where it stopped, with the
same parameters (with different ones it stops and says which field does not match).
Typical cases and what they mean: Verification and troubleshooting.
If the installation had instead already succeeded, a re-run stops on purpose: the uninstall manifest must not be overwritten. To reinstall:
sudo invok rollbackfirst, or--force(which archives the previous manifest instead of deleting it).
systemctl status odoo18
journalctl -u odoo18 -n 50 --no-pagerOpen http://<host>:8069 (or through Nginx if configured) and log in with the master password.
If the machine already carries an installation, do not re-run the installer plainly: it would stop, because without a name it means the one that is already there. Name the new one, and give it a port:
sudo invok --instance cliente-x --port 8169Everything that instance owns is qualified by that name — user, role, database, unit, directory,
config, filestore — so the two share nothing but the machine, the packages and the PostgreSQL
cluster. sudo invok list shows what a machine carries, and each instance is removed on its own with
sudo invok rollback --instance cliente-x. Detail: More than one instance.
- The
odoocommand is available to the installing user:odoo start|stop|restart|status|dev(aftersource ~/.bashrc). It is deliberately not global — only for that user. - Config file:
/opt/odoo/odoo18/odoo18.conf— it holds the master password, permissions0640 odoo:odoo. For a named instance,/opt/odoo/odoo-<name>/odoo-<name>.conf. - Installer log:
/var/log/invok.log. -
How to uninstall:
sudo invok rollback(or--instance <name>when the machine carries more than one). It works because the manifest (/var/lib/invok/state.json, or/var/lib/invok/instances/<name>.json) stays on disk after a successful installation: it says which artifacts we created and which were already there. Do not remove it — without it, automatic removal is no longer possible. - If the customer wants HTTPS:
sudo certbot --nginx -d domainafter the installation. The installer does not configure TLS on purpose — certbot rewrites the vhost itself.
The “surgical” promise is what makes it safe to point this installer at a production machine: it leaves no dirty intermediate state and destroys no pre-existing data. The details: The rollback model and Security.
Start here
Key concepts
References
For developers
Technical detail — how it works inside
Steps:
- 1.1 PrepareOptRoot
- 1.2 CreateOdooUser
- 1.3 SetupLogDir
- 1.3b SetupCacheDir
- 1.4 AptPackages (delta)
- 1.5 InstallWkhtmltopdf
- 1.6 SetupPostgres
- 1.7 CreateDbRole
- 1.8 CreateDatabase
- 1.9 CloneOdooRepo
- 1.10 CreateVirtualenv
- 1.11 InstallPythonRequirements
- 1.12 GenerateConfig
- 1.12b SetupDataDir
- 1.13 InitializeOdooDatabase
- 1.14 SetupSystemd
- 1.15 Nginx (6 sub-steps)
- 1.16 WriteControlScript + PatchBashrc
Cross-cutting: