Issue Description
Hi,Stalwart works when I point to the S3 (Garage) via IP address. However, when I use a hostname, it fails l
ike this:
2026-05-25T07:51:06Z ERROR Resource error (resource.error) reason = S3 error (store.s3-error) { reason = “reqwest: error sending request for url (http://s3.local:3900/mail/rv2zxhirghqwhfzmdqyaf7adz21hpzv7ri9wrvxbsybjlsenbznq)”, causedBy = “crates/store/src/dispatch/blob.rs:52” }, url = “https://github.com/stalwartlabs/webui/releases/latest/download/webui.zip”, details = “Failed to unpack application for prefixes: admin, account”I checked from inside the container and the hostname does resolve to the right address. Why then this happens?
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
FoundationDB
Blob Storage
S3-compatible
Search Engine
Internal
Directory Backend
LDAP
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 error you’re seeing is a DNS resolution failure happening inside the S3 client library – reqwest cannot connect to s3.local:3900. Even though the hostname resolves correctly from the container shell, the issue is almost certainly in how the endpoint URL is configured for a custom S3-compatible backend.
For Garage (or any non-AWS S3-compatible service), you must set region to the Custom variant and populate two sub-fields:
customEndpoint – the full URL of your Garage endpoint, e.g. http://s3.local:3900
customRegion – the region name Garage is configured with (e.g. garage)
If either of these is missing, or if the region field was set to one of the predefined AWS/DO/Wasabi variants instead of Custom, Stalwart may be constructing the wrong URL (e.g. routing to a default AWS endpoint) rather than using your hostname.
Double-check in the WebUI (Settings > Storage > Blob Store) that:
@type is S3
region is set to the Custom variant
customEndpoint is http://s3.local:3900 (with the correct scheme and port)
customRegion matches whatever region name Garage expects
If the hostname is still not resolving at connection time despite being correct in the shell, it may also be worth checking whether the Docker container running Stalwart has access to the same DNS as the one you tested from (e.g. a custom /etc/hosts entry or Docker network DNS that only applies to certain containers).
Reference: S3-compatible blob store docs | BlobStore reference – S3StoreCustomRegion
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
The custom endpoint is configured correctly. As well as the region.
It seems it didn’t accept hostnames with non-canonical TLD’s.