Let me look up the documentation on WebUI installation and configuration.
This is a two-part problem, and the fix depends on whether you can still authenticate via the JMAP API (e.g. with stalwart-cli or curl).
What happened
The WebUI is not bundled with the Stalwart binary. It’s a hosted Application object that gets downloaded from GitHub and unpacked to a local directory. The unpackDirectory field on the Application record defaults to /tmp when left empty – and /tmp is typically cleared on reboot or daily by the OS. That’s exactly your situation: the bundle got wiped and nothing re-downloaded it because autoUpdateFrequency defaults to 90d.
The fix: update the unpackDirectory and force a re-download
You need to do two things:
1. Set a persistent unpackDirectory
Update the WebUI Application record to use a stable path (e.g. /var/lib/stalwart/webui) instead of the default /tmp. Do this via the JMAP API using curl (replace YOUR_TOKEN, YOUR_APP_ID, and mail.example.com):
First, find the Application ID:
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [["x:Application/get", {}, "c1"]],
"using": ["urn:ietf:params:jmap:core", "urn:stalwart:jmap"]
}'
Then update it (replace YOUR_APP_ID with the id from above):
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [["x:Application/set", {
"update": {
"YOUR_APP_ID": { "unpackDirectory": "/var/lib/stalwart/webui" }
}
}, "c1"]],
"using": ["urn:ietf:params:jmap:core", "urn:stalwart:jmap"]
}'
Make sure that directory exists and is writable by the stalwart service user:
mkdir -p /var/lib/stalwart/webui
chown stalwart:stalwart /var/lib/stalwart/webui
2. Force an immediate re-download
Trigger an UpdateApps action via the JMAP API:
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [["x:Action/set", {
"create": { "new1": { "@type": "UpdateApps" } }
}, "c1"]],
"using": ["urn:ietf:params:jmap:core", "urn:stalwart:jmap"]
}'
This instructs the server to immediately re-download the WebUI bundle from https://github.com/stalwartlabs/webui/releases/latest/ and unpack it to the new persistent directory. After that, /admin and /account will be back up.
If you can’t get a token (because you have no WebUI and no prior token), you can also use stalwart-cli if it’s installed on the server – it can authenticate directly. Let us know and a community member can help with those specific CLI commands.
References: WebUI overview · Application object reference · Application updates
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.