App Store template
Stalwart icon

Stalwart

Open-source mail and collaboration server with SMTP, IMAP, JMAP, CalDAV, CardDAV, WebDAV, and a web administration console.

Launch in your Sealos workspace.

Stalwart template preview
Template previewFull screenshot
Template deployments
13 on Sealos
Deployment
Your own instance
Category
Tools

About this template

Overview

Stalwart is an open-source mail and collaboration server with SMTP, IMAP, JMAP, CalDAV, CardDAV, WebDAV, spam filtering, and a web administration console. This template deploys Stalwart with a PostgreSQL data store on Sealos Cloud.

From the documentation

Stalwart runs as a single-node mail and collaboration server backed by a Sealos-managed PostgreSQL database. The template follows Stalwart's official Kubernetes runtime model: a StatefulSet starts the container with /etc/stalwart/config.json, uses PostgreSQL as the external DataStore, and exposes the HTTP administration listener through Sealos Ingress.

How to deploy Stalwart

  1. Choose Deploy now to start Stalwart in your Sealos workspace.
  2. Review admin_password, use_object_storage in the deployment form.
  3. Launch the template, then inspect the application status and resource cards in Canvas.

Resources to plan for

Start with the resources defined by the Stalwart template. Review CPU, memory, persistent storage, and network allocations for every service in Canvas. Capacity needs depend on your data and workload; monitor usage as they grow.

Template configuration and setup

Access after deployment

Use the application URL or connection details shown in Canvas. Follow the deployment guide for first-time account setup or client configuration, and keep generated credentials available for that step.

Hosting and billing

Sealos monthly plans include compute, memory, storage, and traffic. Size your plan for all deployed services. Software licenses and external AI or API services may have separate terms and charges. Confirm the applicable plan and optional charges in Cost Center.

Compare Sealos resource plans
Read full documentationCollapse documentation

For current cloud charges, refer to Sealos plan pricing. Upstream documentation may reference earlier billing models.

Deploy and Host Stalwart on Sealos

Stalwart is an open-source mail and collaboration server with SMTP, IMAP, JMAP, CalDAV, CardDAV, WebDAV, spam filtering, and a web administration console. This template deploys Stalwart with a PostgreSQL data store on Sealos Cloud.

Stalwart Screenshot

About Hosting Stalwart

Stalwart runs as a single-node mail and collaboration server backed by a Sealos-managed PostgreSQL database. The template follows Stalwart's official Kubernetes runtime model: a StatefulSet starts the container with /etc/stalwart/config.json, uses PostgreSQL as the external DataStore, and exposes the HTTP administration listener through Sealos Ingress.

The deployment provisions PostgreSQL automatically, creates the stalwart database, and waits for the database before starting the Stalwart container. The web administration console is available at /admin, while mail protocols require additional L4 port exposure and DNS records before production mail delivery.

Common Use Cases

  • Business Mail Hosting: Host SMTP, IMAP, POP3, and submission services for a managed domain.
  • Collaboration Server: Provide calendars, contacts, file sharing, and JMAP-compatible access.
  • Mail Security Gateway: Use Stalwart's spam and phishing protection for inbound and outbound mail.
  • Self-Hosted Mail Lab: Test mail-server configuration, DNS records, and client compatibility.

Dependencies for Stalwart Hosting

The Sealos template includes Stalwart, a PostgreSQL 16.4 KubeBlocks cluster, a database initialization Job, a Kubernetes StatefulSet, a Service, an Ingress, and a Sealos App link.

Deployment Dependencies
Implementation Details

Architecture Components:

This template deploys the following services:

  • Stalwart StatefulSet: Runs stalwartlabs/stalwart:v0.16.7 with the official --config /etc/stalwart/config.json startup contract.
  • PostgreSQL: Stores Stalwart's primary data using the official PostgreSQL DataStore configuration.
  • Database Init Job: Creates the stalwart database after PostgreSQL becomes reachable.
  • Sealos Ingress: Publishes the web administration console and health endpoints over HTTPS.
  • Optional Object Storage: When enabled, provisions a Sealos ObjectStorageBucket and injects S3-compatible credentials for later blob-store configuration in the WebUI.

Configuration:

  • Log in at /admin with username admin and the bootstrap password configured during deployment.
  • Health endpoints are available at /healthz/live and /healthz/ready.
  • Stalwart's WebUI is used to configure domains, DNS records, DKIM, TLS certificates, accounts, and storage backends.
  • For S3 blob storage, enable object storage during deployment, then configure the S3-compatible BlobStore in Settings > Storage > Blob Store with the injected credentials.

Mail DNS and Ports:

