mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Add docker letsencrypt example
This commit is contained in:
parent
0bb57163d2
commit
597d642f8c
|
@ -17,6 +17,28 @@ To enable Let's Encrypt on your mail server, you have to:
|
|||
|
||||
You don't have anything else to do. Enjoy.
|
||||
|
||||
#### Example using docker for letsencrypt
|
||||
Make a directory to store your letsencrypt logs and configs.
|
||||
|
||||
In my case
|
||||
```
|
||||
mkdir -p /home/ubuntu/docker/letsencrypt/log
|
||||
mkdir -p /home/ubuntu/docker/letsencrypt/etc/letsencrypt
|
||||
```
|
||||
|
||||
Now get the certificate (modify ```mail.myserver.tld```) and following the certbot instructions.
|
||||
This will need access to port 443 from the internet, adjust your firewall if needed
|
||||
```
|
||||
docker run --rm -ti -v $PWD/log/:/var/log/letsencrypt/ -v $PWD/etc/:/etc/letsencrypt/ -p 443:443 deliverous/certbot certonly --standalone -d mail.myserver.tld
|
||||
```
|
||||
You can now mount /home/ubuntu/docker/letsencrypt/etc/letsencrypt in /etc/letsencrypt of ```docker-mailserver```
|
||||
|
||||
To renew your certificate just run (this will need access to port 443 from the internet, adjust your firewall if needed)
|
||||
```
|
||||
docker run --rm -ti -v $PWD/log/:/var/log/letsencrypt/ -v $PWD/etc/:/etc/letsencrypt/ -p 443:443 deliverous/certbot renew
|
||||
```
|
||||
|
||||
|
||||
### Self-signed certificates (testing only)
|
||||
|
||||
You can easily generate a self-signed SSL certificate by using the following command:
|
||||
|
|
Loading…
Reference in a new issue