Applications Azure

Dolibarr ERP CRM on Windows Server 2025 on Azure User Guide

| Product: Dolibarr ERP CRM on Windows Server 2025

Overview

Dolibarr ERP CRM is open source business software for small and medium companies, freelancers and associations. Customers, suppliers and contacts, quotes, orders, invoices and payments, products and stock, projects, agenda, expense reports and many more areas are modules you switch on as you need them, all in one web interface.

This image runs Dolibarr 24.0.4 on Windows Server 2025 Datacenter (Desktop Experience), served by IIS through PHP 8.4 (FastCGI) at https://<your VM>/, with its database in MariaDB 11.4 LTS on the same VM. On the first boot of every VM the image creates this VM's own MariaDB database and passwords, runs Dolibarr's own installer, makes its own Dolibarr administrator password and TLS certificate, and locks the web installer; nothing answers on ports 80 and 443 until that is done. Dolibarr runs under its own IIS application pool identity and MariaDB as its own virtual service account listening on the loopback only, never as LocalSystem. The Windows Server licence is included in the virtual machine price that Microsoft bills; Dolibarr is open source under the GNU GPL v3 or later. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

What is included:

  • Dolibarr ERP CRM 24.0.4 from the official release, in C:\inetpub\dolibarr, served by IIS on the Default Web Site in the application pool Dolibarr (its own ApplicationPoolIdentity)
  • PHP 8.4.28 (NTS x64, FastCGI) in C:\Program Files\PHP, with the extensions Dolibarr uses and OPcache
  • MariaDB Server 11.4.14 LTS in C:\Program Files\MariaDB 11.4, running as NT SERVICE\MariaDB on 127.0.0.1:3306 only, data in C:\ProgramData\MariaDB\data
  • A per-VM Dolibarr admin password, MariaDB passwords and self signed TLS certificate, made at first boot; Dolibarr's web installer locked
  • HTTPS on TCP 443, TCP 80 redirecting to HTTPS, and Windows Firewall rules for both
  • Windows Server 2025 Datacenter, patched with Windows Update at build, Microsoft Defender Antivirus and Windows Firewall on
  • cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours

Prerequisites

An active Azure subscription, a Remote Desktop client, and a virtual network in the target region. Standard_B2ms (2 vCPU, 8 GiB RAM) is a good starting point for a small team; choose a larger size for many concurrent users. In the network security group, allow inbound TCP 3389 (Remote Desktop), TCP 443 (Dolibarr) and TCP 80 (the redirect to HTTPS) from your own address ranges only.

Step 1: Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Dolibarr ERP CRM on Windows Server 2025 by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size, and set the Administrator account username and password. Under Inbound port rules allow RDP (3389), HTTP (80) and HTTPS (443), then narrow each rule's source to your own address range on the Networking tab. Select Review + create, then Create.

Step 2: Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn cloudimg1647283583153:dolibarr-windows-server:default:latest

az vm create \
  --resource-group <your-rg> \
  --name dolibarr \
  --image cloudimg1647283583153:dolibarr-windows-server:default:latest \
  --size Standard_B2ms \
  --admin-username <admin-name> \
  --admin-password '<a strong password>' \
  --public-ip-sku Standard

az vm open-port --resource-group <your-rg> --name dolibarr --port 3389 --priority 1000
az vm open-port --resource-group <your-rg> --name dolibarr --port 443 --priority 1010
az vm open-port --resource-group <your-rg> --name dolibarr --port 80 --priority 1020

az vm open-port opens each port to any address; narrow the rules to your own ranges in the network security group afterwards.

First boot takes a few minutes. When the VM first starts, Windows finishes its setup, then the image creates this VM's database, runs Dolibarr's installer, makes the passwords and the certificate and starts IIS. Until then Dolibarr does not answer on ports 80 and 443. The setup is finished when the file C:\ProgramData\Dolibarr\dolibarr-firstboot.done exists (Step 4).

Step 3: Connect with Remote Desktop

Connect to the VM's public IP address with your Remote Desktop client (on Windows, mstsc; on macOS, Windows App), signing in with the administrator name and password you set at deployment. Open Windows PowerShell as administrator for the commands below.

Step 4: Confirm Dolibarr is running

Get-Content C:\ProgramData\Dolibarr\dolibarr-firstboot.done
Get-Service W3SVC, MariaDB | Format-Table Status, StartType, Name, DisplayName
Get-NetTCPConnection -State Listen -LocalPort 80, 443, 3306 | Format-Table LocalAddress, LocalPort, @{n='Process';e={(Get-Process -Id $_.OwningProcess).ProcessName}}
done 2026-12-01T23:47:50.5530752Z address=20.169.219.126 certificate=09FAE2430199E4D1E7410A6E83D6B39F06F1CD70

 Status StartType Name    DisplayName
 ------ --------- ----    -----------
