Skip to content

Commit a392fa7

Browse files
authored
Add Pangolin certification dumping and minor cleanup (#963)
1 parent 32946c5 commit a392fa7

2 files changed

Lines changed: 85 additions & 5 deletions

File tree

‎docs/post_installation/reverse-proxy/r_p-pangolin.de.md‎

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ Die deklarative Konfiguration von Pangolin ist mittels sogenannter Blueprints se
88

99
In diesem Beispiel wird die Zertifikatserstellung durch Pangolin übernommen. Das SSO von Pangolin ist aktiv und bieter zusätzlichen Schutz. Autodiscover, Autoconfig und MTA-STS, sowie die API für den Status sind öffentlich zugänglich.
1010

11+
## Blueprint für Pangolin
12+
1113
Es wird angenommen, dass mailcow auf Port 4443 über TLS erreichbar ist.
1214
Die Domain `example.com` ist entsprechend zu ersetzern.
15+
Entsprechende Zeilen sind unten markiert.
1316

14-
```yaml
17+
```yaml hl_lines="5 12 21 28 37 44 53 60 69 76"
1518
public-resources:
1619
mailcow:
1720
auth:
@@ -94,13 +97,21 @@ public-resources:
9497
value: /.well-known/openpgpkey/*
9598
```
9699
100+
## In lokale Pangolin Instanz integrieren
101+
102+
Wenn Pangolin und mailcow auf dem selben Server laufen, kann der Blueprint über das Webinterface hinzugfügt werden.
103+
104+
> Organisation > Blaupausen > Blueprint hinzufügen
105+
106+
## In remote Pangolin Instanz integrieren
107+
97108
Die Einbindung in eine bestehende Pangolin-Instanz ist dank newt schnell erledigt:
98109
99110
> Standorte > Standort hinzufügen > Newt Standort > Docker
100111
101112
Die Umgebungsvariable `BLUEPRINT_FILE` wird hinzugefügt, exemplarisch liegt obrige Konfigurationsdatei unter `/opt/blueprint_mailcow.yml`.
102113

103-
```yaml
114+
```yaml hl_lines="10"
104115
services:
105116
newt:
106117
image: fosrl/newt
@@ -112,3 +123,32 @@ services:
112123
- NEWT_SECRET=<YOUR_SECRET>
113124
- BLUEPRINT_FILE=/opt/blueprint_mailcow.yml
114125
```
126+
127+
## Zertifikate exportieren
128+
129+
Da Pangolin zukünftig die Zertifikate erneuert, müssen diese auch für mailcow aktualisiert werden.
130+
131+
Pangolins Compose Konfiguration wie folgt erweitern und markierte Zeilen anpassen:
132+
133+
```yaml hl_lines="7 13 20"
134+
services:
135+
136+
[...]
137+
138+
traefik_certdumper:
139+
command:
140+
- --restart-containers=mailcowdockerized-postfix-mailcow-1,mailcowdockerized-dovecot-mailcow-1,mailcowdockerized-nginx-mailcow-1
141+
container_name: traefik_certdumper
142+
depends_on:
143+
traefik:
144+
condition: service_started
145+
environment:
146+
- DOMAIN=*.example.com
147+
image: ghcr.io/kereis/traefik-certs-dumper:latest
148+
network_mode: none
149+
restart: unless-stopped
150+
volumes:
151+
- /run/docker.sock:/var/run/docker.sock:ro
152+
- ./config/letsencrypt:/traefik:ro
153+
- /opt/mailcow-dockerized/data/assets/ssl:/output:rw
154+
```

‎docs/post_installation/reverse-proxy/r_p-pangolin.en.md‎

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ Pangolin's declarative configuration is very simple using so-called Blueprints.
88

99
In this example, certificate creation is handled by Pangolin. Pangolin's SSO is active and provides additional protection. Autodiscover, Autoconfig, and MTA-STS, as well as the API for status, are publicly accessible.
1010

11+
## Blueprint for Pangolin
12+
1113
It is assumed that mailcow is accessible on port 4443 via TLS.
1214
The domain `example.com` should be replaced accordingly.
15+
Relevant lines are marked below.
1316

14-
```yaml
17+
```yaml hl_lines="5 12 21 28 37 44 53 60 69 76"
1518
public-resources:
1619
mailcow:
1720
auth:
@@ -94,13 +97,21 @@ public-resources:
9497
value: /.well-known/openpgpkey/*
9598
```
9699
97-
Integration into an existing Pangolin instance is quick and easy with newt:
100+
## Integrate into local Pangolin instance
101+
102+
If Pangolin and mailcow are running on the same server, you can just add the blueprint via the web interface.
103+
104+
> Organization > Blueprints > Add Blueprint
105+
106+
## Integrate into remote Pangolin instance
107+
108+
Integration into an existing remote Pangolin instance is quick and easy with newt:
98109
99110
> Sites > Create Sites > Newt Site > Docker
100111
101112
The environment variable `BLUEPRINT_FILE` is added. As an example, the configuration file above is located at `/opt/blueprint_mailcow.yml`.
102113

103-
```yaml
114+
```yaml hl_lines="10"
104115
services:
105116
newt:
106117
image: fosrl/newt
@@ -112,3 +123,32 @@ services:
112123
- NEWT_SECRET=<YOUR_SECRET>
113124
- BLUEPRINT_FILE=/opt/blueprint_mailcow.yml
114125
```
126+
127+
## Export certificates
128+
129+
As Pangolin will now renew the certificates, you need to update them for mailcow.
130+
131+
Add this to Pangolin's compose configuration, modify the marked lines:
132+
133+
```yaml hl_lines="7 13 20"
134+
services:
135+
136+
[...]
137+
138+
traefik_certdumper:
139+
command:
140+
- --restart-containers=mailcowdockerized-postfix-mailcow-1,mailcowdockerized-dovecot-mailcow-1,mailcowdockerized-nginx-mailcow-1
141+
container_name: traefik_certdumper
142+
depends_on:
143+
traefik:
144+
condition: service_started
145+
environment:
146+
- DOMAIN=*.example.com
147+
image: ghcr.io/kereis/traefik-certs-dumper:latest
148+
network_mode: none
149+
restart: unless-stopped
150+
volumes:
151+
- /run/docker.sock:/var/run/docker.sock:ro
152+
- ./config/letsencrypt:/traefik:ro
153+
- /opt/mailcow-dockerized/data/assets/ssl:/output:rw
154+
```

0 commit comments

Comments
 (0)