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 → Learn more now

12 November 20267 min read25 Views0 helpful

Introduction

Odoo is a modular open-source platform that combines Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) features. It enables businesses to centrally manage and automate processes such as accounting, inventory management, project management, and sales.

Thanks to flexible extensions, Odoo can be customized individually and offers an integrated solution to control all areas of a company.

Want to host this service yourself? We guide you step-by-step through the setup and configuration, showing you everything you need to know.

Installing Odoo with One-Click Apps

You can install Odoo directly via One-Click Apps in the dashboard of your dedicated server. After the initial setup of the apps, open the app catalog, search for Odoo, and start the deployment with your preferred project, environment, and domain settings. This way, you can deploy and manage Odoo quickly and easily—without manual command line installation but with integrated web-based management, custom domain support, and SSL provisioning where available.

Requirements

Before installing Odoo, ensure your hosting environment meets the following minimum requirements to guarantee a smooth installation and optimal performance.

HardwareMinimumRecommended
CPU1 vCPU core4 vCPU cores
RAM1 GB4 GB
Disk space15 GB25 GB

The software requires all necessary dependencies and must run on a supported operating system. Before installation, check if your server meets the following requirements:

Dependencies: Docker

Operating System: Latest version of Ubuntu/Debian with Docker 26+

Make sure all dependencies are installed and the OS is up to date to avoid compatibility issues during Odoo installation.

Preparation

Before setting up Odoo, prepare your system. This includes updating the operating system to the latest version and installing all required dependencies. This ensures a stable environment and prevents problems during or after installation.

Update System

To run your system with the latest software and security updates, first perform an update by running:

Code
sudo apt update && sudo apt upgrade -y

This equips your system with the latest security patches and software versions before proceeding.

Install Dependencies

After the update, install the dependencies. Odoo runs via multiple Docker containers, so Docker must be installed first. Run the following commands:

Code
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

A detailed guide on Docker installation and usage is available in our Docker tutorial.

Configure Domain

By default, Odoo runs on the host using ports 80 (HTTP) and 443 (HTTPS). Set up a domain with DNS entries pointing to your host. If your domain is managed with us, you can easily do this via the EasyDNS feature.

Installation

Once all requirements are met and preparations completed, you can start installing Odoo.

For multiple Docker projects, it’s advisable to create a clear directory structure to separate projects. A common approach is a docker folder in the user’s home directory with a subfolder per domain. This allows hosting multiple projects on one server without configuration conflicts.

For example, for the domain example.com:

Code
mkdir -p /docker/example.com
cd /docker/example.com

Inside this project folder, create subfolders that containers will mount as volumes. These volumes allow sharing or persistent storage of data between services. Especially important is the shared webroot, which both nginx and certbot need to access to create and renew SSL certificates. You can create a suitable structure like this:

Code
mkdir -p nginx/{conf,ssl,inc} config addons

This gives you dedicated folders for nginx configuration, SSL certificates, include files, and Odoo-specific content like configurations and addons.

Create Docker Compose

Create the file compose.yml in your Docker project with nano compose.yml and insert the following code:

Code
services:
  db:
    image: postgres:16
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data

  odoo:
    image: odoo:18.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons
    command: odoo -d odoo_db -i base --db_user=odoo --db_password=odoo --db_host=db

  nginx:
    image: nginx:latest
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/conf:/etc/nginx/conf.d
      - ./nginx/inc:/etc/nginx/inc
      - ./nginx/ssl:/etc/nginx/ssl
      - ./nginx/certbot/www:/var/www/certbot
      - ./nginx/certbot/conf:/etc/letsencrypt
    depends_on:
      - odoo

  certbot:
    image: certbot/certbot
    volumes:
      - ./nginx/certbot/www:/var/www/certbot
      - ./nginx/certbot/conf:/etc/letsencrypt

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

Firewall

For nginx and certbot to work properly, TCP ports 80 (HTTP) and 443 (HTTPS) must be open in the firewall. These ports are important because certbot uses port 80 for HTTP validation and port 443 for encrypted HTTPS traffic. If UFW (Uncomplicated Firewall) is enabled, add the rules with:

Code
sudo ufw allow http
sudo ufw allow https

Then check with sudo ufw status if the ports are open. Make sure no other firewall rules block access, or certificate creation and secure HTTPS traffic may fail.

Set Up Nginx

The nginx configuration starts with a file for your domain. Create a new file with your domain name in the nginx/conf directory. For example:

Code
nano nginx/conf/example.com.conf

Insert the following basic configuration and replace example.com with your domain:

