|
How to Install & Run Stalwart Mail Server as a Windows Service with AlwaysUp |
Automatically start Stalwart Mail Server in the background whenever your computer reboots and keep it running 24/7. No need to log in first
Last Updated on May 11, 2026
Stalwart Mail Server offers a modern, scalable way to handle your own email.
To install Stalwart Mail Server as a Windows Service with AlwaysUp:
-
Install Stalwart Mail Server, if necessary.
Grab the latest zip file,
deploy it to a folder of your choice set up your installation.
For this tutorial, we placed the server's files in "C:\Stalwart Mail". Your folder may be different.
After you're done installing, ensure that you can open the Stalwart administrative console in your browser:
Log in and make sure everything looks good.
-
Next, download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to the Stalwart Mail Server executable, stalwart-mail.exe.
That path is "C:\Stalwart Mail\bin\stalwart-mail.exe" on our system.
-
In the Arguments field, you should point the mail server to you configuration (*.toml) file. Enter:
--config="[PATH TO CONFIG FILE]"
For example, we'll enter --config="C:\Stalwart Mail\etc\config.toml" for our server. Your value should be similar.
Be sure to put quotes around the configuration file path if it contains a space!
-
In the Start the application field, choose Automatically, but shortly after the computer boots.
This option instructs Windows to launch Stalwart Mail Server a couple of minutes after your computer boots — after
all the machine's critical services are ready.
-
In the Start in directory field, enter the full path to your "root" Stalwart Mail folder — the one containing the
standard etc, logs and data sub-folders. That's "C:\Stalwart Mail" on our system.
-
And in the Name field, enter the name that you will call the application in AlwaysUp.
How about Stalwart Mail Server? Otherwise, you can specify another name if you like.
-
Switch to the Logon tab and enter the user name and password of your Windows account.
It's best to run the mail server in an account where you know it works:
-
We're done configuring Stalwart Mail Server as a Windows Service so click the Save button to record your settings.
In a couple of seconds, an application named Stalwart Mail Server (or whatever you called it) will show up in the AlwaysUp window.
It is not yet running though so its state will be "Stopped":
-
To start Stalwart Mail Server from AlwaysUp, choose Application > Start "Stalwart Mail Server".
In a few seconds, the status will change to "Running" and Stalwart Mail Server will be chugging away, invisibly in the background:
At this point, please open your favorite browser and check that you can connect to Stalwart Mail Server's web console (http://localhost:8080) normally.
Everything was working well on our machine:
-
That's it! Next time your computer boots, Stalwart Mail Server will start up immediately, in the background,
without anyone needing to log on.
Please restart your computer now and test that everything works as expected after Windows returns to life.
And please feel free to edit Stalwart Mail Server in AlwaysUp and explore the many other settings that may
be appropriate for your environment.
For example, you can:
Stalwart Mail Server not working properly as a Windows Service?
Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a Windows Service.
From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and Stalwart Mail Server. The AlwaysUp Event Log Messages page explains the more obscure messages.
Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
Contact us and we will be happy to help!
|
Over 97,000 installations, and counting!
|
 |
|
Rock-solid for the past 20+ years!
|
Fully Compatible with 160+ Applications...
|