Sealos Ingress exposes the HTTPS administration endpoint. SMTP, submission, IMAP, POP3, and ManageSieve are L4 protocols, so production mail hosting also needs explicit TCP exposure for the required ports, MX/SPF/DKIM/DMARC records, reverse DNS, and provider-side outbound mail policy review.

License Information:

Stalwart is licensed under the AGPL-3.0 license. This Sealos template is provided under the repository license.

Why Deploy Stalwart on Sealos?

Sealos is an AI-assisted Cloud Operating System built on Kubernetes that unifies the application lifecycle, from development in cloud IDEs to production deployment and management. By deploying Stalwart on Sealos, you get:

  • One-Click Deployment: Deploy Stalwart with PostgreSQL from the App Store template.
  • Kubernetes Foundation: Run Stalwart as a managed Kubernetes workload with persistent database storage.
  • Easy Customization: Adjust environment variables, resources, and storage from the Canvas.
  • Public HTTPS Access: Access the WebUI through an automatic HTTPS URL.
  • Pay-As-You-Go Resources: Start with a compact resource profile and scale when mail volume grows.

Deployment Guide

  1. Open the Stalwart template and click Deploy Now.
  2. Configure the bootstrap administrator password and choose whether to provision Sealos object storage.
  3. Wait for deployment to complete, typically 2-3 minutes. After deployment, you will be redirected to the Canvas. For later changes, describe your requirements in the dialog to let AI apply updates, or click the relevant resource cards to modify settings.
  4. Access your application via the provided URL:
    • Web Admin: Open https://[your-stalwart-url]/admin and log in with username admin and your bootstrap password.
    • Health Check: Use /healthz/live and /healthz/ready for web health monitoring.

Configuration

After deployment, complete mail-server setup in the Stalwart WebUI:

  • Domains: Add your mail domains and review generated DNS records.
  • Accounts: Create mail users and administrator accounts.
  • DNS: Publish MX, SPF, DKIM, DMARC, MTA-STS, and related records for real mail delivery.
  • Ports: Expose required TCP ports for SMTP, submission, IMAP, POP3, and ManageSieve through a suitable L4 path.
  • Object Storage: Configure S3-compatible blob storage in the WebUI when object storage was enabled during deployment.
  • Canvas: Use the Sealos Canvas, AI dialog, and resource cards for resource and environment updates.

Scaling

Start with the default single-node deployment for setup and evaluation. For production mail hosting, review CPU, memory, database capacity, TCP exposure, DNS reputation, and backup requirements before increasing load.

To adjust resources:

  1. Open the Canvas for your deployment.
  2. Click the Stalwart StatefulSet or PostgreSQL resource card.
  3. Adjust CPU, memory, storage, or operational parameters.
  4. Apply the changes in the dialog.

Troubleshooting

Admin Login
  • Cause: The bootstrap password was entered incorrectly.
  • Solution: Use username admin with the password configured during deployment.
Health Endpoints
  • Cause: PostgreSQL is still starting or the database initialization Job has not completed.
  • Solution: Wait for PostgreSQL and the Stalwart StatefulSet to become ready, then retry /healthz/ready.
Mail Delivery
  • Cause: Web HTTPS access is working, while mail protocol ports or DNS records are still incomplete.
  • Solution: Configure L4 TCP exposure and publish the DNS records generated by Stalwart before sending production mail.
Getting Help

Additional Resources

License

This Sealos template is provided under the repository license. Stalwart itself is licensed under AGPL-3.0.

From launch to everyday operations

Why deploy
on Sealos

A shorter path from an app you want to an app you can run. Sealos brings deployment and ongoing operations into one place.

  1. One-click deployment

    Start with a ready-made template. Review its configuration and launch from the Sealos console.

  2. Managed Kubernetes

    Run on managed infrastructure with built-in workload scheduling and recovery.

  3. Automatic HTTPS

    Give your application a public HTTPS endpoint with certificates managed for you.

  4. Persistent storage

    Keep application data on persistent volumes across container restarts.

  5. Room to grow

    Adjust CPU, memory, and replicas from the console as your workload changes.

One template. Connected resources.

You Get the Whole Stack

Sealos provisions the resources defined by your template and brings them together in your workspace.

  • App Service

    Container workloads with configurable CPU, memory, and replicas.

  • Public HTTPS URL

    An address for your app, with managed TLS certificates.

  • Database

    A database provisioned alongside your app when the template calls for one.

  • Persistent Volume

    Storage for the files and data your application needs to keep.

  • Environment Variables

    Application settings and secrets configured in one place.

  • Logs & Metrics

    Inspect container logs and resource usage from the console.

Resources and their configuration vary by template. Review the deployment form for this app’s exact setup.

Explore more production-ready templates.

More