Code
server {
    listen 80;
    server_name example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

This configuration allows certbot to perform the ACME challenge and issue valid SSL certificates. It also redirects all HTTP requests to HTTPS.

Save the file and start the required containers for database, Odoo, and nginx with:

Code
sudo docker compose up -d db odoo nginx

The containers now run in the background, and nginx uses the new configuration so certbot can create certificates in the next step.

Create SSL Certificates

Create SSL certificates with certbot by running the following command. Replace example.com with your domain and user@mail.com with your valid email address:

Code
sudo docker compose run --rm certbot certonly --webroot --webroot-path=/var/www/certbot -d example.com --email user@mail.com --agree-tos --no-eff-email

Then create a DH parameter file to enhance key exchange security:

Code
openssl dhparam -out nginx/ssl/dhparam.pem 2048

Now create the file ssl.conf with nano nginx/ssl/ssl.conf and add the following content. Replace example.com with your domain:

Code
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve X25519:prime256v1:secp384r1;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
ssl_dhparam "/etc/nginx/ssl/dhparam.pem";
ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;
resolver 1.1.1.1 1.0.0.1 valid=300s;

Configuration

Configure Nginx

Edit the nginx configuration file you created earlier and replace its content with the following configuration to ensure your site is accessible only via HTTPS.

Replace example.com in the server_name directive with your domain and adjust the paths to the certificate files in ssl_certificate and ssl_certificate_key accordingly.

bash
server {
    listen 443 ssl;
    http2 on;
    server_name example.com;

    # Include Mozilla SSL settings
    include /etc/nginx/ssl/ssl.conf;

    # Certificate paths (must match your mounted volume)
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    # Security headers
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header Referrer-Policy "no-referrer-when-downgrade" always;
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

    access_log /var/log/nginx/odoo_access.log;
    error_log  /var/log/nginx/odoo_error.log;

    # Gzip
    include /etc/nginx/inc/gzip.conf;

    # Proxy settings for Odoo
    location / {
        proxy_pass http://odoo:8069;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $host;
        proxy_redirect off;
        proxy_request_buffering off;
        # Recommended timeouts for standard requests
        proxy_connect_timeout 30s;
        proxy_send_timeout    60s;
        proxy_read_timeout    60s;
        send_timeout          60s;
    }

    # Cache static files
    location ~* /web/static/ {
        proxy_cache_valid 200 60m;
        proxy_buffering on;
        expires 864000;
        proxy_pass http://odoo:8069;
    }

    # Increase timeouts for long polling
    location /longpolling {
        proxy_pass http://odoo:8069;
        proxy_connect_timeout 60s;
        proxy_send_timeout    300s;
        proxy_read_timeout    300s;
        send_timeout          300s;
    }

    location /websocket {
        proxy_pass http://odoo:8069;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    listen 80;
    server_name example.com;

    # Allow certbot access to challenge URL
    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

Save the changes and reload the new configuration by restarting the nginx container:

Code
sudo docker compose restart nginx

The restart ensures nginx loads the updated configuration and immediately applies the new settings. Watch for error messages during restart. If issues occur, check logs with sudo docker compose logs nginx. If the container runs without errors, open your website again and verify HTTPS is active and the site loads correctly.

Odoo Configuration Options

To apply custom settings, create a dedicated configuration file for Odoo. Create the file config/odoo.conf and add your desired options.

In this file, you can define useful parameters: list_db = False hides the database selector on the login page, proxy_mode = True tells Odoo it is running behind a reverse proxy, and if you want to use your own addons, uncomment the addons_path line and point it to your addons directory. Example:

Code
[options]
list_db = False
proxy_mode = True
#addons_path = /mnt/extra-addons

Remove the -i base Flag

The -i base flag must be removed from the compose.yml because otherwise the database is recreated every time the Odoo container restarts. Open compose.yml with nano compose.yml and adjust the command to:

Code
command: odoo -d odoo_db --db_user=odoo --db_password=odoo --db_host=db

Accessing the Website

After successful installation and configuration, and when all services are running, you can securely access your website by entering your domain in the browser address bar.

The homepage of your new installation will load. For the first login, there is a default account with username admin and password admin. It is strongly recommended to change these credentials immediately.

Conclusion and Further Resources

Congratulations! You have successfully installed and configured Odoo on your VPS/Dedicated Server. We also recommend checking out the following resources to help with further server configuration:

Do you have specific questions not answered here? Our team is available daily for further help or support – just get in touch with us! 🙂

FAQ

Frequently asked questions

You can install Odoo directly via One-Click Apps in the dashboard of your dedicated server by searching for Odoo in the app catalog and starting deployment with your preferred project, environment, and domain settings.
Odoo is a modular open-source platform combining ERP and CRM features, allowing businesses to centrally manage processes like accounting, inventory, project management, and sales.
Minimum requirements are 1 vCPU core, 1 GB RAM, and 15 GB disk space. Recommended are 4 vCPU cores, 4 GB RAM, and 25 GB disk space.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 Users found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP 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.