Skip to content

Installing hMailServer

chrisholloway5 edited this page Sep 8, 2026 · 33 revisions

Installing hMailServer

This page began as a chapter of the 6.2.10 manual and has been corrected for 6.2.24. The Control Panel's pages are grouped differently now, so the paths below use today's groups; the TLS ports 465, 993 and 995 exist only after you create them on the TCP/IP ports page (a fresh install seeds 25, 587, 110 and 143); and everything added since 6.2.10 is in Changes Since 6.2.10. Where a value here disagrees with the Settings Reference, which is generated from the code, the reference is right.

4.1 Download

Get hMailServer-6.2.27-x64.exe from the releases page.

Each release also carries SBOM files (hmailserver.spdx.json, hmailserver.cyclonedx.json) — a full inventory of every component in the build, for anyone who needs to audit their supply chain. You do not need them to install.

4.2 Run the installer

Right-click the installer and choose Run as administrator.

Work through the wizard:

1. Licence agreement. hMailServer is AGPL-3.0. In short: you may use it freely, including commercially; if you modify it and offer it to others over a network, you must publish your changes.

2. Destination folder. The default C:\Program Files\hMailServer is fine.

3. Components. This page matters, so read it:

Component Take it? What it does
Server Yes The mail server itself. Everything else is optional.
Control Panel Yes The administration application. Without it you have no GUI.
Remote administration support Only if scripting from another machine Registers the COM API so scripts on a different machine can administer this server. The Control Panel does not need it — it connects to remote servers by itself.

Note for upgraders: "Administrative tools" in older versions bundled the classic Administrator and a PHP web interface. Both are gone (see chapter 25). The component now does only what it always really did — register the COM type library for scripts.

4. Database type. Choose Use built-in database server (Microsoft SQL Compact) unless you decided otherwise in §3.5.

5. Administrator password. hMailServer asks you to set a password for the administration interface. This is not an email password — it is the master password for the whole server.

Use a long, unique password and store it in a password manager. Anyone with it owns every mailbox on the server.

6. Install. The installer copies files, creates the database, registers the hMailServer Windows service and starts it. If the .NET 10 Desktop Runtime is missing it is installed silently — this is what the Control Panel needs to run.

4.3 Confirm it is running

Open Services (services.msc) and find hMailServer. It should say Running, startup type Automatic.

Or from PowerShell:

Get-Service hMailServer
Status   Name          DisplayName
------   ----          -----------
Running  hMailServer   hMailServer

4.4 Open the Windows Firewall

The installer does not open firewall ports for you. Until you do, nothing can reach your server. Run this in an elevated PowerShell:

New-NetFirewallRule -DisplayName "hMailServer SMTP"        -Direction Inbound -Protocol TCP -LocalPort 25  -Action Allow
New-NetFirewallRule -DisplayName "hMailServer Submission"  -Direction Inbound -Protocol TCP -LocalPort 587 -Action Allow
New-NetFirewallRule -DisplayName "hMailServer IMAP"        -Direction Inbound -Protocol TCP -LocalPort 143 -Action Allow
New-NetFirewallRule -DisplayName "hMailServer IMAPS"       -Direction Inbound -Protocol TCP -LocalPort 993 -Action Allow
New-NetFirewallRule -DisplayName "hMailServer POP3"        -Direction Inbound -Protocol TCP -LocalPort 110 -Action Allow
New-NetFirewallRule -DisplayName "hMailServer POP3S"       -Direction Inbound -Protocol TCP -LocalPort 995 -Action Allow

Your router or cloud firewall needs the same ports forwarded to this machine.

4.5 Unattended install

The installer is Inno Setup, so the standard switches apply: /SILENT or /VERYSILENT, /SUPPRESSMSGBOXES, /LOG="<path>", /DIR="<path>" and /COMPONENTS="server,admintools,controlpanel". Two switches are this installer's own: /useinternaldbms=true|false (true, the default, uses the bundled SQL Server Compact database; false when pointing at an existing MySQL, MariaDB, PostgreSQL or MS SQL server) and /adminpassword=<password>, which sets the administrator password the wizard page would have asked for (at least five characters). Without it the password is left unset, and the REST API refuses to start until one is set.

hMailServer-6.2.27-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /LOG="C:\Temp\hmail-install.log" ^
   /COMPONENTS="server,controlpanel" /useinternaldbms=true /adminpassword=<password>

The installer checks that the database tool ran and its exit code, so a failed database create or upgrade cannot report a successful install. Use /LOG; it is the only record of what happened.


Home — full index

Start here

1. Install and run

2. Secure it

3. Operate it

4. Extend it

5. Contribute to it

Look it up — from any journey


About this wiki

Clone this wiki locally