oCoreoCore Docs

Instances

Odoo instance lifecycle, container management, ports, and configuration

An instance in oCore is a running Odoo application deployed as a Docker container on a managed server. Each instance has its own database, network ports, and configuration, and can be independently started, stopped, restarted, and scaled.

How instances work

Each Odoo instance runs as an isolated Docker container on a managed server. oCore handles:

  • Container lifecycle -- Creating, starting, stopping, restarting, and removing containers
  • Database provisioning -- Creating a dedicated PostgreSQL database for each instance
  • Port allocation -- Assigning unique network ports for the Odoo web interface, longpolling, and development tools
  • Configuration -- Managing the Odoo configuration file (odoo.conf) with the correct database, port, and module settings
Loading diagram...

Instance lifecycle

Loading diagram...
StatusDescription
CreatingDocker image being pulled, database being created, container being started
RunningInstance is healthy and serving requests
StoppedContainer is stopped, database preserved, can be restarted
RestartingContainer is being restarted (e.g., after config change)
FailedCreation or startup failed (check deployment logs)
RemovingInstance being cleaned up asynchronously

Stopping an instance preserves its database and configuration. You can restart a stopped instance at any time without data loss. Only deleting an instance removes its data.

Odoo configuration

Each instance can be configured with:

SettingDescriptionDefault
Odoo versionThe Odoo release version (e.g., 17.0, 16.0)Latest stable
EditionCommunity (free) or Enterprise (requires license)Community
WorkersNumber of Odoo worker processes for request handlingAuto (based on CPU)
Max memoryMaximum memory per worker process (soft limit)2048 MB
DB filterDatabase name filter for multi-database setupsInstance database
Custom modulesPath to custom Odoo modules from Git repositoryNone

Odoo editions

  • Community -- The open-source edition of Odoo, free to use. Includes core modules (CRM, Sales, Inventory, Accounting, etc.) and the standard web client.
  • Enterprise -- The proprietary edition with additional modules (Studio, IoT, Quality, etc.) and the enterprise web client. Requires a valid Odoo license subscription.

Port allocation

Each instance receives three network ports on the host server:

PortPurposeExample
Base portOdoo web interface10000
Base + 1Longpolling (live chat, real-time notifications)10001
Base + 2Mailpit (development email testing)10002

Ports are allocated sequentially with a gap of 10 between instances. The first instance on a server gets ports 10000-10002, the second gets 10010-10012, and so on.

Ensure the allocated ports are not blocked by the server's firewall. If you are using a reverse proxy, configure it to forward traffic to the correct ports.

Container management

oCore manages Odoo containers through Docker on the target server via SSH. Available operations:

Start / Stop / Restart

  • Start -- Starts a stopped container. The database is preserved from the previous run.
  • Stop -- Gracefully stops the container (SIGTERM, then SIGKILL after timeout). Database connections are closed cleanly.
  • Restart -- Stops and starts the container. Useful after configuration changes or module updates.

Logs

Container logs (stdout/stderr from Odoo) are accessible through the dashboard. Logs include:

  • Odoo startup messages
  • Module loading and upgrade output
  • Request logs (when --log-level=info)
  • Error tracebacks and warnings

Shell access

For advanced debugging, you can access a shell session inside the Odoo container through the oCore SSH gateway. This provides direct access to the Odoo filesystem, configuration files, and the Odoo shell.

Database management

Each instance has a dedicated PostgreSQL database. oCore manages:

  • Creation -- Automatic database provisioning when the instance is created
  • Backups -- Scheduled and on-demand database backups (see Deployments for pre-deploy snapshots)
  • Restoration -- Restore from a backup to roll back changes
  • Duplication -- Clone an instance's database for testing purposes

Resource limits

oCore can enforce resource limits on instances to prevent a single Odoo installation from consuming all server resources:

  • CPU shares -- Relative CPU priority between containers
  • Memory limit -- Hard limit on container memory usage
  • Worker count -- Number of Odoo worker processes (directly affects CPU and memory usage)

As a guideline, each Odoo worker process consumes approximately 150-300 MB of RAM. A server with 4 GB RAM can comfortably run 2-3 instances with 2-4 workers each.

Further reading

Was this page helpful?