Running Automatic MariaDB MariaDB
Running Automatic W3SVC   World Wide Web Publishing Service

LocalAddress LocalPort Process
------------ --------- -------
::                 443 System
::                  80 System
127.0.0.1         3306 mysqld

The first line shows when first boot finished. IIS (W3SVC) and MariaDB start automatically with Windows. Ports 80 and 443 belong to System because IIS listens through the Windows HTTP stack; MariaDB listens on 127.0.0.1 only, so it cannot be reached from the network.

Step 5: Read your administrator password

First boot wrote the Dolibarr administrator's login and password, and the MariaDB passwords, to a file that only the SYSTEM account and the Administrators group can read:

Get-Content C:\ProgramData\Dolibarr\dolibarr-credentials.txt
Dolibarr ERP CRM on Windows Server 2025 by cloudimg
Dolibarr: https://20.169.219.126/  (on this VM: https://localhost/)
DOLIBARR_ADMIN_USER=admin
DOLIBARR_ADMIN_PASSWORD=<20 random characters>
MARIADB_DATABASE=dolibarr
MARIADB_USER=dolibarr
MARIADB_PASSWORD=<24 random characters>
MARIADB_ROOT_PASSWORD=<24 random characters>
MariaDB listens on 127.0.0.1:3306 only.
The HTTPS certificate is self-signed and made for this VM: replace it with your own (see the user guide).
Change the admin password in Dolibarr: your name (top right) > Modify > Password (see the user guide).

Above, each password is shown by its length; your file holds the passwords themselves. The Dolibarr login is always admin; every password is random and different on every VM. Keep them somewhere safe, and change the admin password after your first sign-in (Step 7).

Step 6: Sign in to Dolibarr

On your own computer, browse to https://<vm-public-ip>/. The certificate is this VM's own self signed one, so your browser warns about it the first time: accept it to continue (or install a trusted certificate, see Use a trusted certificate below). On the VM itself, Microsoft Edge trusts it and opens https://localhost/ without a warning. http:// addresses redirect to HTTPS.

Dolibarr's sign-in page served by the VM over HTTPS

Sign in as admin with the password from Step 5. Until your company is set up, Dolibarr opens its Setup page, with the two mandatory sections (Company/Organization and Modules/Applications) flagged:

Dolibarr's Setup page after the first sign-in as admin

A wrong password or a blank login is refused. The web installer (/install/) is locked by C:\ProgramData\Dolibarr\documents\install.lock, so nobody can run it again over the web.

Step 7: Set up your company and modules

In Dolibarr, open Home > Setup > Company/Organization and enter your company's name, address, country and currency; then Home > Setup > Modules/Applications and switch on the modules you need (Third parties, Commercial proposals, Customer orders, Invoices, Products, Stock, Projects and so on). Each module adds its own menu at the top.

To change the admin password, open the user menu at the top right, choose Card, then Modify. Create a user for each person who will use Dolibarr under Users & Groups rather than sharing admin.

Step 8: Check the services' identities

Open Internet Information Services (IIS) Manager and select Application Pools. Dolibarr serves the site with No Managed Code (PHP runs through FastCGI) under its own ApplicationPoolIdentity, a low privilege account.

IIS Manager showing the Dolibarr application pool running as its own ApplicationPoolIdentity

The same from PowerShell:

Import-Module WebAdministration
Get-ChildItem IIS:\AppPools | Select-Object Name, State, managedRuntimeVersion, @{n='Identity';e={$_.processModel.identityType}} | Format-Table
Get-CimInstance Win32_Service -Filter "Name='MariaDB'" | Format-List Name, StartName, StartMode, State, PathName
name           state   managedRuntimeVersion Identity
----           -----   --------------------- --------
DefaultAppPool Started v4.0                  ApplicationPoolIdentity
Dolibarr       Started                       ApplicationPoolIdentity


Name      : MariaDB
StartName : NT SERVICE\MariaDB
StartMode : Auto
State     : Running
PathName  : "C:\Program Files\MariaDB 11.4\bin\mysqld.exe" "--defaults-file=C:\ProgramData\MariaDB\data\my.ini"
            "MariaDB"

Windows Server 2025 Server Manager on the VM, with IIS installed

Server Components

