Getting `Unknown cliend id` for fresh setup

Issue Description

After setting up the server I’m getting Unknown client id.

Expected Behavior

Login works

Actual Behavior

Getting Unable to continue with the hint Unknown client id.

Reproduction Steps

  1. Start a new container with empty volumes:
sudo podman run -d --init --rm --name stalwart \
  -p 127.0.0.1:8080:8080 \
  -e STALWART_PUBLIC_URL=http://0.0.0.0:8080 \
  -v stalwart-etc:/etc/stalwart \
  -v stalwart-data:/var/lib/stalwart \
  stalwartlabs/stalwart:v1
  1. Enter the credentials from the logs
  2. Change the following settings from the setup (I didn’t change any other setting):

“Step 1 of 5”:

  • Server Hostname: mail.test.org
  • Default email domain: test.org
  • Automatically Obtain TLS Certificate: false

“Step 4 of 5”:

  • Log Destination: Console
  1. Then press Finish setup
  2. Save the generated [email protected] with its password somewhere
  3. Restart the container sudo podman restart stalwart
  4. Reopen (or refresh) the login screen.
  5. Enter [email protected]

Relevant Log Output

2026-10-27T06:50:17Z DEBUG Authentication failed (auth.failed) listenerId = “http”, localPort = 8080, remotePort = 34670, causedBy = Authentication error (auth.error) { reason = “Failed to decode token. If you are using an external OIDC provider, make sure it is configured as the default directory under the Authentication object.”, causedBy = “crates/common/src/auth/oauth/token.rs:172”, details = “sw1.RkdIMC_unLedPMRBnCEO7hPX8vk0jqt-zGYI2xUlSLYA6cAgKzLQey0qzMfxhxcSpVRcwOVGgA.YWRtaW4” }, remoteIp = 10.88.0.1

Stalwart Version

v1.x

Installation Method

Docker

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

Additional Context

I also tried to login in /admin and /account. However, both returned the same error.

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

The Unknown client id error comes from the address you’re opening the WebUI on. It isn’t caused by your account or setup choices.

The WebUI signs in through Stalwart’s built-in OAuth server. That server only accepts the WebUI as a first-party client on certain addresses:

  • the server’s public HTTPS address
  • the hostnames of its JMAP, CalDAV, CardDAV and WebDAV services

If you open the WebUI on a plain HTTP listener (port 8080), by IP address, or on any other hostname, sign-in fails with Unknown client id. Your setup does both of those things. It uses http://0.0.0.0:8080, and you turned off automatic TLS. After you finished the wizard, the server expects the hostname you entered (mail.test.org) over HTTPS.

The Failed to decode token line in your log is probably a side effect of the same failed sign-in.

Things to try:

  • Reach the server by its configured hostname over HTTPS. For a local test, point mail.test.org at the server (for example in /etc/hosts), serve valid TLS for it, and open https://mail.test.org/admin. Either terminate TLS yourself with a certificate, or put a reverse proxy in front.
  • If you use a reverse proxy, check the reverse proxy docs for the settings that make the proxied address match the public URL.
  • While TLS isn’t working yet, recovery mode accepts the WebUI on any address. You can use it to fix the configuration.

Docs:

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

Ah, nice hint with the section: https://stalw.art/docs/faq/installation/#why-does-webui-sign-in-fail-or-loop-when-i-open-it-by-ip-address

Thanks!