Mark Kaharo

Jul 05, 2025 • 3 min read

🚀 Setting Up Odoo 17 Community on a Production-Ready Debian Server

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.


🧾 Overview

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:

👉 blackpaw-infra GitHub repo

This article walks you through the essentials of the setup, including security best practices, installation steps, and addon deployment.


✅ Why This Setup?

  • 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.


🛠️ Step 1: Initial Server Setup (Debian 11)

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 ubuntu with debian where relevant.


🔐 Step 2: Harden SSH with Key-Based Login

Avoid brute-force risks by using key-based login:

📄 SSH Key Setup Guide

Once you set this up, disable password authentication entirely in /etc/ssh/sshd_config:

PasswordAuthentication no

🐍 Step 3: Odoo Installation (Automated)

I’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.

📁 Script: odoo_setup.sh

Located in:

/assets/scripts/odoo_setup.sh

Run 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


🌍 Step 4: Accessing Odoo

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)


📦 Step 5: Installing Community Modules

Adding your own or third-party addons is easy:

  1. Copy the module from your local machine:

scp Downloads/MY_MODULE.zip USERNAME@VM_IP:/home/USERNAME/ 
  1. Unzip it into Odoo’s custom addons directory:

sudo apt install unzip  # if needed
unzip MY_MODULE.zip -d /opt/odoo/addons
  1. Restart the Odoo service:

sudo systemctl restart odoo
  1. In Odoo:

    • Enable Developer Mode

    • Go to Apps → Update App List

    • Search & Install your new module


🔄 What’s Next?

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


💡 Final Thoughts

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


🙋‍♂️ Questions or Improvements?

I’m always open to feedback and improvements—DM me on Peerlist or open a PR.

Join Mark on Peerlist!

Join amazing folks like Mark and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

0

5

0