EN

Applications

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.

6 min read, updated on 18 November 2026

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:

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):

Terminal
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:

Terminal
ssh -p port_number user@server_ip_address

Connect with a PEM key

If PEM key authentication is required:

Terminal
ssh -i /path/to/your/key.pem user@server_ip_address

Choose the method that matches your setup. Once connected, you can continue the installation.

System Update

Update your server before installing Dolibarr:

Terminal
sudo apt-get update
sudo apt-get upgrade -y

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

Terminal
cd /tmp
wget https://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_23.0.3-4_all.deb

Install 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):

Terminal
sudo apt install ./dolibarr_23.0.3-4_all.deb

Setup 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:

Terminal
sudo apt-get install -f -y
sudo dpkg-reconfigure dolibarr

Access the Web Interface

Once the installation is complete, open a browser and go to:

Text
http://server_ip_or_domain/dolibarr/

On first access, Dolibarr launches a browser-based installation wizard:

  1. Environment check (PHP, extensions, write permissions)
  2. Database connection settings (pre-filled by dbconfig-common)
  3. Creation of the Dolibarr administrator account (login and password)
  4. End of installation and access to the dashboard

Firewall Configuration

If UFW is active, open the web ports:

Terminal
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

Secure Access with HTTPS

In production, protect access to Dolibarr with an SSL certificate. The simplest method under Apache is Certbot / Let's Encrypt:

Terminal
sudo apt-get install -y certbot python3-certbot-apache
sudo certbot --apache -d your-domain.com

Certbot 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:

Terminal
cd /tmp
wget https://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_NEW_VERSION_all.deb
sudo apt install ./dolibarr_NEW_VERSION_all.deb

On 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.lock file exists, the wizard is locked (normal behavior). To deliberately run it again: sudo rm /var/lib/dolibarr/documents/install.lock (only remove it knowingly).

References