WebAdmin UI is not reachable from outside the container

Issue Description

I installed stalwart a few months before. Everything is up and running. Now I wanted to add an email adress, but get an empty reply from calling the admin UI.

Expected Behavior

UI should be accessible from the host

Actual Behavior

UI is accessible only in the stalwart container

Reproduction Steps

I run the interface behind an nginx proxy with the following configuration:

services:
  stalwart-mail:
    image: stalwartlabs/stalwart:latest
    container_name: stalwart-mail
    restart: unless-stopped
    volumes:
      - ./data:/opt/stalwart
      - /var/www/stalwart/mailserver/certs/:/certs/:ro
    ports:
      - "25:25"     # SMTP
      - "465:465"   # SMTPS (SMTP über SSL/TLS)
      - "993:993"   # IMAPS (IMAP über SSL/TLS)
      - "995:995"   # POP3 / TLS
      - "587:587"   # ESMTP (explicit TLS => STARTTLS)
      - "127.0.0.1:8181:8080" # Stalwart Web-Admin-Oberfläche (HTTP)

With nginx I forward requests from https://mysubdomain.xx/ to http://127.0.0.1:8181. This setting worked in the past. Now I get a 502 from Nginx. I tested the following:

docker exec -it stalwart-mail curl localhost:8080

This works and gets Html-Output. Of course I installed Curl first in the container.

From the host I call

curl localhost:8181

This gets me an empty reply:

curl: (52) Empty reply from server

I tried reconfiguring the port to be reachable not only from localhost:

    ports
      ...
      - "8181:8080" # Stalwart Web-Admin-Oberfläche (HTTP)

With the same result. What can I do to make the requests working?

Greetings
mirko

Relevant Log Output

n.a.

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

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

I remember having similar reverse proxy issues (I use Traefik) after upgrading Stalwart from 0.15.x to 0.16.0. This was mainly due to a bug that was fixed in 0.16.1. Also, there are general changes to be aware of if you use a reverse proxy. Have a look at stalwart/UPGRADING/v0_16.md at main · stalwartlabs/stalwart · GitHub

@dvex1091 Thanks a lot for your reply. As far as I can determine without the UI the version of the container image is v0.15.

"Labels": {
	"org.opencontainers.image.created": "2026-02-14T20:20:59.790Z",
	"org.opencontainers.image.description": "All-in-one Mail & Collaboration server. Secure, scalable and fluent in every protocol (IMAP, JMAP, SMTP, CalDAV, CardDAV, WebDAV).",
...
	"org.opencontainers.image.title": "stalwart",
...
	"org.opencontainers.image.version": "v0.15"
},

Stalwart UI only listens on 2 endpoints: /admin and /account. For testing with curl, you might try curl http://localhost:8081/admin/login.