How to Self-Host an Open Source ERP
Self-hosting means running the ERP software on infrastructure you control, whether that is a physical server in your office, a dedicated server in a data center, or a virtual machine on a cloud platform like AWS, DigitalOcean, or Hetzner. The trade-off compared to managed hosting is straightforward: you gain full control over data location, security policies, customization, and costs, while accepting responsibility for server administration, updates, and troubleshooting.
Assess Requirements and Choose a Platform
Before provisioning any hardware, document the specifics of your deployment. Count the number of concurrent users who will access the system daily. Identify which modules you need (accounting, inventory, manufacturing, HR) since each adds processing load. Estimate your data volume by considering how many transactions, products, and records the system will manage.
For a small business with 5 to 20 users running accounting, CRM, and basic inventory, a server with 2 CPU cores, 4 GB RAM, and 50 GB SSD storage is sufficient for ERPNext or Odoo Community. For 20 to 50 users with manufacturing and warehouse modules active, plan for 4 CPU cores, 8 GB RAM, and 100 GB SSD. For 50 to 200 users, allocate 8 or more cores, 16 to 32 GB RAM, and fast storage with room to grow.
Platform choice should align with your technical team's skills. ERPNext uses Python, MariaDB, and Redis, and provides the bench CLI tool that automates much of the administration. Odoo uses Python and PostgreSQL. Dolibarr uses PHP and MySQL, the most widely understood web stack. If your team already manages PHP applications, Dolibarr will feel familiar. If they work with Python, Odoo or ERPNext will be more natural.
Provision Server Infrastructure
For cloud hosting, create a virtual machine on your preferred provider. Ubuntu 22.04 LTS or Debian 12 are the most commonly supported operating systems across all major open source ERP projects. Choose an instance type that matches your sizing assessment from the previous step, and select a region close to your users to minimize latency.
For on-premises hosting, any modern server hardware running a supported Linux distribution will work. Ensure the server has redundant power supplies, ECC RAM for data integrity, and RAID storage for disk failure protection. Place the server on a UPS (uninterruptible power supply) and connect it to your network behind a firewall that restricts incoming traffic to only the ports your ERP needs.
Regardless of hosting location, configure a dedicated block storage volume for the database data directory. Keeping database files on a separate volume from the operating system simplifies backups, makes storage scaling independent of the OS disk, and allows you to use higher-performance storage tiers specifically for database I/O.
Install the Operating System and Dependencies
Start with a clean Ubuntu 22.04 LTS or Debian 12 server installation. Update all packages to current versions with apt update and apt upgrade. Create a non-root user account for running the ERP application, since running application software as root is a security risk.
For ERPNext, the dependencies include Python 3.10 or later, MariaDB 10.6 or later, Redis 6 or later, Node.js 18 LTS, and wkhtmltopdf for PDF generation. The bench tool can install many of these automatically, but having them pre-installed from your distribution's package manager ensures you get security updates through the normal system update process.
For Odoo, install Python 3.10 or later, PostgreSQL 14 or later, and the Python libraries listed in Odoo's requirements.txt. Odoo's apt repository provides packages for Debian and Ubuntu that handle most dependency management automatically.
For Dolibarr, install Apache or Nginx, PHP 8.1 or later with the required extensions (mysql, gd, curl, mbstring, xml, intl), and MySQL 8 or MariaDB 10.6. The standard LAMP stack setup that most hosting tutorials cover is exactly what Dolibarr needs.
Deploy the ERP Application
Each ERP has its own installation method. For ERPNext, install the bench tool via pip, then use bench init to create a new bench directory, bench new-site to create a site, and bench get-app erpnext followed by bench install-app erpnext to install the application. The bench tool manages the Python virtual environment, downloads dependencies, runs database migrations, and configures the application server.
For Odoo, the simplest approach is to add Odoo's official apt repository and install via apt. This creates the system service, configures the database connection, and sets up the default configuration file at /etc/odoo/odoo.conf. Alternatively, clone the Git repository for development-style deployments where you want to modify source code directly.
For Dolibarr, download the latest release, extract it to your web server's document root, and navigate to the installation URL in your browser. The web-based installer guides you through database connection setup, admin account creation, and initial module configuration.
Docker deployment is another option for all three platforms. Official Docker images and docker-compose files are available for ERPNext and Odoo. Docker simplifies deployment and makes it easier to run multiple instances or test upgrades on a separate container before applying them to production.
Configure Security and Networking
SSL encryption is mandatory for any ERP system accessible over a network. Use Let's Encrypt with Certbot to obtain free SSL certificates, and configure automatic renewal. Set up Nginx as a reverse proxy in front of the ERP application server, terminating SSL at the Nginx layer and forwarding requests to the application on localhost.
Configure the system firewall (ufw on Ubuntu, iptables, or nftables) to allow only ports 22 (SSH), 80 (HTTP for Let's Encrypt verification), and 443 (HTTPS). Block all other incoming traffic. If your team accesses the ERP only from the office network, restrict port 443 to your office IP range for an additional layer of protection.
Harden the database by binding it to localhost only (preventing remote database connections), using strong passwords for database users, and limiting database user permissions to only the databases the ERP needs. Disable or remove default database accounts and test databases.
Configure the ERP application's authentication settings. Enable two-factor authentication if the platform supports it (ERPNext and Odoo both do). Set password policies that require minimum length and complexity. Configure session timeouts that automatically log out inactive users. Review the default admin credentials and change them immediately after installation.
Implement Backup and Recovery
ERP data is the operational memory of your business. Losing it means losing financial records, customer information, inventory data, and transaction history. Backup strategy must account for database backups, file storage backups (attachments, uploaded documents), and configuration backups.
For database backups, use the native backup tools for your database engine. MariaDB uses mariadb-dump (or mysqldump) and PostgreSQL uses pg_dump. Schedule these to run daily at minimum, during off-peak hours. For ERPNext, the bench tool includes a bench backup command that creates both database and files backups in a single operation.
Store backups in at least two locations: one local copy on the server for fast recovery, and one off-site copy on a different server, cloud storage bucket (S3, Google Cloud Storage, Backblaze B2), or physical media stored at a different location. Automated backup scripts should compress backups, encrypt them if they leave the server, and rotate old backups to manage storage consumption.
Test your recovery procedure by restoring a backup to a separate test instance at least quarterly. A backup that has never been tested is not a reliable backup. Document the exact commands and steps needed to restore from backup so that any team member with server access can perform recovery in an emergency.
Plan Ongoing Maintenance
Self-hosting means you are responsible for keeping the system updated, secure, and performing well. Establish a regular maintenance schedule that covers operating system security patches (apply monthly at minimum), ERP version upgrades (evaluate each new release for bug fixes and security patches), database maintenance (index optimization, statistics updates, storage monitoring), and log review (application errors, failed login attempts, performance anomalies).
Monitor the server's resource utilization. CPU, memory, disk space, and database connection counts should be tracked with alerts that notify you before resources are exhausted. Free monitoring tools like Prometheus with Grafana, or simpler options like Uptime Kuma for availability monitoring, provide this visibility without additional licensing costs.
Document your server configuration, installed packages, customizations, and maintenance procedures. When the person who set up the server is unavailable, this documentation allows another team member to manage updates and troubleshoot issues. Include the ERP version, database version, operating system version, any custom modules or patches applied, and the backup schedule and storage locations.
Self-hosting an open source ERP is well within reach for any organization with basic Linux administration skills. The critical success factors are proper server sizing, consistent security maintenance, reliable automated backups with tested recovery, and documentation that does not live only in one person's head.