Component Version or setting Where
Dolibarr ERP CRM 24.0.4 C:\inetpub\dolibarr\htdocs (the site root), C:\inetpub\dolibarr\scripts
IIS Default Web Site on htdocs, pool Dolibarr (ApplicationPoolIdentity, No Managed Code), PHP through FastCGI C:\Windows\System32\inetsrv
PHP 8.4.28 NTS x64, php.ini from upstream's production settings C:\Program Files\PHP
MariaDB Server 11.4.14 LTS, service MariaDB, NT SERVICE\MariaDB, Automatic, 127.0.0.1:3306 C:\Program Files\MariaDB 11.4, data C:\ProgramData\MariaDB\data
HTTPS TCP 443, this VM's self signed certificate (RSA 2048, private key not exportable) Cert:\LocalMachine\My, friendly name "Dolibarr web server (this VM, cloudimg)"
HTTP TCP 80, redirects to HTTPS Windows Firewall rules in the group Dolibarr
Windows Server 2025 Datacenter, Desktop Experience, build 26100

Filesystem Layout

Path What it holds
C:\inetpub\dolibarr\htdocs\ Dolibarr's code, the site root. Read-only to the web server
C:\inetpub\dolibarr\htdocs\conf\conf.php Dolibarr's configuration (database connection, this VM's instance id). Read-only to the web server; IIS never serves the conf folder
C:\ProgramData\Dolibarr\documents\ Everything users upload and Dolibarr generates (PDF invoices, attachments, logos, install.lock)
C:\ProgramData\Dolibarr\php\ PHP's sessions, uploads in progress, temporary files and error log
C:\ProgramData\MariaDB\data\ The MariaDB database (my.ini is here too)
C:\ProgramData\Dolibarr\dolibarr-credentials.txt This VM's passwords. SYSTEM and Administrators only
C:\ProgramData\Dolibarr\dolibarr-firstboot.log What first boot did (never a password)

Managing the Services

From an elevated PowerShell window:

# restart the web server (after a php.ini or IIS change)
iisreset

# restart the database
Restart-Service MariaDB

To confirm the HTTP redirect, the HTTPS page and this VM's certificate:

Invoke-WebRequest http://localhost/index.php -UseBasicParsing -MaximumRedirection 0 -ErrorAction SilentlyContinue | Format-List StatusCode, @{n='Location';e={$_.Headers.Location}}
Invoke-WebRequest https://localhost/index.php -UseBasicParsing | Select-Object StatusCode
Get-ChildItem Cert:\LocalMachine\My | Where-Object FriendlyName -like 'Dolibarr*' | Format-List Subject, NotAfter, Thumbprint, FriendlyName
StatusCode : 302
Location   : https://20.169.219.126/index.php

StatusCode
----------
       200


Subject      : CN=20.169.219.126
NotAfter     : 12/1/2029 11:47:41 PM
Thumbprint   : 09FAE2430199E4D1E7410A6E83D6B39F06F1CD70
FriendlyName : Dolibarr web server (this VM, cloudimg)

To open the database as root (the password is MARIADB_ROOT_PASSWORD in the credentials file):

& 'C:\Program Files\MariaDB 11.4\bin\mariadb.exe' -u root -p dolibarr

Scheduled Jobs

Dolibarr's scheduled jobs module (Home > Setup > Modules > Scheduled jobs) needs something to call it regularly; the image does not schedule it. Once the module is on, copy the security key from its setup page and add a Windows scheduled task that runs every 5 minutes:

$action = New-ScheduledTaskAction -Execute 'C:\Program Files\PHP\php.exe' -Argument 'C:\inetpub\dolibarr\scripts\cron\cron_run_jobs.php <security key> admin' -WorkingDirectory 'C:\inetpub\dolibarr\scripts\cron'
$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 5)
Register-ScheduledTask -TaskName 'Dolibarr cron' -Action $action -Trigger $trigger -User 'NT AUTHORITY\SYSTEM' -RunLevel Highest

On Startup

At the first start of your VM, the scheduled task cloudimg-firstboot (SYSTEM) runs once:

  1. It keeps IIS stopped and disabled, and waits until Azure has finished setting up the VM
  2. It creates this VM's MariaDB instance (root password, the dolibarr database and its user, on the loopback only) and removes anonymous accounts and the test database
  3. It runs Dolibarr's own installer without the web: it writes conf.php, creates the tables, creates admin with a random 20 character password and locks the installer
  4. It writes C:\ProgramData\Dolibarr\dolibarr-credentials.txt, readable by administrators only
  5. It makes this VM's TLS certificate, named for the VM's public and private addresses, and binds it to port 443
  6. It starts IIS, waits for https://localhost/ to answer, sets IIS and MariaDB to start automatically, writes dolibarr-firstboot.done, then removes itself and its script

