Skip to content

Setting Up Odoo on a Linux Server – Your Own Open Source ERP and CRM

Discover how to manage and automate business processes with Odoo's integrated ERP and CRM platform for smooth operations

27 November 202611 min read90 Views0 helpful

Introduction

Odoo is a modular open-source platform that combines Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM). Businesses use it to manage sales, invoices, purchasing, inventory, projects, and much more in one place. Each area is a separate app that you activate only when you need it.

In this guide, we’ll show you two ways to install Odoo: the easy way using your server’s One-Click Apps and a manual installation with Docker Compose. Then you’ll activate your first apps, create users, enter your company details, and back up your data.

When it makes sense to host Odoo on your own server

Self-hosting Odoo is especially worthwhile if:

  • you want your business data to be stored on your own server instead of with a cloud provider.
  • the free Community Edition meets your needs. It is available under the LGPL open-source license and includes Sales, CRM, Invoicing, Purchase, Inventory, Project, Website, and Point of Sale, among other apps.
  • you want to extend Odoo with your own or community modules. Simply place additional modules in the addons folder.
  • you need a test or training environment, for example, to run through workflows before using them in your business.

A server of your own is less suitable if you need features from the paid Enterprise Edition or don’t want to manage updates, backups, and upgrades to new Odoo versions yourself. With self-hosting, all of these tasks are entirely up to you.

Community or Enterprise?

The One-Click App and the instructions below install the Community Edition of Odoo. You can see the difference from the Enterprise Edition directly in Odoo: under “Apps,” Enterprise apps have an “Upgrade” button instead of “Activate.”

CommunityEnterprise
CostFree, open source (LGPL)Paid subscription from Odoo
AppsCore apps such as Sales, CRM, Invoicing, Inventory, Purchase, Project, WebsiteAdditional apps such as Accounting, Studio, Knowledge, MRP II, and Timesheets
Docker imageOfficial odoo imageNo official image; modules must be added separately
Database upgrade to new versionsDo it yourselfOdoo upgrade service included in the subscription

The Community Edition is enough to get started and for many small businesses. If you need full accounting features or Studio, Enterprise is the right choice.

The easy way: Odoo as a One-Click App

The quickest way to get your own Odoo is through the One-Click Apps on your VPS or Dedicated Server. ZapX sets up the database, domain, and HTTPS for you, so you don’t need to use the console for installation.

Requirements

  • A Linux VPS or Dedicated Server (Debian or Ubuntu) with One-Click Apps set up. For instructions, see Set up One-Click Apps.
  • At least 1 GB RAM for Odoo; 2 GB is recommended. Requirements increase as you add users and apps.

Install

  1. Open your server in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search for Odoo in the App catalog and click Install app.
  3. Leave Use a custom subdomain or zap.cloud enabled and choose an address. With a domain, Odoo is available over HTTPS; without one, it is available over HTTP only.
  4. No other details are required. Under App configuration, you’ll see two Automatically generated values: the PostgreSQL database username and password. These are not your Odoo login credentials.
  5. Click Queue installation. The app will be online in one to two minutes.
Warning: Complete setup right after installation

The One-Click App does not create an Odoo database or admin account. The first person to visit the address creates the database and becomes the administrator. Open Odoo through the Access link right after installation and complete the setup.

First visit: create a database

The first time you visit, Odoo displays the “Create Database” form:

  1. Master Password: Odoo generates a master password for the database manager and displays it in the yellow notice. Save it in your password manager right away or replace it in the field with one of your own. You’ll need it to back up, restore, copy, or delete databases.
  2. Database Name: A name without spaces, for example, company.
  3. Email and Password: These will be your administrator login credentials.
  4. Language and Country: Choose the interface language and your company’s country. The country determines the currency and tax templates, among other things.
  5. Demo Data: Loads sample data. Enable this option only for a test environment.

Click “Create database.” Creation takes one to two minutes, after which you’ll be logged in. Later, sign in on the login page with your email and password.

Check the master password after a restart or update

Odoo stores the master password in a configuration file inside the container. For the One-Click App, this file is not stored in a volume. If you restart the app using Restart, or if it is recreated during an update or reinstallation, the master password is lost. Your database and files are retained.

Warning: Secure the database manager again

Without a master password, the database manager is unprotected, and whoever accesses it first can set their own master password. After every restart or update, open https://your-address/web/database/manager. If you see “Warning, your Odoo database manager is not protected,” set a new master password immediately using “Set Master Password.”

Updates and backups

To check whether an update is available for your installation, open the app settings (gear icon), go to App update, and click Check for updates. If a new version is available, install it using Apply update. The database, file attachments, and custom modules are stored in separate volumes and will be retained.

