Odoo 20 Community on Ubuntu 24.04 on Azure User Guide
Overview
Odoo is an open source suite of business applications. CRM, Sales, Invoicing, Inventory, Purchase, Project, Website, eCommerce, Point of Sale, Employees and many more share one PostgreSQL database and one web interface, so you install only the apps you need and add more as you grow.
This image runs Odoo 20 Community from Odoo S.A.'s own Ubuntu packages on Ubuntu 24.04 LTS, with PostgreSQL 16 and nginx on the same virtual machine. It is deployed the way Odoo's "Deploying Odoo" documentation describes: Odoo runs several worker processes on the virtual machine only, nginx serves it over HTTPS and passes Odoo's live updates (the websocket) through, and the wkhtmltopdf build Odoo recommends is installed for PDF quotations, invoices and reports.
Nothing is shared between virtual machines. On the first boot of your virtual machine a one time service creates the Odoo database odoo with Odoo's own installer (no demo data), replaces the default password of Odoo's admin user with a new one, sets a new Odoo master password, makes a TLS certificate for the virtual machine's address and writes the passwords to /root/odoo-credentials.txt, readable by root only. Odoo and nginx start only after that service has finished, so Odoo is never served with a default password.
The image also ships with:
- HTTPS on port 443 from the first boot; port 80 redirects to HTTPS
- Odoo's database manager (the page that creates, copies, backs up and drops databases over the web) switched off, and one database served
- Odoo listening on the virtual machine only (
127.0.0.1), and PostgreSQL on its local socket only, with no password on any database role - Odoo, nginx and PostgreSQL blocked from reaching the Azure instance metadata endpoint and the WireServer
- Ubuntu's unattended security upgrades switched on
The default operating system user is the administrator account you choose when you create the virtual machine (azureuser in the examples below). Odoo's configuration is /etc/odoo/odoo.conf and its file store (attachments, images) is in /var/lib/odoo.
Prerequisites
- A Microsoft Azure subscription in which you can create resource groups, virtual networks and virtual machines
- An SSH key pair for the administrator account
- A network security group that allows inbound TCP 22 from your own network, and TCP 443 (and 80, which redirects to HTTPS) from the networks your users work from
- The Azure CLI (
az) if you deploy from the command line
The recommended size is Standard_B2ms (2 vCPUs, 8 GiB memory), which suits a team of up to about 25 users with several apps installed. Standard_B2s (4 GiB) runs Odoo for a small trial. For more users choose a size with more vCPUs and raise Odoo's workers (see Managing the Services).
Step 1: Deploy the Virtual Machine
Option A: the Azure Portal
- Sign in to the Azure Portal, open Marketplace, search for Odoo 20 CE on Ubuntu 24.04 LTS by cloudimg and select Create.
- On Basics choose your subscription, a resource group, a region and a name, and pick Standard_B2ms or larger. Under Administrator account choose SSH public key and enter your user name and key.
- Under Inbound port rules allow SSH (22), HTTP (80) and HTTPS (443). Limit SSH to your own network on the Networking tab afterwards.
- Select Review + create, then Create.
First boot takes two to three minutes after the virtual machine shows Running: it creates the Odoo database.
Option B: the Azure CLI
Accept the Marketplace terms once per subscription, then create the virtual machine. Replace <your-mgmt-cidr> with the network you connect from, for example 203.0.113.0/24.
az vm image terms accept --urn cloudimg1647283583153:odoo-20-community-ubuntu-24-04:default:latest
RG=odoo-rg
az group create --name $RG --location eastus
az vm create \
--resource-group $RG \
--name odoo-01 \
--image cloudimg1647283583153:odoo-20-community-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_rsa.pub \
--public-ip-sku Standard \
--nsg-rule NONE
az network nsg rule create --resource-group $RG --nsg-name odoo-01NSG \
--name AllowMgmt --priority 1000 --access Allow --protocol Tcp \
--direction Inbound --source-address-prefixes <your-mgmt-cidr> --destination-port-ranges 22 80 443
Step 2: Connect to the Virtual Machine
Find the public IP address, then connect over SSH:
az vm show --resource-group odoo-rg --name odoo-01 --show-details --query publicIps -o tsv
ssh azureuser@<public-ip>
The message of the day shows the web address and where the credentials are:
Odoo 20 Community on Ubuntu 24.04 (cloudimg)
Web interface: https://203.0.113.10/
Admin credentials: sudo cat /root/odoo-credentials.txt
Change address: sudo cloudimg-set-public-address <ip-or-dns-name>
User guide: https://www.cloudimg.co.uk/guides/odoo-20-community-on-ubuntu-24-04-azure/
Check that the services are running and that Odoo answers:
systemctl is-active postgresql@16-main odoo nginx
dpkg-query -W -f='${Version}\n' odoo
curl -sk https://127.0.0.1/healthz; echo
active
active
active
20.0.20261130
{"status": "pass"}
/healthz is Odoo's own health check (/web/health), also answered on port 80 for load balancer probes.

