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.
The problem and solution are clearly documented. Here is a summary:
The WebUI is not bundled inside the Docker image. On first start, Stalwart downloads the WebUI bundle from https://github.com/stalwartlabs/webui/releases/latest/ over outbound HTTPS. If your Docker host has no internet access, that download fails and /admin and /account both return 404 Not Found.
The documented workaround for air-gapped / restricted-egress deployments is:
Stage it on an internal HTTPS server that your Docker container can reach (e.g. a local Nginx serving the file, or an object-storage bucket on your LAN).
Update the resourceUrl field on the built-in WebUI Application record to point at that internal URL. You can do this via the JMAP API or via the CLI once the server is running:
In the WebUI (if you can get it running first): Settings > Web Applications > edit the record.
Via CLI / JMAP x:Application/set with "resourceUrl": "https://your-internal-server/webui.zip".
Optionally, set autoUpdateFrequency to a very large value (e.g. "3650d") so it never tries to phone home again.
The unpackDirectory field on the Application record also lets you control where the bundle is unpacked, so you could even bind-mount a pre-unpacked directory into the container as a volume if you prefer a fully offline approach.