Issue Description
I am trying to install Stalwart 0.16 on updated Windows Server Standard 2019 Vanilla installation. I have followed the steps and created the service and configurations and directories, however on first start of the service I am presented with the following error in powershell:
PS C:\Users\Administrator> Start-Service Stalwart
Start-Service : Failed to start service ‘Stalwart Mail Server (Stalwart)’.
At line:1 char:1
- Start-Service Stalwart
-
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
I have tried deleting all entries and starting again, but yields the same result. The log files are also empty.
Expected Behavior
The Service to start and WebUI available for initial configuration.
Actual Behavior
Service Starts in a paused state and Power shell reports the following:
PS C:\Users\Administrator> Start-Service Stalwart
Start-Service : Failed to start service ‘Stalwart Mail Server (Stalwart)’.
At line:1 char:1
- Start-Service Stalwart
-
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
Stalwart Version
v0.16.x
Installation Method
Binary (Windows)
Database Backend
RocksDB
Blob Storage
Filesystem
Search Engine
Internal
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on
Let me look into Windows installation documentation and any known issues.
The service failing to start with empty logs strongly suggests the NSSM service was not configured correctly, particularly the --config argument pointing to the config file. Here are the most likely causes and how to diagnose/fix them:
1. Missing or incorrect --config argument in NSSM
The NSSM Application tab must have:
- Path:
C:\Program Files\Stalwart\bin\stalwart.exe
- Startup directory:
C:\Program Files\Stalwart
- Arguments:
--config "C:\Program Files\Stalwart\etc\config.json"
If the --config argument is missing or points to a non-existent file, the process will exit immediately before writing any logs.
2. NSSM I/O tab not configured – that’s why logs are empty
The service logs go to stdout.log / stderr.log only if NSSM’s I/O tab is set up. If those fields are blank, you get no output and no clue about the failure. Re-open NSSM and set:
- Output (stdout):
C:\Program Files\Stalwart\logs\stdout.log
- Error (stderr):
C:\Program Files\Stalwart\logs\stderr.log
Then try starting again and check those files for the actual error message.
3. Verify the NSSM service configuration
You can inspect what NSSM has stored by running:
& "C:\Program Files\Stalwart\bin\nssm.exe" dump Stalwart
This prints every configured parameter, so you can confirm the path and arguments are correct.
To recap the correct setup flow from the docs:
- Create the four directories (
bin, etc, data, logs)
- Place
stalwart.exe in bin
- Run
nssm.exe install Stalwart and fill in all three tabs (Application, I/O, Details)
Start-Service Stalwart
- Read
stderr.log for the bootstrap admin credentials
The official Windows installation guide is at: Windows | Stalwart
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
I can confirm that the recommended actions in this post dont yeild any better results.
The empty log files are the clue here: when Stalwart fails this early it hasn’t opened
its log files yet, so the actual error is going to stderr and you’re not capturing it.
The PowerShell message is just the service manager noticing the process exited before
it reached Running.
Run the binary directly from an elevated console with your config
(stalwart.exe --config C:\path\to\config.json) and read what it prints; that will show
the real cause, which is usually a config path that doesn’t exist or a data directory
the service account can’t write. If you set the service up by hand rather than with
NSSM, that’s also likely why there’s no output: the install guide uses NSSM with stderr
redirected to a file for exactly this reason. Paste the stderr output and I can tell you
what’s failing.