Skip to content

Alpine ssl #1256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/guides/ssl/alpine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Configure SSL with Alpine


## Dehydrated

Dehydrated is a client for signing certificates with an ACME-server (e.g. Let's Encrypt) implemented as a relatively simple (zsh-compatible) bash-script.

Install the [dehydrated](https://github.com/dehydrated-io/dehydrated) package:

```shell
sudo apk add dehydrated
```

Example `/etc/dehydrated/domains.txt`:

```text
pihole.example.com
```

### Cloudflare DNS challenge

To use the Cloudflare DNS challenge, install [cfhookbash](https://github.com/sineverba/cfhookbash) per the Readme

Example install:

```shell
cd /lib
git clone https://github.com/sineverba/cfhookbash.git
```
Example `/lib/cfhookbash/deploy.sh`:

```shell
case ${1} in
"pihole.example.com")
# Remove the old certificate
rm -f /etc/pihole/tls*

# Pi-hole requires a PEM file containing both the private key and server certificate.
# Install the certificate:
cat /var/lib/dehydrated/certs/pihole.example.com/fullchain.pem /var/lib/dehydrated/certs/pihole.example.com/privkey.pem > /etc/pihole/tls.pem

#restart pihole
service pihole restart
;;

esac
```

Example crontab entry:

```crontab
0 4 * * * dehydrated --cron --cleanup-delete --challenge dns-01 --hook "/lib/cfhookbash/hook.sh" >> /tmp/cfhookbash-`date +\%Y-\%m-\%d-\%H-\%M-\%S`.log 2>&1
```

2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ nav:
- 'Using DNSSEC': guides/misc/tor/dnssec.md
- 'Allowlist and Denylist editing': guides/misc/allowlist-denylist.md
- 'Network Time Protocol': guides/misc/ntp.md
- 'SSL':
- 'Alpine': guides/ssl/alpine.md
- 'Router setup':
- 'ASUS router': routers/asus.md
- 'Fritz!Box (EN)': routers/fritzbox.md
Expand Down
Loading