Issue Description
- The WebUI is reached over HTTPS on the configured hostname only. The OAuth, OIDC, and JMAP discovery documents
v0.16publishes usehttps://<defaultHostname>/...exclusively in normal mode. Loading the WebUI by IP address, by container name, or over plain HTTP (for examplehttp://192.168.1.10:8080/admin) will appear to load the sign-in page but will fail at the OAuth callback. Use the same hostname that was entered in Step 1 of the wizard, or that already lives ondefaultHostnamefrom the migrated settings.http://...:8080is no longer the right URL for day-to-day administration. Port8080carries the recovery / bootstrap HTTP listener and is intended for the migration window; once the server is running normally it stops being a valid sign-in entry point.- When the public HTTPS port is not
443(for example a reverse proxy on:8443, or a Docker host port mapping that diverges from the container’s443), set theSTALWART_HTTPS_PORTenvironment variable to that port and restart the server. Without it, the discovery documents will publishhttps://<host>/...(port443implied) and clients will be sent to a port the proxy is not listening on.
I understand this is for security concerns. But users have their own workflows and security measures, many of which are no longer possible on v0.16.
The admin panel domain is not necessarily the same with the hostname set in config. For example for security reasons I don’t want to expose the web panel to public internet, but only accessible via ssh port forwarding. Previously everything worked, I could use https with self-signed certs or plain text http in ssh tunnel. But now the whole workflow is broken. I am forced to use the hostname configured which is impossible if I don’t want to expose this to public internet. I cannot set in /etc/hosts either because I heavily use mail clients on my machine, I will not be able to connect to mail ports if I resolve stalwart to localhost.
And I think it is very common for users to use reverse proxies or CDN or WAF. Many users may want to use plain text http within server host, and expose it to public internet using nginx. In this case, certs should be configured in nginx. This is also much better in security: battle-tested nginx or other reverse proxies written in memory safe language or WAF are exposed to public internet, instead of stalwart.
Nginx, ssh port forwarding, mTLS, WAF, CDN, there are a million things that are broken if you require using hostname plus https. I am currently locked out from the admin panel due to this broken workflow.
Expected Behavior
Leave an option for users to visit admin web panel using IP and plain text http.
Actual Behavior
Cannot login to admin web panel unless using the hostname configured, and https.
Reproduction Steps
N/A
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