Skip to content

CLI reference

Omisen edited this page Aug 14, 2026 · 3 revisions

Every real flag of the invok binary (from src/cli.rs), with its default. Resolution priority is CLI → .env → interactive prompt → default.

sudo invok [OPTIONS]
Flag Value Default Notes
--version 16 | 17 | 18 | 19 (or NN.0) 18.0 normalised to NN.0; NN is the short form used in file, unit and service names
--odoo-user identifier odoo system user
--db-user identifier = --odoo-user PostgreSQL role; an explicit value decouples the two
--db-password string empty empty → peer authentication (no password)
--port 1–65535 8069 Odoo's HTTP port
--db-name identifier odoo database name
--install-dir absolute path /opt/odoo/odoo<N> must live under /opt/odoo
--admin-passwd string admin Odoo master password; admin is discouraged (see below)
--logfile path Odoo log file; absent → journal/stdout
--with-nginx flag off configures Nginx as a reverse proxy
--server-name string _ server_name of the Nginx vhost (catch-all by default)
--open-https-port flag off opens 443 on the firewall ahead of TLS. It does not configure TLS — that is certbot --nginx, which rewrites the vhost itself. Legacy alias: --enable-ssl
--config <FILE> path loads a .env file (declarative parsing)
--dry-run flag off prints the plan without mutating anything. Works without sudo too, but unprivileged some steps cannot inspect the system and the plan comes out incomplete — the installer says so
--aggressive-rollback flag off on rollback, also purges packages and PostgreSQL that would normally stay
--force flag off installs even if a manifest exists, archiving it instead of overwriting
-V / --installer-version flag prints the installer's version and exits (--version is Odoo's)
--help flag help message

Subcommand rollback (alias uninstall) — see The rollback model:

Flag Value Default Notes
--state <FILE> path /var/lib/invok/state.json manifest to consume; if absent, the historical path /opt/odoo/.installer-state.json is tried
--dry-run flag off lists what would be removed without touching anything; no sudo needed
--aggressive-rollback flag off as above
--yes / -y flag off skips the confirmation; required with no terminal

Notes:

  • ODOO_HOME is the constant /opt/odoo and cannot be changed from the CLI.
  • Re-running the installer on an already-installed instance fails, with a message pointing at rollback or --force: the uninstall manifest is never silently overwritten. On an interrupted installation, a re-run resumes it — with the same parameters, otherwise the installer stops and says which field does not match.
  • Ctrl-C rolls the installation back and restores the system. A second Ctrl-C exits at once (code 130), and from there the cleanup is yours, with sudo invok rollback.
  • --admin-passwd admin: interactively it requires an explicit confirmation; non-interactively the installer stops (set a different password). The password never reaches the logs.
  • --aggressive-rollback: handle with care — it removes more on rollback (common bootstrap utilities, PostgreSQL). The PostgreSQL purge is still declined if the cluster hosts other databases. See Security.

Configuration from a file: .env file reference.

Clone this wiki locally