Phase 2: Create the public DNS and Dokploy route
2.1 Add the mail A record
In your DNS provider, add:
Type: A
Name: mail
Value: 203.0.113.10
This creates:
mail.example.com → 203.0.113.10
An explicit mail record can coexist with a wildcard record such as:
*.example.com
The exact hostname takes precedence over the wildcard.
Verify from another machine:
dig +short @1.1.1.1 A mail.example.com
dig +short @8.8.8.8 A mail.example.com
Expected:
203.0.113.10
Do not publish the MX record yet. Wait until the mailbox and SMTP server are ready.
2.2 Add the Dokploy domain
In the Stalwart Compose application, create this domain:
Domain: mail.example.com
Service: stalwart-mail
Path: /
Container port: 8080
HTTPS: Enabled
Certificate: Let's Encrypt
The route becomes:
https://mail.example.com
→ Dokploy Traefik
→ stalwart-mail:8080
Do not route it to Stalwart port 443.
2.3 Open the administration interface
The administration page is:
https://mail.example.com/admin
The normal user account portal is:
https://mail.example.com/account
The root URL may redirect to /account or may not display a full application. Stalwart’s interfaces are mounted at specific paths.
Comments