You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,12 @@ That installs the command to:
28
28
29
29
Then it runs the setup flow (`local-https --install`) and offers auto-renew (systemd timer recommended).
30
30
31
+
During the interactive install you are asked for a **domain name** to add to the certificate (default `pi.hole`). Pick whatever your network uses (e.g. `home.lan`, `dns.home`). To set it non-interactively, pass it as an environment variable:
@@ -36,7 +42,7 @@ Then it runs the setup flow (`local-https --install`) and offers auto-renew (sys
36
42
- 🪪 Issues a **server certificate** (default: **40 days**) with SANs for:
37
43
- hostname
38
44
- relevant LAN IPs (filtered)
39
-
-`pi.hole` when Pi-hole is detected
45
+
-a configurable **domain name** (default `pi.hole`)
40
46
- Tailscale DNS name when available
41
47
- 📦 Generates:
42
48
-`server.pem` (cert + key, for services like Pi-hole)
@@ -63,6 +69,31 @@ Then it runs the setup flow (`local-https --install`) and offers auto-renew (sys
63
69
64
70
-----
65
71
72
+
## 🌐 Custom domain
73
+
74
+
The certificate includes a friendly domain name (default `pi.hole`). If your network uses a different local domain, you can configure it. The chosen domain is added to the certificate SANs and is remembered across renewals (stored in the state file).
75
+
76
+
The domain is resolved with the following precedence (highest first):
2.**CLI flag** – `--domain` (works with `--install`, `--configure`, and `--renew`):
83
+
```bash
84
+
sudo local-https --install --domain home.lan
85
+
sudo local-https --configure --domain dns.home
86
+
```
87
+
3.**Persisted state** – whatever was chosen on the previous run (so renewals stay consistent).
88
+
4.**Pi-hole auto-detection** – on a fresh install, if Pi-hole is detected the script reads its configured `webserver.domain` (via `pihole-FTL --config`, falling back to `/etc/pihole/pihole.toml`) and uses that as the default.
89
+
5.**Default** – `pi.hole`.
90
+
91
+
During an interactive `--install`/`--configure` you are also prompted, pre-filled with the resolved value (press Enter to keep it).
92
+
93
+
To change the domain on an existing install, run `sudo local-https --configure --domain <name>` (or `sudo local-https --renew --force-renew --domain <name>`). The Root CA stays the same, so there is nothing new to trust on your devices.
94
+
95
+
-----
96
+
66
97
## 🔁 Auto-renew (how it works)
67
98
68
99
- 📅 The server certificate is issued for **40 days**.
0 commit comments