# turnkeylinux-apps/odoo architecture

> Architecture diagram of the GitHub repository turnkeylinux-apps/odoo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/turnkeylinux-apps/odoo
- Repository: https://github.com/turnkeylinux-apps/odoo

## Overview

This repository packages a TurnKey Odoo appliance rather than implementing Odoo itself. Its clearest in-repository workflow is first-boot password setup: the hook updates the example database when present, configures Odoo’s master password, and restarts the service. The README also documents the operator workflow of editing the Odoo database configuration, restarting the service, and returning to the login screen. Odoo’s business apps and several appliance integrations are documented but their implementation is outside this tree; the unsampled first-boot scripts are shown without inferred behavior.

Main entry points: [`overlay/usr/lib/inithooks/bin/odoo.py`](https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/bin/odoo.py) (Password hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["First-boot setup"]
  node_password_hook["Password hook<br/>[odoo.py]"]
  node_firstboot_secrets["Database secrets hook<br/>[20-odoo-db-secrets]"]
  node_firstboot_odoo["Odoo first-boot hook<br/>[40odoo]"]
end

subgraph group_app["Odoo application"]
  node_postgres[("PostgreSQL")]
  node_odoo_config["Odoo configuration"]
  node_odoo_service["Odoo service"]
  node_odoo_apps["Odoo business apps"]
  node_apache_config["Apache site config<br/>[odoo.conf]"]
end

subgraph group_admin["Appliance administration"]
  node_adminer["Adminer"]
  node_webmin["Webmin"]
end

node_administrator(("Administrator"))

node_administrator -->|"sets password"| node_password_hook
node_password_hook -->|"updates example DB"| node_postgres
node_password_hook -->|"sets master password"| node_odoo_config
node_password_hook -->|"restarts"| node_odoo_service
node_administrator -->|"edits database setting"| node_odoo_config
node_administrator -->|"restarts"| node_odoo_service
node_administrator -->|"uses"| node_odoo_apps

click node_password_hook "https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/bin/odoo.py"
click node_firstboot_secrets "https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/firstboot.d/20-odoo-db-secrets"
click node_firstboot_odoo "https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/firstboot.d/40odoo"
click node_apache_config "https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/etc/apache2/sites-available/odoo.conf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_password_hook,node_firstboot_secrets,node_firstboot_odoo toneBlue
class node_postgres,node_odoo_config,node_odoo_service,node_odoo_apps,node_apache_config toneAmber
class node_adminer,node_webmin toneMint
class node_administrator toneIndigo
```

## Components

### First-boot setup

- [Password hook](https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/bin/odoo.py): `overlay/usr/lib/inithooks/bin/odoo.py`
- [Database secrets hook](https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/firstboot.d/20-odoo-db-secrets): `overlay/usr/lib/inithooks/firstboot.d/20-odoo-db-secrets`
- [Odoo first-boot hook](https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/usr/lib/inithooks/firstboot.d/40odoo): `overlay/usr/lib/inithooks/firstboot.d/40odoo`

### Odoo application

- **PostgreSQL**
- **Odoo configuration**
- **Odoo service**
- **Odoo business apps**
- [Apache site config](https://github.com/turnkeylinux-apps/odoo/blob/master/overlay/etc/apache2/sites-available/odoo.conf): `overlay/etc/apache2/sites-available/odoo.conf`

### Appliance administration

- **Adminer**
- **Webmin**

### Other components

- **Administrator**

## Connections

- Administrator → Password hook: sets password (evidence: `README.rst`)
- Password hook → PostgreSQL: updates example DB (evidence: `overlay/usr/lib/inithooks/bin/odoo.py`)
- Password hook → Odoo configuration: sets master password (evidence: `overlay/usr/lib/inithooks/bin/odoo.py`)
- Password hook → Odoo service: restarts (evidence: `overlay/usr/lib/inithooks/bin/odoo.py`)
- Administrator → Odoo configuration: edits database setting (evidence: `README.rst`)
- Administrator → Odoo service: restarts (evidence: `README.rst`)
- Administrator → Odoo business apps: uses (evidence: `README.rst`)
