Loading...
Loading...
Interactively adds a new subdomain to the network infrastructure by gathering service details, configuring domains.toml, and applying changes. Use when you need to add a new service, create a subdomain, expose a new application, or set up reverse proxy for a service. Triggers on "add subdomain", "new subdomain", "add service to network", "expose service", "create domain for", "set up reverse proxy", or "add [name] to infrastructure". Works with domains.toml, manage-domains.sh, and Cloudflare Tunnel.
npx skill4agent add dawiddutoit/custom-claude caddy-subdomain-addAdd a new subdomain:
- Name: Grafana Dashboard
- Subdomain: grafana
- Backend: 192.168.68.135:3001
- HTTPS: yes
- Auth: yes| Field | Question | Example |
|---|---|---|
| name | What is the display name for this service? | "Grafana Dashboard" |
| subdomain | What subdomain do you want? (without .temet.ai) | "grafana" |
| backend | Where is the service running? (IP:port or container:port) | "192.168.68.135:3001" or "grafana:3000" |
| Type | Description |
|---|---|
| web | Standard web application (default settings) |
| docker | Docker container on the same network |
| iot | IoT device (needs header stripping) |
| api | API service (may need custom headers) |
| external | Service on different machine on LAN |
python3 .claude/skills/add-subdomain/scripts/validate-subdomain.py grafana 192.168.68.135:3001192.168.68.135:3001grafana:3000references/reference.md| Type | enable_https | enable_http | require_auth | Special |
|---|---|---|---|---|
| web | true | false | true | proxy_headers |
| docker | true | false | true | container:port backend |
| iot | false | true | true | strip_cf_headers |
| external | true | false | true | LAN IP backend |
| self-signed | true | false | true | tls_insecure |
| public | false | true | false | no auth |
/home/dawiddutoit/projects/network/domains.toml[[services]]
name = "{name}"
subdomain = "{subdomain}"
backend = "{backend}"
enable_https = {enable_https}
enable_http = {enable_http}
dns_ip = "{dns_ip}"
require_auth = {require_auth}
{optional_fields}cd /home/dawiddutoit/projects/network && ./scripts/manage-domains.sh apply=== Applying Domain Configuration ===
Validating configuration...
[checkmark] Configuration is valid
Generating Caddyfile...
[checkmark] Caddyfile generated successfully
Updating Pi-hole DNS entries...
[checkmark] Pi-hole DNS entries updated
Syncing Cloudflare Access applications...
[checkmark] Cloudflare Access synced successfully
Reloading Caddy configuration...
[checkmark] Caddy reloaded successfully
Restarting Pi-hole to apply DNS changes...
[checkmark] Pi-hole restarted successfullyMANUAL STEP REQUIRED: Add Cloudflare Tunnel Route
1. Go to: https://one.dash.cloudflare.com
2. Navigate to: Access -> Tunnels
3. Click on tunnel: "pi-home" (or your tunnel name)
4. Click "Configure" -> "Public Hostname" -> "Add a public hostname"
5. Enter:
- Subdomain: {subdomain}
- Domain: temet.ai
- Type: {HTTP or HTTPS}
- URL: {backend_for_tunnel}
For HTTPS services: https://caddy:443
For HTTP-only services: http://caddy:80 or direct to service
6. Click "Save hostname"| Service Type | Tunnel URL |
|---|---|
| HTTPS enabled | |
| HTTP only (IoT) | Direct to service: |
| Docker container | |
dig @192.168.68.135 {subdomain}.temet.ai +shortecho | openssl s_client -servername {subdomain}.temet.ai \
-connect {subdomain}.temet.ai:443 2>/dev/null | \
openssl x509 -noout -dates -issuercurl -I https://{subdomain}.temet.ai./scripts/manage-domains.sh list| File | Purpose |
|---|---|
| Complete configuration options reference |
| Common service configuration examples |
| Pre-validation of subdomain and backend |
python3 .claude/skills/add-subdomain/scripts/validate-subdomain.py grafana 192.168.68.135:3001| Component | Purpose |
|---|---|
| Central configuration source |
| Applies configuration changes |
| Generates Caddyfile from domains.toml |
| Updates Pi-hole DNS entries |
| Creates/updates Access applications |
| Cloudflare Tunnel | Manual public hostname configuration |
setup-new-domain-servicestroubleshoot-ssl-certificatesdiagnose-cloudflare-access| Metric | Before | After |
|---|---|---|
| Time to add service | 15-30 min (manual) | 2-5 min (guided) |
| Configuration errors | Common (manual editing) | Rare (validated) |
| Documentation needed | Multiple files | Single skill reference |
| Consistency | Variable | Standardized |
.envhost.docker.internal192.168.68.135strip_cf_headers = truetls_insecure = true/admin/root_redirect./scripts/manage-domains.sh list