Step 3: Read the Admin Credentials
sudo cat /root/odoo-credentials.txt
# Odoo 20 Community - generated on first boot by odoo-firstboot.service. Unique to this VM; store it safely.
ODOO_URL=https://203.0.113.10/
ODOO_DATABASE=odoo
ODOO_ADMIN_LOGIN=admin
ODOO_ADMIN_PASSWORD=************************
# The master password guards Odoo's database manager (create, back up, restore, drop), which this image keeps
# switched off (list_db = False in /etc/odoo/odoo.conf). Keep it safe in case you switch the manager on.
ODOO_MASTER_PASSWORD=************************
# Sign in at ODOO_URL with ODOO_ADMIN_LOGIN, then change the password under your avatar > My Preferences > Security.
# The certificate is self-signed and made for this VM: your browser warns until you install your own.
# Use your own DNS name or another address: sudo cloudimg-set-public-address erp.example.com
# User guide: https://www.cloudimg.co.uk/guides/odoo-20-community-on-ubuntu-24-04-azure/
ODOO_ADMIN_PASSWORD signs in to Odoo as admin. ODOO_MASTER_PASSWORD is Odoo's master password, which guards the database manager; the image keeps the database manager switched off, and /etc/odoo/odoo.conf holds only a hash of the master password.

Step 4: Sign in to Odoo
Open https://<public-ip>/ in your browser. The certificate is a self-signed one made for this virtual machine, so the browser warns once; accept it to continue, or install your own certificate first (step 9). Odoo opens its sign-in page.

Sign in with the email field set to admin and the password from the credentials file. After ten failed sign-ins from an address within a minute, Odoo makes that address wait a minute.
Change the password now: open your avatar at the top right, choose My Preferences, then the Security tab > Change password. Set your own name and email address on the same page: Odoo sends notifications from them.
Step 5: Install Your Apps
A new database has only Odoo's core installed. Open Apps from the app switcher at the top left to see the catalogue: each card is an app, and Activate installs it together with any apps it needs. Cards marked Upgrade are Odoo Enterprise apps.

Installing an app takes from a few seconds to a minute or two; Odoo then opens it. Installing the first app that sends messages (CRM, Sales, Project and others) also installs Discuss, and, as in Odoo's own packages, Odoo's productivity apps (Employees, Email Marketing, Project and Surveys) come with it. Every app's menu is in the app switcher at the top left.
For example, install CRM, then open CRM > Sales > My Pipeline. Each column is a stage; select New to add an opportunity, and drag cards between stages as deals progress.

Odoo Community apps only are available: the Enterprise apps shown in Odoo's online catalogue need an Odoo Enterprise subscription and are not part of this image.
Step 6: Your Company and Users
Open Settings to set your company's name, address, logo and currency (Companies), and the languages your users need (Languages). Then add a user for each colleague rather than sharing admin: Settings > Users & Companies > Users > New. Set each user's email and, on the Access Rights tab, their role in each app. Odoo emails each new user an invitation once outgoing email is set up (step 7); until then, set a password for them from the user's Action menu > Change Password.

