You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This project enables you to operate your own email services, providing independe
13
13
The documentation is organised by purpose:
14
14
15
15
-**[Tutorial: Getting Started](tutorials/getting-started.md)** — A step-by-step lesson to install docker-mailserver with Docker Compose and create your first mailbox.
16
-
-**How-to guides** — Task-oriented guides for specific goals (installon Kubernetes, configure DNS, manage users, configure TLS, and more). See the [How-to](how-to/install-docker.md) section in the navigation.
16
+
-**How-to guides** — Task-oriented guides for specific goals: [install with Docker](how-to/install-docker.md), [install on Kubernetes](how-to/install-kubernetes.md), [configure DNS](how-to/configure-dns.md), [configure TLS](how-to/configure-tls.md), [manage users](how-to/manage-users.md), and more.
17
17
-**Reference** — Technical descriptions: [environment variables](reference/environment-variables.md), [DNS records](reference/dns-records.md), [ports](reference/ports.md), [service architecture](reference/service-architecture.md), [user roles](reference/user-roles.md), and related topics.
18
18
-**Explanation** — Background and context: [architecture](explanation/architecture.md), [DNS and email delivery](explanation/dns-and-email.md), [observability](explanation/observability.md).
Copy file name to clipboardExpand all lines: docs/how-to/configure-tls.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# How to Configure TLS Certificates
2
2
3
-
By default the mailserver uses a shared `data-tls` volume with internally generated certificates. To use external certificates (e.g. Let’s Encrypt), mount certificate and key files into the MTA and MDA containers.
3
+
This guide covers TLS for mail protocols (SMTP, IMAP, POP3) served by the MTA (Postfix) and MDA (Dovecot) containers. To terminate TLS for the web interface (port 81), use a reverse proxy — see [How to configure a reverse proxy](configure-reverse-proxy.md).
4
+
5
+
By default the mailserver uses a shared `data-tls` volume with internally generated certificates. To use external certificates (e.g. Let's Encrypt), mount certificate and key files into the MTA and MDA containers.
Copy file name to clipboardExpand all lines: docs/how-to/install-docker.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,13 @@
2
2
3
3
This guide describes how to install docker-mailserver using Docker Compose.
4
4
5
+
If you are setting up docker-mailserver for the first time, the [Getting Started tutorial](../tutorials/getting-started.md) provides a step-by-step walkthrough that covers these same steps with more explanation.
6
+
5
7
## Prerequisites
6
8
7
-
- Docker and Docker Compose
8
-
-Domain name with DNS configured
9
-
-Basic familiarity with email server administration
Copy file name to clipboardExpand all lines: docs/how-to/install-kubernetes.md
+30-6Lines changed: 30 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# How to Install on Kubernetes
2
2
3
-
This guide describes how to deploy docker-mailserver on Kubernetes with Kustomize. An external MySQL-compatible database is required; the kustomization does not provision a database.
3
+
This guide describes how to deploy docker-mailserver on Kubernetes with
4
+
Kustomize. An external MySQL-compatible database is required; the
5
+
kustomization does not provision a database.
4
6
5
-
A full example is in [example-configs/kustomize/external-db-and-https-ingress](https://github.com/jeboehm/docker-mailserver/tree/main/docs/example-configs/kustomize/external-db-and-https-ingress).
7
+
A full example is in [example-configs/kustomize/external-db-and-https-ingress](../example-configs/kustomize/external-db-and-https-ingress/).
6
8
7
9
## Prerequisites
8
10
@@ -12,9 +14,16 @@ A full example is in [example-configs/kustomize/external-db-and-https-ingress](h
12
14
13
15
## Steps
14
16
15
-
### 1. Configure environment (ConfigMap)
17
+
### 1. Configure environment (ConfigMap and Secrets)
16
18
17
-
Copy `.env.dist` to `.env`, edit it, and create a ConfigMap from it. Create Kubernetes secrets for database credentials and other sensitive values. See [Environment variables reference](../reference/environment-variables.md).
19
+
Use `.env.dist` as a reference for required variables. Create a Kubernetes
20
+
ConfigMap for non-sensitive values and Secrets for sensitive values
21
+
(credentials, passwords, API keys). See [Environment variables reference](../reference/environment-variables.md) for the full list.
directory for a sample configuration showing how to structure these
26
+
resources.
18
27
19
28
### 2. Create namespace
20
29
@@ -28,6 +37,10 @@ kubectl create namespace mail
28
37
bin/create-tls-certs.sh
29
38
```
30
39
40
+
This writes a self-signed certificate to `config/tls/tls.crt` and key to
41
+
`config/tls/tls.key`. For production, use CA certificates (e.g.
42
+
cert-manager with Let's Encrypt) instead.
43
+
31
44
### 4. Create TLS secret
32
45
33
46
```bash
@@ -58,13 +71,24 @@ Wait until all pods are running and healthy.
58
71
kubectl exec -n mail -it deployment/web -c php-fpm -- setup.sh
59
72
```
60
73
61
-
Use the wizard to set initial configuration, create the first email address, and create an admin user.
74
+
Use the wizard to set initial configuration, create the first email
75
+
address, and create an admin user.
62
76
63
77
### 8. Access the management interface
64
78
65
79
Use your configured ingress and the admin credentials from the wizard.
66
80
67
81
## Post-installation
68
82
69
-
- Configure DNS and TLS as for Docker. See [How to configure DNS](configure-dns.md) and [How to configure TLS certificates](configure-tls.md).
83
+
- Configure DNS and TLS like Docker deployment. See [How to configure DNS](configure-dns.md) and [How to configure TLS certificates](configure-tls.md).
70
84
- Change `DOVEADM_API_KEY` from default if using observability (v7.3+).
85
+
86
+
## Troubleshooting
87
+
88
+
-**Pods not starting:** Check logs with `kubectl logs -n mail <pod-name>`
89
+
and events with `kubectl describe pod -n mail <pod-name>`.
90
+
-**Database errors:** Verify database connectivity and that the
91
+
`MYSQL_*` variables in ConfigMap/Secrets are correct.
92
+
-**TLS errors:** Confirm the `tls-certs` secret exists in the `mail`
93
+
namespace and certificate paths are correct.
94
+
-**Setup wizard fails:** Ensure the web pod is running (`kubectl get pods -n mail`) before running the exec command.
| Rspamd web interface |http://127.0.0.1:81/rspamd/|
16
+
17
+
## Binding and exposure
18
+
19
+
The base `docker-compose.yml` creates no host port bindings. `bin/production.sh` includes `docker-compose.production.yml`, which binds all mail and web ports to `0.0.0.0` — making them accessible from the internet. Use host firewall rules to control which source IPs can reach these ports.
20
+
21
+
The management interface, webmail, and Rspamd web interface (port 81) use plain HTTP. Terminate TLS at a reverse proxy before exposing these to a network. See [How to configure a reverse proxy](../how-to/configure-reverse-proxy.md).
Copy file name to clipboardExpand all lines: docs/tutorials/getting-started.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ Edit `.env` and set at least:
36
36
-`CONTROLLER_PASSWORD` (required for Rspamd)
37
37
-`DOVEADM_API_KEY` (required for Dovecot API)
38
38
39
+
Use strong, unique values for each password — do not leave them empty or use the same value for all. These credentials protect internal service communication.
40
+
39
41
For a full list of variables, see [Environment variables reference](../reference/environment-variables.md).
40
42
41
43
## Step 3: Pull and start services
@@ -73,6 +75,8 @@ Open a browser and go to:
73
75
74
76
Log in with the admin credentials you set in the wizard. You should see the dashboard.
75
77
78
+
> **Note:** Port 81 uses plain HTTP. For production, place the mailserver behind a reverse proxy that terminates TLS. See [How to configure a reverse proxy](../how-to/configure-reverse-proxy.md).
79
+
76
80
## Step 6: Check the dashboard
77
81
78
82
On the dashboard you will see an overview of the mailserver: domains, users, and quick links. From here you can add domains, users, and aliases.
0 commit comments