Install Dolibarr via apt (.deb package)
Guide to install Dolibarr ERP/CRM on an Ubuntu/Debian VPS or dedicated server via apt and the official .deb package. Apache, MySQL/MariaDB, PHP and setup wizard.
On this page
Your values
Enter them once and the commands in this guide update.
This guide explains how to install Dolibarr ERP/CRM on an Ubuntu or Debian server using apt and the official .deb package (DoliDeb). This method lets apt automatically resolve the dependencies (Apache, MySQL/MariaDB, PHP) and provides a setup wizard during installation.
Order a Server
To host your Dolibarr instance, HostMyServers offers several suitable options:
- Performance VPS - Ideal for small businesses
- NVMe VPS - Excellent value for money
- Eco Dedicated Servers - For deployments with high load
- Performance Dedicated Servers - Maximum performance
Prerequisites
- SSH access as root or user with sudo
- Ubuntu 24.04 LTS or Debian 12 64-bit system
- x64 processor
- Minimum 1 GB RAM (2 GB recommended for Dolibarr + database)
- About 5 GB free disk space (SSD recommended)
- Port 80 (and 443 for HTTPS) accessible
Required Configuration
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 1 GB | 2-4 GB |
| CPU | 1 core | 2 cores |
| Storage | 5 GB SSD | 20 GB SSD |
| Network | 100 Mbps | 1 Gbps |
Connect to the Server
Make sure you are connected to your server before starting. Depending on your environment:
Connect with username and IP (default port)
If the server uses the standard SSH port (22):
ssh user@server_ip_address- user: server login name
- server_ip_address: IP address assigned to your server
Connect with a custom port
If the server uses a different SSH port than 22:
ssh -p port_number user@server_ip_addressConnect with a PEM key
If PEM key authentication is required:
ssh -i /path/to/your/key.pem user@server_ip_addressChoose the method that matches your setup. Once connected, you can continue the installation.
System Update
Update your server before installing Dolibarr:
sudo apt-get update
sudo apt-get upgrade -yDownload the Official .deb Package
Fetch the Debian/Ubuntu package from the official Dolibarr repository. At the time of writing, the latest stable version is Dolibarr 23.0.3.
cd /tmp
wget https://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_23.0.3-4_all.debInstall via apt
Install the package with apt install, prefixing the path with ./. Unlike dpkg -i, apt automatically resolves and installs the dependencies (Apache, MariaDB/MySQL, PHP and extensions):
sudo apt install ./dolibarr_23.0.3-4_all.debSetup Wizard
During installation, a debconf wizard appears and asks several questions. Use the arrow keys, the space bar to tick options and Tab/Enter to confirm.
| Question | Recommended answer |
|---|---|
| Web server to reconfigure automatically | Tick apache2 |
| Configure database with dbconfig-common? | Yes |
| Database administrative user password (MySQL/MariaDB root) | Enter / confirm a strong password |
Application password for the dolibarr database |
Enter a password dedicated to Dolibarr |
If the installation stops on a missing dependency, fix it then restart the configuration:
sudo apt-get install -f -y
sudo dpkg-reconfigure dolibarrAccess the Web Interface
Once the installation is complete, open a browser and go to:
http://server_ip_or_domain/dolibarr/On first access, Dolibarr launches a browser-based installation wizard:
- Environment check (PHP, extensions, write permissions)
- Database connection settings (pre-filled by dbconfig-common)
- Creation of the Dolibarr administrator account (login and password)
- End of installation and access to the dashboard
Firewall Configuration
If UFW is active, open the web ports:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reloadSecure Access with HTTPS
In production, protect access to Dolibarr with an SSL certificate. The simplest method under Apache is Certbot / Let's Encrypt:
sudo apt-get install -y certbot python3-certbot-apache
sudo certbot --apache -d your-domain.comCertbot automatically configures the Apache virtual host and the HTTP → HTTPS redirection.
Useful Commands
| Command | Description |
|---|---|
sudo systemctl restart apache2 |
Restart the web server |
sudo systemctl status apache2 |
Apache status |
sudo systemctl status mariadb |
Database status |
sudo dpkg-reconfigure dolibarr |
Restart the setup wizard |
sudo tail -f /var/log/apache2/error.log |
Follow Apache/PHP errors |
File Structure
| Path | Description |
|---|---|
/usr/share/dolibarr/htdocs/ |
Application source code |
/etc/dolibarr/conf.php |
Main configuration file |
/etc/dolibarr/install.forced.php |
Settings forced during installation |
/var/lib/dolibarr/documents/ |
Documents, generated PDFs, backups and the install.lock file |
/var/log/apache2/error.log |
Web server error log |
Updating Dolibarr
To move to a newer version, download the new .deb package then install it over the existing one — apt handles the migration:
cd /tmp
wget https://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_NEW_VERSION_all.deb
sudo apt install ./dolibarr_NEW_VERSION_all.debOn the first login after an update, Dolibarr may ask you to run a database migration wizard. Follow the suggested steps.
Troubleshooting
"Package not found" when running apt install dolibarr
- The package no longer exists in the repositories: use the official .deb file as described above.
- Make sure you prefix the name with
./or an absolute path.
Dependency errors during installation
- Fix the dependencies:
sudo apt-get install -f -y - Then restart the configuration:
sudo dpkg-reconfigure dolibarr
Cannot access /dolibarr/
- Check that Apache is running:
sudo systemctl status apache2 - Check that the PHP module is active:
sudo apachectl -M | grep php - Consult the log:
sudo tail -f /var/log/apache2/error.log
Database connection error
- Check that MariaDB/MySQL is running:
sudo systemctl status mariadb - Verify the credentials in
/etc/dolibarr/conf.php - Test the connection:
mysql -u root -p -e "SHOW DATABASES;"
The installation wizard no longer appears
- If the
install.lockfile exists, the wizard is locked (normal behavior). To deliberately run it again:sudo rm /var/lib/dolibarr/documents/install.lock(only remove it knowingly).