For small businesses, an Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) system like Odoo can be a huge competitive advantage. But hosting and maintaining such a complex application — complete with PostgreSQL databases, Python environments, and Node dependencies — can be daunting for teams without a dedicated system administrator.
That's where Cloudron comes in. Cloudron is a platform that simplifies app deployment to just a few clicks while automatically handling backups, SSL certificates, updates, and user management via LDAP.
This post walks you through our journey of building a custom Cloudron package for Odoo 19 Community Edition and shows you how you can use it to get your own instance running seamlessly.
The Challenge
Cloudron operates on a strict security model: applications run in isolated containers with read-only filesystems. The only writable directories are /app/data (for persistent storage) and /run / /tmp.
Odoo, by default, expects a lot of freedom. It wants to write to filestores, it has complex database initialization procedures, and it usually connects to a standard host-level PostgreSQL database.
Our goal was to bridge these two worlds: packaging Odoo 19 into a standalone Docker container that plays by Cloudron’s rules, while fully supporting Odoo features like custom addons and database restores.
The Development Process
Building this package was a very iterative process. Here are the key hurdles we overcame to make Odoo Cloudron-native:
- Internal Database Management: Cloudron’s managed PostgreSQL addon enforces strict permissions, but Odoo expects to create its own users and databases on the fly. To solve this, we used
supervisordto run a self-contained PostgreSQL 16 instance inside the Odoo container, running purely over local Unix sockets/TCP. - Filesystem Permissions: Since
/app/datais owned by thecloudronuser, running PostgreSQL as the rootpostgresuser caused immediate permission crashes. Our startup script (start.sh) now initializes the data directories as root, correctly sets ownership tocloudron, and then usesgosuto drop privileges before launching the database. - Dynamic Configuration: Cloudron dynamically assigns resources. We created an
odoo.conf.templatethat the startup script reads on every boot, interpolating the correct local database parameters and hardcoding thedata_dirstrictly to the writable/app/datapath. - Custom Addons via Localstorage: A major feature of Odoo is the community addon ecosystem. We mapped Odoo's
addons_pathto include/app/data/addons. This means you can upload custom modules via SFTP or the Cloudron File Manager, and they survive app restarts and are included in Cloudron's nightly backups. - Sentinel Database Restores: Migrating to a new server is historically painful. We built a "sentinel file" pattern into the boot sequence: if you upload a
database.dumpfile to/app/data/restore/, the startup script detects it, automatically drops the old database, restores your data, copies your filestore, and cleans up the files.
How to Deploy Odoo on Cloudron
Want to host this yourself? There are two ways to deploy it.
Option 1: Quick Install (App Store)
You can install this app directly to your Cloudron server via the Custom App Store feature without touching a command line:
- Open your Cloudron Dashboard and go to the App Store.
- Click the gear icon in the top right and select Add Custom App.
- Paste our manifest URL:
https://raw.githubusercontent.com/CombinedTurtle/Odoo-Cloudron/main/CloudronVersions.json - Click Install. Cloudron will automatically download the pre-built Docker image.
Option 2: Build from Source
You’ll need the Odoo 19 Community source code and Docker installed on your machine. Using the Dockerfile and CloudronManifest.json from our repository:
# Build the image targeting Cloudron's required amd64 architecture
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t sentientlemon/odoocommunity:1.0.0 .
# Push it to your registry
docker push sentientlemon/odoocommunity:1.0.0
Step 2: Install via Cloudron CLI
With the image pushed, use the Cloudron Command Line Interface to deploy it to your server:
cloudron install --image sentientlemon/odoocommunity:1.0.0 --location erp.yourdomain.com
Cloudron will pull the image, configure NGINX reverse proxies, provision SSL certificates from Let's Encrypt, and start the container.
Step 3: Log In and Configure
Navigate to https://erp.yourdomain.com. On your first visit, Odoo will take a moment to initialize the underlying database structure.
Once the login screen appears, use the default credentials:
- Email:
admin - Password:
changeme
(Make sure to go to Settings > Users immediately and change this password!)
Step 4: Add Custom Functionality
To install custom modules specific to your business:
- Open the Cloudron dashboard and click the File Manager icon for your Odoo app.
- Navigate to
addons/(which maps to/app/data/addons). - Upload your custom module folder.
- Restart the app in the Cloudron dashboard, then go to the "Apps" menu in Odoo and click "Update Apps List".
Conclusion
By wrapping Odoo inside a tailored Docker container with intelligent startup scripts, small businesses can now leverage the incredible power of Odoo ERP while relying on Cloudron to handle the heavy lifting of server administration, backups, and security.
The result is a resilient, self-contained business engine that you have total control over—without needing to be a DevOps engineer.