Stalwart just stoppede working

Issue Description

The docker container keerps running but stalwart just stops working, you can’t reach the web page anymore and/or send any mails. there aren’t any errors and restarting the container does not output any logs nor starts the service

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

MySQL

Blob Storage

MySQL

Search Engine

MySQL

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

Here are the most likely causes and how to diagnose them for your MySQL-backed Docker setup:


Most likely causes

1. Stalwart has stopped but the container is still running

The Docker container process is just the wrapper – the stalwart binary itself may have exited silently inside it. Check with:

docker logs stalwart 2>&1 | tail -100

Since all logs go to stdout/stderr in Docker (there is no separate log file), this is the primary place to look. If the logs are empty after restart, the binary may be failing immediately on startup before it can write anything.

2. MySQL connectivity loss

Because all three stores (data, blob, search) and the directory are all MySQL, a lost or refused database connection will effectively halt the server. Common triggers:

  • The MySQL container restarted and Stalwart’s connection pool has stale connections
  • MySQL’s wait_timeout / interactive_timeout dropped idle connections that Stalwart was holding
  • The MySQL container ran out of connections (default pool: min 5, max 10 per store – with 3 stores that’s up to 30 connections)

Check your MySQL logs for “too many connections” or “connection refused” errors.

3. WebUI bundle not downloaded / GitHub unreachable

If the container can’t reach github.com on TCP 443, the WebUI bundle is never fetched and every /admin request returns 404. This wouldn’t prevent mail delivery, but it would look like “the web page is gone.”


Steps to try

  1. Check container logs: docker logs stalwart 2>&1 – look for any panic, error, or MySQL-related messages.
  2. Check if the process is actually alive inside the container: docker exec stalwart ps aux – see if stalwart is listed.
  3. Check MySQL connectivity from within the container: docker exec stalwart mysql -h <host> -u stalwart -p.
  4. Ensure --restart unless-stopped is set on the Stalwart container so it automatically recovers.
  5. If the binary is exiting, run it directly to see the error: docker exec -it stalwart /usr/local/bin/stalwart --config /etc/stalwart/config.json.

The MySQL timeout field (default 15s) and pool settings (poolMinConnections, poolMaxConnections) can be tuned in the WebUI under Settings > Storage > Data Store if connection exhaustion or timeouts are the cause.

Relevant docs: Docker installation | MySQL backend | FAQ

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.