Create a backup before every update: open https://your-address/web/database/manager, click “Backup” next to your database, enter the master password, and select the “zip (includes filestore)” format. The ZIP file contains the database and all uploaded files. Odoo notes that the database manager is not designed for large databases. If your database grows significantly, back it up from the console as described in the “Back up your data” section of the manual installation instructions.

You can change the app address under App actions. You can also stop, reinstall, or uninstall the app there.

Manual installation

The rest of this guide describes the manual installation of Odoo from the console with Docker Compose, for example, if you want full control over the configuration, modules, and updates. It uses the official Odoo Docker image and the Odoo system configuration documentation.

Requirements

  • A Linux server running Debian or Ubuntu with SSH access. See First access over SSH.
  • Docker and Docker Compose. See Install Docker. Check the installation with docker --version and docker compose version.
  • For HTTPS: a domain or subdomain whose A record points to your server’s IP address (e.g., odoo.example.com). If your domain is with us, create the record using EasyDNS.
HardwareMinimumZAP-Hosting recommendation
CPU1 vCPU core2 vCPU cores
RAM1 GB2 GB
Storage15 GB25 GB

Odoo’s resource requirements depend on the number of simultaneous users and the apps you enable. Odoo estimates about 150 MB of RAM per worker for simple requests and up to 1 GB for demanding requests.

Set up the firewall

In this guide, Odoo listens only on port 8069 locally. It will be accessible externally only through the reverse proxy. So, allow only SSH and the ports for HTTP and HTTPS. With ufw, this looks like:

Code
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Do not open database port 5432. Odoo accesses PostgreSQL through the internal Docker network. For more on ufw, see Managing the firewall on Linux.

Install with Docker Compose

Create a project folder with subfolders for the configuration and custom modules:

Code
mkdir -p /opt/odoo/config /opt/odoo/addons
cd /opt/odoo

Generate a random password for the database and one for Odoo’s database manager (master password). Run the command twice and note down both values:

Code
openssl rand -base64 24

Create the compose.yml file using nano compose.yml and replace DB_PASSWORD in both places with your database password:

Code
services:
  db:
    image: postgres:16
    restart: unless-stopped
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=DB_PASSWORD
    volumes:
      - odoo-db-data:/var/lib/postgresql/data

  odoo:
    image: odoo:20
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - "127.0.0.1:8069:8069"
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=DB_PASSWORD
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons

volumes:
  odoo-db-data:
  odoo-web-data:

The most important lines:

  • image: odoo:20 installs Odoo 20 Community Edition and stays on this major version. Bug fixes for version 20 are delivered through new images.
  • HOST, USER, and PASSWORD tell Odoo how to connect to the database. They must match POSTGRES_USER and POSTGRES_PASSWORD.
  • 127.0.0.1:8069:8069 makes Odoo accessible only from the server itself. The database does not have a published port.
  • odoo-web-data contains uploaded files (filestore), and odoo-db-data contains the database. Store your custom modules in ./addons.

Since the ./config folder replaces the image’s default configuration, create the config/odoo.conf file yourself. Replace MASTER_PASSWORD with your master password:

