Skip to Content

Odoo Server Setup

A production Odoo server on your own VPS or hardware: Docker, nginx, HTTPS, tuned workers and backups from day one.

WHAT YOU GET

A complete stack, ready for real users

Your Odoo runs on a server you own or rent, set up the way production systems should be: fast, encrypted, backed up and closed to everything except the web.

Your domainHTTPS certificate that renews itself
nginxReverse proxy, compression, websocket
OdooDocker, workers sized for your users
PostgreSQLPrivate network only, tuned
BackupsEvery night, copy kept off the server
Odoo server architecture: users reach nginx through the firewall; Odoo, PostgreSQL, n8n and backups run in Docker on a private network. Your users browser Β· phone FIREWALL Β· only 22, 80, 443 nginx HTTPS Β· gzip static cache DOCKER Β· PRIVATE NETWORK Odoo workers + websocket 127.0.0.1:8069 Β· 8072 PostgreSQL no public port tuned to server memory n8n alerts Β· automation Nightly backup database + files Off-site copy Telegram alerts HTTPS only
Only nginx faces the internet. Odoo and PostgreSQL listen on the server itself, never on a public port.
WHAT IS IMPLEMENTED

Everything a production Odoo needs

PartWhat is doneWhy it matters
ServerSystem updates, time zone, swap, firewall, SSH keys onlyA clean, locked base before anything is installed
DockerOdoo and PostgreSQL in containers with restart rulesStarts by itself after a reboot; easy to upgrade or move
OdooCommunity or Enterprise, your apps and custom modulesThe version and modules you need, nothing extra
ConfigurationWorkers, memory and time limits, proxy mode, database manager hiddenStable under load and not exposed to database attacks
nginx + HTTPSReverse proxy, websocket, upload limit, Let's Encrypt certificateEncrypted traffic, live chat and notifications working
BackupsNightly database and filestore backup with alertsYour data can always be restored
HandoverDocument with addresses, passwords, commands and a walkthrough callYou stay in control of your own server
HOW IT IS IMPLEMENTED

Step by step, with the real configuration

These are excerpts from a live production server set up this way.

  1. Choose the server size

    A short call about users, apps and data. Typical starting points, confirmed later by real use:

    Users at the same timeCPUMemoryDisk
    Up to 102 vCPU4 GB40 GB SSD
    10 to 304 vCPU8 GB80 GB SSD
    30 to 808 vCPU16 GB160 GB SSD
  2. Prepare and lock the server

    Updates, time zone and a firewall that allows only SSH and the web.

    Server preparation (Ubuntu)
    apt update && apt -y upgrade
    timedatectl set-timezone Asia/Dhaka
    ufw allow OpenSSH
    ufw allow 80,443/tcp
    ufw enable
  3. Run Odoo and PostgreSQL in Docker

    Ports are bound to 127.0.0.1: Docker-published ports bypass the firewall, so nothing listens on the public network.

    /odoo/docker-compose.yml
    services:
      db:
        image: postgres:17
        restart: unless-stopped
        environment:
          POSTGRES_USER: ${POSTGRES_USER}
          POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
        volumes:
          - /odoo/postgres:/var/lib/postgresql/data
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d postgres"]
        networks: [odoo-internal]
    
      odoo:
        image: odoo:${ODOO_TAG}
        restart: unless-stopped
        depends_on:
          db: { condition: service_healthy }
        volumes:
          - /odoo/data:/var/lib/odoo          # filestore
          - /odoo/addons:/mnt/extra-addons    # your modules
          - /odoo/config:/etc/odoo
        ports:
          - "127.0.0.1:8069:8069"             # web
          - "127.0.0.1:8072:8072"             # websocket
        networks: [odoo-internal]
    
    networks:
      odoo-internal: { driver: bridge }
  4. Tune the Odoo configuration

    Workers start at (CPU cores Γ— 2) + 1; memory limits stop a heavy report from taking the whole server down.

    /odoo/config/odoo.conf
    [options]
    proxy_mode = True
    list_db = False                 ; hides the database manager
    workers = 5
    max_cron_threads = 1
    gevent_port = 8072
    limit_memory_soft = 2147483648  ; 2 GB per worker, then recycled
    limit_memory_hard = 2684354560
    limit_time_cpu = 600
    limit_time_real = 1200
  5. Put nginx and HTTPS in front

    nginx serves your domain, sends live updates to the websocket port and caches Odoo's static files.

    /etc/nginx/sites-enabled/odoo.conf (excerpt)
    upstream odoo     { server 127.0.0.1:8069; }
    upstream odoochat { server 127.0.0.1:8072; }
    map $http_upgrade $connection_upgrade { default upgrade; '' close; }
    
    server {
      server_name erp.example.com;
      client_max_body_size 200m;
      proxy_read_timeout 720s;
      proxy_set_header X-Forwarded-Host  $host;
      proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
    
      location /websocket {
        proxy_pass http://odoochat;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
      }
      location ~* /web/static/ {
        proxy_cache_valid 200 90m;
        expires 864000;
        proxy_pass http://odoo;
      }
      location / { proxy_pass http://odoo; }
      gzip on;
    }
    Certificate with automatic renewal
    certbot --nginx -d erp.example.com
    certbot renew --dry-run   # proves renewal works
  6. Move your data and check everything

    A fresh database, or your existing one restored with all its files. Then the health check, logins, email, reports and printing are tested.

    Health check
    curl -s https://erp.example.com/web/health
    {"status": "pass"}
  7. Hand over

    You receive a document with every address, password and command, the backup and restore steps, and a call where we walk through the server together.

HOW YOU BENEFIT

What changes for your business

⚑Fast for every user

Workers and caching sized to your team, so screens stay quick at busy times.

πŸ”’Safe by default

Encrypted traffic, a closed firewall and no public database.

πŸ’°Predictable cost

One server bill, no per-user hosting fees.

πŸ”Restarts by itself

After an update or a reboot everything comes back on its own.

πŸ—οΈYou own it

Root access, all passwords and full documentation are yours.

πŸ“ˆRoom to grow

More users or a second database later without starting again.

QUESTIONS

Before you start

Do I need Odoo.sh or a paid hosting panel?

No. Everything runs on a normal Linux server that you rent or own.

Can you move my current Odoo database?

Yes. The database and its files (attachments and images) are moved together and checked after the move.

What do you need from me?

A server (or I help you choose one), your domain's DNS access, and your Enterprise subscription code if you use Enterprise.

Who has access when the work is done?

You do. You receive root access and every password. My access is removed whenever you ask.