{"id":21181464,"url":"https://github.com/thedataflows/stalwart-kubernetes","last_synced_at":"2025-07-25T03:14:33.760Z","repository":{"id":209370731,"uuid":"723695347","full_name":"thedataflows/stalwart-kubernetes","owner":"thedataflows","description":"Kubernetes deployment of Stalwart Mail Server","archived":false,"fork":false,"pushed_at":"2024-03-11T22:57:05.000Z","size":58,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T13:35:32.893Z","etag":null,"topics":["dkim","imap","jmap","kubernetes","kustomize","mail","smtp"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thedataflows.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-26T13:45:07.000Z","updated_at":"2025-04-24T17:18:16.000Z","dependencies_parsed_at":"2024-11-20T18:02:22.521Z","dependency_job_id":null,"html_url":"https://github.com/thedataflows/stalwart-kubernetes","commit_stats":null,"previous_names":["thedataflows/stalwart-kubernetes"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/thedataflows/stalwart-kubernetes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedataflows%2Fstalwart-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedataflows%2Fstalwart-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedataflows%2Fstalwart-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedataflows%2Fstalwart-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedataflows","download_url":"https://codeload.github.com/thedataflows/stalwart-kubernetes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedataflows%2Fstalwart-kubernetes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266947640,"owners_count":24010766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dkim","imap","jmap","kubernetes","kustomize","mail","smtp"],"created_at":"2024-11-20T17:50:42.581Z","updated_at":"2025-07-25T03:14:33.711Z","avatar_url":"https://github.com/thedataflows.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stalwart Kubernetes\n\n## Introduction\n\nThis repository contains the Kubernetes manifests to deploy [Stalwart mail server](https://stalw.art/).\n\nWill deploy in a kubernetes cluster:\n\n- All in one mail server\n- TLS enabled using [cert-manager](https://cert-manager.io/) certificates\n\n## Requirements\n\n- Utilities: `bash`, `make`, `sed`, `kubectl`, `yq` [mikefarah's v4 and above](https://github.com/mikefarah/yq/releases), `git`, `curl`, `gzip`, `unzip` (Windows)\n- Working kubernetes cluster\n- Optional:\n  - For helm chart generation: [Helmify](https://github.com/arttor/helmify)\n  - For [litestream](https://litestream.io/) any of the following:\n    - AWS S3\n    - [Minio](https://min.io/) (self hosted or SaaS)\n    - [Backblaze Object Storage](https://www.backblaze.com/cloud-storage)\n  - [FluxCD](https://fluxcd.io/) client\n\n## Guide\n\n1. Fork this repository\n2. Clone it locally `git clone https://github.com/change-me/stalwart-kubernetes.git`\n3. Recommended to use [Listestream](https://litestream.io)\n   - Keep StatefulSet [replicas to 1](https://litestream.io/guides/kubernetes/#ensure-single-replica)\n   - Create a bucket in your S3 compatible storage and set environment variables:\n     - `export ACCESS_KEY_ID=value`\n     - `export SECRET_ACCESS_KEY=value`\n4. Generate configuration: `make config` will download and run `stalwart-install` in interactive mode. In turn this will:\n   - Download and modify stalwart toml config files in `config/etc`\n   - Generate sqlite databases in `config/data`\n   - Generate DKIM cert amd key in `config/etc/dkim` (excluded from git because contains secrets)\n5. Update generated stalwart config files as needed:\n   - Default user directory is sql:\n\n     ```toml\n     config/etc/config.toml:15\n     ...\n     \"%{BASE_PATH}%/etc/directory/sql.toml\",\n     ...\n     ```\n\n   - Can use [other types](https://stalw.art/docs/category/types) instead\n6. Update `config/*.patch.yaml` files with your specific configuration:\n   - Set `storageClassName` and storage size\n   - Enable **litestream**:\n     - Comment out the removal of `initContainer/0` and `container/1` in `config/statefulset.patch.yaml`\n     - Configure bucket, path, endpoint in `config/listestream.yaml`\n7. Deploy manually: `make install`\n   - Will deploy in the current kubernetes context. Assumes `kubectl` is present and a local kuberenes context is configured\n   - Alternatively, you can just generate the manifests: `make kustomize` and inspect them in `out/` directory.\n8. `git commit -am \"Set up stalwart for domain yourdomain.org\" \u0026\u0026 git push`\n   - \u003e Warning: [config/kustomization.yaml](config/kustomization.yaml) contains a `secretGenerator` section that with plain text secrets. Remove it before pushing to a git repository: `yq -i 'del(.secretGenerator)' config/kustomization.yaml`.\n9. Deploy using GitOps (recommended):\n   - Using your FluxCD git repo (different from this one):\n     - In this repo: `make gitops`\n     - Copy `gitops/` to the gitops repoo and encrypt **all** the secrets with [SOPS](https://github.com/getsops/sops/)\n   - Using [ArgoCD](https://argoproj.github.io/cd/):\n     - TODO\n10. Setup DKIM: follow `config/etc/dkim/yourdomain.org.readme` instructions\n11. Uninstall manually: `kubectl delete ns stalwart`\n12. Cleanup: `make clean` will remove all generated files\n\n## Helm chart\n\n`make helm` will generate a helm chart in `chart/` directory. This is not the preferred way to deploy stalwart and is not tested, but it can be used as a reference.\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedataflows%2Fstalwart-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedataflows%2Fstalwart-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedataflows%2Fstalwart-kubernetes/lists"}