Code
[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
admin_passwd = MASTER_PASSWORD
proxy_mode = True

Use the Docker image template values for addons_path and data_dir. admin_passwd protects the database manager, while proxy_mode = True ensures Odoo uses the correct address and client IP behind the reverse proxy. Then start Odoo:

Code
docker compose up -d
docker compose logs -f odoo

Odoo is ready when “HTTP service (werkzeug) running” appears in the log. Stop viewing the log with Strg+C.

First visit

Since Odoo listens only locally, access it through an SSH tunnel before setting up the reverse proxy. Run this on your own computer:

Code
ssh -L 8069:127.0.0.1:8069 root@SERVER_IP

Then open http://localhost:8069 in your browser. Odoo displays the “Create Database” form with the same fields as the One-Click App. Enter the password from odoo.conf as the “Master Password.” Set your admin account using “Email” and “Password.” This installation method does not have a preset login such as admin/admin.

Access over HTTPS through a reverse proxy

To access Odoo through your domain, set up a reverse proxy with an SSL certificate in front of Odoo. For the basics, see Set up a reverse proxy with nginx and Create an SSL certificate (Let's Encrypt).

Odoo uses a WebSocket connection at /websocket for chat and notifications, so the proxy must pass it through. Older guides also forward /longpolling, but current Odoo versions no longer need this. Here is an nginx server block based on the Odoo documentation:

Code
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 80;
    server_name odoo.example.com;

    proxy_read_timeout 720s;
    proxy_connect_timeout 720s;
    proxy_send_timeout 720s;
    client_max_body_size 50m;

    location /websocket {
        proxy_pass http://127.0.0.1:8069;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
    }

    location / {
        proxy_pass http://127.0.0.1:8069;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_redirect off;
    }
}

client_max_body_size allows uploads up to 50 MB. Without this line, nginx rejects attachments and imports larger than 1 MB. Then obtain the certificate with certbot --nginx -d odoo.example.com. Certbot adds HTTPS and the HTTP redirect to the block.

Info: Multiple workers

By default, the Docker image runs Odoo in a single process with multiple threads, and /websocket then goes to port 8069. If you set the workers option in odoo.conf to a value greater than 0, Odoo starts a separate live chat process on port 8072. In that case, also expose 127.0.0.1:8072:8072 in compose.yml and route /websocket there.

Tip: Disable the database manager

Odoo recommends disabling the database manager on publicly accessible servers. After creating your database, add the lines list_db = False and db_name = company (your database name) to odoo.conf, then restart Odoo with docker compose restart odoo. You can then create backups from the console as described below.

Back up your data

A complete backup consists of two parts: the database and the filestore with all uploaded files. Replace company with your database name:

Code
cd /opt/odoo
docker compose exec -T db pg_dump -U odoo -Fc company > odoo-db-$(date +%F).dump
docker compose cp odoo:/var/lib/odoo/filestore/company ./filestore-$(date +%F)
tar -czf odoo-filestore-$(date +%F).tar.gz filestore-$(date +%F)

Also back up the config and addons folders. Download the files regularly or use your server backups in the web interface as well. If the database manager is enabled, you can also create a ZIP file containing the database and filestore by clicking “Backup” there.

Update Odoo

New images within version 20 include bug fixes and security updates. Create a backup first, then get the new version:

Code
cd /opt/odoo
docker compose pull
docker compose up -d

The database, filestore, and configuration are retained. Upgrading to a new major version, such as from 19 to 20, involves more than just using a new image: the database must be upgraded, and Odoo says this step cannot be reversed. So don’t simply change the image tag to the next version.

Set up Odoo: apps, users, and company details

Odoo is empty right after installation. These steps apply to both the One-Click App and the manual installation.

Activate apps

Open “Apps” from the menu in the upper-left corner. Click “Activate” to install an app, for example, “Sales” for quotes and orders, “Invoicing” for invoices, or “Inventory” for your stock. Odoo automatically installs any required dependencies. Apps with an “Upgrade” button are part of the Enterprise Edition and cannot be installed in the Community Edition.

Company details and language

Under “Settings,” enter your company name, address, logo, and tax ID in the “Companies” section. These details appear on quotes and invoices. Add more languages for the interface and documents under “Settings” > “Languages” using “Add Languages.” You can then set the language for your own account in your profile.

Create users

Under “Settings” > “Users,” open the user list with “Manage Users” and create additional accounts by clicking “New.” For each user, choose which apps they can access and what permissions they have. Odoo needs an outgoing mail server for invitations and password links to be delivered by email.

Add custom modules

Add additional modules as folders in the addons directory: for a manual installation, use /opt/odoo/addons; for the One-Click App, use SFTP to upload them to the _data subfolder of the Docker volume whose name ends in _odoo-extra-addons. Then restart Odoo, enable developer mode under “Settings” using “Activate the developer mode,” and click “Update Apps List” under “Apps.” You’ll then find the module in the app list. Make sure the module is compatible with your Odoo version.

Limitations of Odoo Community on your own server

  • No Enterprise apps: Accounting, Studio, Knowledge, and other apps with an “Upgrade” button are not included in the Community Edition.
  • You manage version upgrades yourself: Odoo offers its upgrade service for new major versions as part of the Enterprise subscription. With the Community Edition, you plan the upgrade yourself.
  • You are responsible for backups: Without regular backups of the database and filestore, your business data will be lost if something goes wrong.

Conclusion

You’ve installed Odoo on your server, created your first database, and learned how to activate apps, create users, and back up your data. The quickest option is the One-Click App: Odoo, the database, and HTTPS are ready in just a few minutes. Pay particular attention to the master password after restarts and updates. Learn more about Odoo in the official documentation.

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the quickest option: Odoo and the PostgreSQL database are installed in one to two minutes, and you can set up a domain, HTTPS, and updates with just a few clicks. However, you’ll need to reset the database manager’s master password after each restart or update. Manual installation with Docker Compose is a good choice if you want to manage the configuration file yourself, disable the database manager, configure multiple workers, or integrate Odoo into an existing server environment. Odoo’s features are the same either way.
Odoo’s Community Edition is open source (LGPL) and free. It includes apps such as Sales, CRM, Invoicing, Inventory, Purchase, Project, Website, and Point of Sale. Apps such as Accounting, Studio, and Knowledge are part of the paid Enterprise Edition. In Odoo, you can identify them under Apps by the “Upgrade” button instead of “Activate.”
Odoo does not have a preset login. When you first open it, create a database in the Create Database form and set your admin login details using Email and Password. The One-Click App’s automatically generated values are only the PostgreSQL database username and password, not your Odoo login.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.