Step 7: Send and Receive Email
Odoo sends invitations, quotations, invoices and notifications by email. Azure blocks outbound connections to port 25 from most subscriptions, so send through a mail service that accepts authenticated SMTP on port 587 (Microsoft 365, Google Workspace, Azure Communication Services or another provider):
- Open Settings > General Settings, find Emails and switch on Use Custom Email Servers, then select Outgoing Email Servers.
- Select New, enter the provider's SMTP host, port
587, Connection Encryption TLS (STARTTLS) and the user name and password, then Test Connection and save. - Set the Alias Domain under Emails to your mail domain so replies come back to Odoo, and add an incoming mail server under Incoming Email Servers if you want Odoo to collect replies from a mailbox.
Step 8: Serve Odoo on Your Own DNS Name
On first boot Odoo's address (and the certificate) is the public IP address Azure reports for the virtual machine. To use a DNS name instead, point an A record at the public IP address, then run:
sudo cloudimg-set-public-address <your-domain>
The command makes a new self-signed certificate for that name, sets Odoo's base URL (web.base.url, the address Odoo puts in emails and links) to https://<your-domain>, updates the credentials file and the message of the day, and restarts Odoo and nginx. Run it again with the public IP address to go back. Odoo also updates its base URL itself to the address the admin user signs in at.

