letsencyrpt dns01_hostpoint_wi
Quick Commands
# edit + deploy
git status
git add -A
git commit -m "docs: update"
git push
# rebuild static blog output (local)
cd site
npm ci --no-audit --no-fund
npm run build
# VPS: pull only
# (on server)
git pull --ff-only
letsencyrpt dns01_hostpoint_wildcard
ACME DNSâ01 (Hostpoint) for wildcard `*.test.privsec.ch` (from chat dump)
Scope: wildcard issuance via DNSâ01 with Hostpoint (manual), Docker/Compose commands, and wiring into NGINX â strictly from your chat dump.
Goals
- Obtain a wildcard cert for
*.test.privsec.chusing DNSâ01 (Letâs Encrypt requires DNSâ01 for wildcards). îfileciteîturn4file1îL34-L41î - Document Hostpoint record format (what to type into âNameâ), TTL, and propagation checks. îfileciteîturn4file10îL1-L7î îfileciteîturn4file10îL10-L14î
- Provide Docker and Compose commands for
certbot certonly --manual. îfileciteîturn4file4îL38-L43î îfileciteîturn4file5îL13-L21î
Why DNSâ01 (not HTTPâ01) for wildcards
- HTTPâ01 validates a single host via a file under
/.well-known/acme-challenge/(not suitable for*.). DNSâ01 proves control of the zone via a TXT record â supports wildcards. îfileciteîturn4file0îL2-L6î
Hostpoint: exact TXT record format
- In Hostpointâs Name field enter
**_acme-challenge.test**(Hostpoint appends.privsec.chautomatically). îfileciteîturn4file10îL1-L7î - TTL: set to 300s; Propagation: allow 15â30 min to be visible globally. îfileciteîturn4file10îL10-L14î
- The value is the random token shown by Certbot. îfileciteîturn4file10îL25-L27î
Certbot commands (manual DNSâ01)
Docker (oneâshot)
docker run -it --rm -v $PWD/letsencrypt:/etc/letsencrypt certbot/certbot certonly --manual --preferred-challenges dns -d "*.test.privsec.ch" -d "test.privsec.ch"
îfileciteîturn4file6îL49-L56î
dockerâcompose (manual)
version: '3'
services:
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./letsencrypt:/etc/letsencrypt
- ./varlibletsencrypt:/var/lib/letsencrypt
command: certonly --manual --preferred-challenges dns -d "*.test.privsec.ch" -d "test.privsec.ch"
îfileciteîturn4file7îL1-L11î
Important quoting: always quote the
*in-d "*.test.privsec.ch"(or escape it) so the shell doesnât expand it. Also use the**certonly**subcommand. îfileciteîturn4file3îL14-L21î îfileciteîturn4file6îL31-L35î îfileciteîturn4file14îL1-L5î
Interactive flow (manual)
- Run the Certbot command above; it will prompt for a TXT record like:
_acme-challenge.test.privsec.ch TXT AbCdEf123456âŠîfileciteîturn4file6îL53-L56î - In Hostpoint, create: Type: TXT, Name:
**_acme-challenge.test**, Value: token, TTL: 300. îfileciteîturn4file10îL16-L27î - Wait a few minutes; then verify with:
dig TXT _acme-challenge.test.privsec.ch @1.1.1.1 +shortor
nslookup -type=TXT _acme-challenge.test.privsec.ch 8.8.8.8îfileciteîturn4file10îL31-L36î - Press Enter in Certbot; the certificate is written under
./letsencrypt/live/test.privsec.ch/. îfileciteîturn4file5îL26-L27î
Wiring certificates into NGINX
Mount the letsencrypt directory and reference fullchain.pem/privkey.pem in your vhost:
ssl_certificate /etc/letsencrypt/live/test.privsec.ch/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/test.privsec.ch/privkey.pem;
îfileciteîturn4file5îL66-L70î
Version notes & common pitfalls
- Use a Certbot version that supports DNSâ01 wildcards; ensure you run
certonlyand quote the wildcard. îfileciteîturn4file6îL24-L26î îfileciteîturn4file14îL1-L14î - If no Hostpoint API: manual renewal ~every 90 days (repeat the TXT step). îfileciteîturn4file4îL21-L24î
Quick verification commands
# Check TXT
dig TXT _acme-challenge.test.privsec.ch @1.1.1.1 +short
nslookup -type=TXT _acme-challenge.test.privsec.ch 8.8.8.8
# After issuance: reload nginx
docker exec -it nginx nginx -s reload
îfileciteîturn4file10îL31-L36î îfileciteîturn4file5îL70-L73î
Runbook / Checklist
- [ ] Run Certbot (manual DNSâ01) with quoted wildcard. îfileciteîturn4file3îL16-L20î
- [ ] Create TXT in Hostpoint: Name
_acme-challenge.test, TTL 300, paste token. îfileciteîturn4file10îL16-L27î - [ ] Wait & verify via
dig/nslookup, then continue. îfileciteîturn4file12îL11-L20î - [ ] Mount and reference the certificate in NGINX; reload. îfileciteîturn4file5îL66-L73î
- [ ] Set a reminder to renew in ~90 days (manual). îfileciteîturn4file4îL21-L24î