If anything fails, IIS stays stopped and disabled and the task tries again at the next start. Every start after that, IIS and MariaDB start with Windows.

Security Recommendations

  • Keep ports 80 and 443 to your own networks. Dolibarr holds your customers, invoices and accounts: open 443 only to the networks your users are on, and prefer a VPN or private network.
  • Change the admin password after your first sign-in, and create named users with only the permissions they need.
  • Keep Dolibarr up to date. New releases are announced at dolibarr.org. Back up first (below), then follow Dolibarr's upgrade notes: replace the files under C:\inetpub\dolibarr\htdocs except conf\conf.php, delete install.lock, run https://localhost/install/ from the VM, then lock it again.
  • Keep the web server read-only. The pool can write only C:\ProgramData\Dolibarr\documents and PHP's run folders; Dolibarr's code and conf.php are read-only to it. A module installed from the web (Deploy/install external app/module) needs write access to htdocs\custom: give IIS APPPOOL\Dolibarr Modify on that folder only while you install, or copy modules in as an administrator.

Use a trusted certificate

First boot's certificate is self signed. To use a certificate for your own DNS name, import it (a .pfx with its private key) into Cert:\LocalMachine\My and bind it to port 443 of the Default Web Site:

$cert = Import-PfxCertificate -FilePath C:\path\to\erp.example.com.pfx -CertStoreLocation Cert:\LocalMachine\My -Password (Read-Host -AsSecureString 'PFX password')
Import-Module WebAdministration
(Get-WebBinding -Name 'Default Web Site' -Protocol https -Port 443).AddSslCertificate($cert.Thumbprint, 'My')

Point your DNS name at the VM's public IP address, then tell Dolibarr its new address: first boot set Dolibarr's URL (the address it redirects HTTP to and builds links in emails from) to https://<the VM's public IP address>. As administrator, open C:\inetpub\dolibarr\htdocs\conf\conf.php in Notepad, change the line $dolibarr_main_url_root='https://<ip>'; to $dolibarr_main_url_root='https://erp.example.com';, save, and browse to https://erp.example.com/.

Maintenance

  • Windows updates: Windows Update is on, as Microsoft ships it. Restarting the VM restarts IIS and MariaDB automatically.
  • Back up your data: Dolibarr keeps its data in two places: the database and the documents folder. Back up both, together with conf.php:
New-Item -ItemType Directory C:\Backup -Force | Out-Null
& 'C:\Program Files\MariaDB 11.4\bin\mariadb-dump.exe' -u root -p --single-transaction --result-file=C:\Backup\dolibarr.sql dolibarr
Compress-Archive -Path C:\ProgramData\Dolibarr\documents, C:\inetpub\dolibarr\htdocs\conf\conf.php -DestinationPath C:\Backup\dolibarr-files.zip -Force

Or use Azure Backup for the whole VM. - Logs: IIS logs are in C:\inetpub\logs\LogFiles, PHP's error log in C:\ProgramData\Dolibarr\php\logs, MariaDB's in C:\ProgramData\MariaDB\data\<computer name>.err, and first boot's in C:\ProgramData\Dolibarr\dolibarr-firstboot.log. - Firewall: Windows Firewall allows 443 and 80 through the rules in the Dolibarr group; the network security group decides who can reach them.

Troubleshooting

Dolibarr does not answer, or dolibarr-firstboot.done is missing

First boot may still be running: give it a few minutes and check again. Its log shows how far it got:

Get-Content C:\ProgramData\Dolibarr\dolibarr-firstboot.log

"Bad value for login or password"

The login is admin (lower case). Copy the password from DOLIBARR_ADMIN_PASSWORD= in C:\ProgramData\Dolibarr\dolibarr-credentials.txt. If you changed the password in Dolibarr, the file still holds the first one.

HTTP redirects to the wrong address

Dolibarr redirects http:// to the URL in $dolibarr_main_url_root in C:\inetpub\dolibarr\htdocs\conf\conf.php, which first boot set to the VM's public IP address. If you reach the VM by a DNS name or another address, change that line (see Use a trusted certificate).

Uploads larger than 100 MB fail

PHP and IIS accept up to 100 MB per request. Raise upload_max_filesize and post_max_size in C:\Program Files\PHP\php.ini and maxAllowedContentLength in the site's request filtering, then run iisreset.

Forgot the Windows password

Use Reset password on the VM's page in the Azure portal.

Support

cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours. Contact support@cloudimg.co.uk.

Dolibarr is a trademark of the Dolibarr Foundation. cloudimg is not affiliated with or endorsed by the Dolibarr Foundation; the software is provided under its open source licence.