@ -25,9 +25,25 @@ nft -f /etc/nftables
## set up domain name
Need MX and CNAME records.
Set up a DNS A Record pointing to your host machine. Make sure it works by running:
```
ping ${dnsname:?}
```
## get SSL certificates from letsencrypt
use certbot
install certbot:
```
apt install certbot
```
if you are using a firewall, you need to figure out how to define a temporary rule allowing http access. For nftables, the rule would be:
```
nft insert rule inet myfilter myfirewall tcp dport 80 accept
```
Get a certificate for your domain by running:
```
certbot certonly --standalone --pre-hook "nft insert rule inet myfilter myfirewall tcp dport 80 accept" --post-hook "nft -f /etc/nftables.conf"
```
the application will ask you a few questions, including you domain. Including the appropriate hooks when issuing the certificate should guarantee that the hooks are also used when renewing.