Step 9: Install Your Own TLS Certificate
nginx reads the certificate from /etc/ssl/odoo/odoo.crt and the key from /etc/ssl/odoo/odoo.key. Set your DNS name first (step 8), because cloudimg-set-public-address replaces the certificate with a new self-signed one. With the DNS name set you can get a free Let's Encrypt certificate. Port 80 must be open to the Internet while certbot runs, and nginx is stopped for the few seconds it needs:
sudo apt-get install -y certbot
sudo certbot certonly --standalone -d <your-domain> -m <your-email> --agree-tos -n \
--pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' \
--deploy-hook 'install -m 0644 $RENEWED_LINEAGE/fullchain.pem /etc/ssl/odoo/odoo.crt; install -m 0600 $RENEWED_LINEAGE/privkey.pem /etc/ssl/odoo/odoo.key'
The deploy hook copies each renewed certificate into place, and certbot's own timer renews it before it expires.
Step 10: Back Up and Upgrade
An Odoo backup is the database and the file store together:
sudo -u odoo pg_dump -Fc odoo > <backup-dir>/odoo.dump
sudo tar -czf <backup-dir>/odoo-filestore.tar.gz -C /var/lib/odoo filestore
Copy both files off the virtual machine, for example to Azure Blob Storage. Azure Backup can also take scheduled snapshots of the whole virtual machine.
Ubuntu's unattended upgrades install security updates every day, nginx, PostgreSQL and Python included. To install every pending update yourself:
sudo apt-get update && sudo apt-get -y upgrade
Odoo itself comes from Odoo S.A.'s package repository, which the image keeps switched off (Enabled: no in /etc/apt/sources.list.d/odoo.sources) so a new Odoo build is never installed without you. Odoo publishes a new 20.0 build with fixes most days. To upgrade, take a backup, then switch the repository on, upgrade the package, update the database's modules and switch it off again:
sudo -u odoo pg_dump -Fc odoo > /var/tmp/odoo-before-upgrade.dump
sudo sed -i 's/^Enabled: no/Enabled: yes/' /etc/apt/sources.list.d/odoo.sources
sudo apt-get update && sudo apt-get install --only-upgrade -y odoo
sudo sed -i 's/^Enabled: yes/Enabled: no/' /etc/apt/sources.list.d/odoo.sources
sudo systemctl stop odoo
sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -u all --stop-after-init --no-http
sudo systemctl start odoo
A move to a later major version of Odoo (21 and on) is a database migration, not a package upgrade: Odoo S.A. offers it as a service, and the OpenUpgrade project covers Community databases.
Server Components
| Component | Version | Notes |
|---|---|---|
| Odoo Community | 20.0 (package 20.0.20261130) | Odoo S.A.'s package, /usr/lib/python3/dist-packages/odoo |
| PostgreSQL | 16.15 | Ubuntu 24.04 packages, local socket only |
| nginx | 1.24.0 | HTTPS on 443, port 80 redirects to HTTPS |
| Python | 3.12.3 | Ubuntu 24.04 packages |
| wkhtmltopdf | 0.12.6.1 (with patched qt) | The build Odoo recommends, for PDF reports |
| Ubuntu | 24.04 LTS | Azure kernel 6.8, unattended security upgrades on |
Filesystem Layout
| Mount | Size | What is there |
|---|---|---|
/ |
30 GB OS disk (29 GB root partition) | Ubuntu, Odoo, the PostgreSQL data in /var/lib/postgresql/16/main and Odoo's file store in /var/lib/odoo |
/boot |
881 MB | Kernels |
/boot/efi |
105 MB | EFI system partition |
/mnt |
Azure temporary disk (size depends on the VM size) | Scratch space only: Azure may wipe it on a stop, resize or redeploy. Never keep Odoo data here |
Managing the Services
sudo systemctl status odoo nginx postgresql@16-main --no-pager
sudo systemctl restart odoo
Odoo runs two HTTP worker processes and one scheduled-actions worker, which suits two vCPUs. For a larger size set workers in /etc/odoo/odoo.conf to (2 x vCPUs) + 1 and restart Odoo:
sudo grep -E '^(workers|max_cron_threads|limit_memory_soft|limit_memory_hard|list_db|proxy_mode)' /etc/odoo/odoo.conf
proxy_mode = True
list_db = False
workers = 2
max_cron_threads = 1
limit_memory_soft = 629145600
limit_memory_hard = 1677721600
Most of Odoo's settings are in its database and changed from Settings in the web interface; /etc/odoo/odoo.conf (readable by root and Odoo only) holds the server settings.
Scripts and Log Files
| Path | What it does |
|---|---|
/usr/local/sbin/odoo-firstboot.sh |
First boot: creates the database, sets the admin and master passwords, makes the certificate, writes the credentials file, then records /var/lib/cloudimg/odoo-firstboot.done |
/usr/local/sbin/cloudimg-set-public-address |
Moves the site to another DNS name or address (step 8) |
/root/odoo-credentials.txt |
The web address and the passwords (root only) |
/var/log/odoo/odoo-server.log |
Odoo's log |
/var/log/odoo-firstboot.log |
The first boot log |
/var/log/nginx/ |
nginx access and error logs |
/var/log/postgresql/ |
PostgreSQL logs |
sudo tail -n 20 /var/log/odoo/odoo-server.log
On Startup
On the first boot odoo-firstboot.service runs once, after PostgreSQL has started and before Odoo and nginx: it reads the virtual machine's public address from Azure, creates the database, sets the passwords, makes the TLS certificate and writes the credentials file, then records /var/lib/cloudimg/odoo-firstboot.done so it never runs again. Odoo and nginx start only once that file exists. On later boots PostgreSQL, Odoo and nginx start as normal systemd services, and Ubuntu's unattended upgrades run on their usual daily timer.
Troubleshooting
The credentials file is not there yet, or the browser cannot connect. First boot is still creating the database. Wait two or three minutes, then check systemctl status odoo-firstboot --no-pager and sudo tail /var/log/odoo-firstboot.log.
"Wrong login/password" with the right password. The login is admin, in lower case. After repeated failures Odoo makes your address wait a minute; wait, then try again.
The browser warns about the certificate. The certificate is self-signed for this virtual machine. Install your own (step 9).
Installing an app fails or a page is slow. Check sudo tail -n 50 /var/log/odoo/odoo-server.log. A worker that runs out of memory is restarted by Odoo; on a 4 GiB size move to Standard_B2ms or larger.
"The database manager has been disabled by the administrator". That is intended: the image serves one database. Back up and restore with pg_dump (step 10).
Security Recommendations
Out of the box only SSH (22), HTTP (80, which redirects to HTTPS) and HTTPS (443) listen beyond the virtual machine; Odoo listens on loopback only, PostgreSQL has no network listener, the database manager is switched off, and Odoo, nginx and PostgreSQL cannot reach the Azure metadata and wire server addresses:

- Change the admin password after the first sign in, and give each colleague their own user.
- Allow SSH only from your own network in the network security group.
- Use a DNS name and a trusted certificate (steps 8 and 9).
- Leave unattended upgrades on, and take Odoo's 20.0 builds regularly (step 10).
- Keep the master password safe, and leave the database manager off unless you need it.
Support
cloudimg's support team is on hand 24 hours a day by email at support@cloudimg.co.uk, with a guaranteed response within 24 hours. For Odoo itself, see the documentation at https://www.odoo.com/documentation/20.0/ and the Community edition's source on GitHub at https://github.com/odoo/odoo.