By Mark Carlton — Backend Engineer | Cloud Architect
If you're deploying Odoo for a client or your own SME use case, getting it running securely and reliably is more important than just “making it work.” Here's how I set up a fully functional, production-grade Odoo 17 Community Edition instance on Debian 11 using a clean, automated, and secure approach.
Odoo is an open-source business suite covering everything from CRM and accounting to inventory and manufacturing. While its Community Edition is free, its setup can be non-trivial, especially if you want a maintainable and secure production server.
I’ve put together a full guide and automation script, now open-source here:
This article walks you through the essentials of the setup, including security best practices, installation steps, and addon deployment.
Production-ready: Hardened, stable, and minimal install.
Secure: Disables password SSH logins and uses a non-root sudo user.
Automated: Installs Odoo Community Edition 17 via a single script.
Extensible: Supports custom community modules.
Start with a fresh VM on your provider of choice (I use DigitalOcean and GCP). Follow this guide to:
Add a non-root sudo user
Set up UFW (firewall)
Ensure password authentication is disabled via SSH
📄 DigitalOcean Initial Setup Guide
Debian users: Replace
ubuntuwithdebianwhere relevant.
Avoid brute-force risks by using key-based login:
Once you set this up, disable password authentication entirely in /etc/ssh/sshd_config:
PasswordAuthentication noI’ve written a script that does all the heavy lifting—installing dependencies, creating the odoo user, configuring PostgreSQL, and setting up Odoo as a systemd service.
odoo_setup.shLocated in:
/assets/scripts/odoo_setup.shRun it with:
chmod +x ./assets/scripts/odoo_setup.sh ./assets/scripts/odoo_setup.sh 🧠 The script sets up:
Python 3 and pip
PostgreSQL (with odoo user)
Odoo 17 Community from source
Custom addons folder
systemd service for Odoo
Log rotation and permissions
Once the script completes, your server should be ready:
http://YOUR_SERVER_IP:8069
First login credentials:
Email: admin
Password: (you'll set this during setup)
Adding your own or third-party addons is easy:
Copy the module from your local machine:
scp Downloads/MY_MODULE.zip USERNAME@VM_IP:/home/USERNAME/ Unzip it into Odoo’s custom addons directory:
sudo apt install unzip # if needed
unzip MY_MODULE.zip -d /opt/odoo/addonsRestart the Odoo service:
sudo systemctl restart odooIn Odoo:
Enable Developer Mode
Go to Apps → Update App List
Search & Install your new module
You could easily:
Set up a reverse proxy with SSL (e.g., using Nginx + Certbot)
Use Docker for encapsulated dev/staging environments
Create backups + monitoring via cron or Prometheus exporters
Odoo is powerful—but with power comes the need for clean architecture and a production mindset. This setup is ideal if you're a developer deploying Odoo for a client or managing multiple SME installations.
Feel free to fork and contribute to the repo:
📦 https://github.com/CarltonK/blackpaw-infra
I’m always open to feedback and improvements—DM me on Peerlist or open a PR.
0
5
0