dawiddutoit/custom-claude/caddy-subdomain-add
Claude Code and agent skill by dawiddutoit/custom-claude
- community
Checking that the SKILL.md file is still in the repository.
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 Tu…
Install
npx vskill@latest install dawiddutoit/custom-claude/caddy-subdomain-addSKILL.md
Add Subdomain Skill
Interactive guide for adding new subdomains to the network infrastructure.
Quick Start
Minimal Request: "Add grafana running on port 3001"
Full Request Example:
Result: Service accessible at https://grafana.temet.ai with Google OAuth protection.
Table of Contents
- 3.1 Gather Service Information
- 3.2 Validate Input
- 3.3 Determine Configuration
- 3.4 Add to domains.toml
- 3.5 Apply Changes
- 3.6 Manual Tunnel Step
- 3.7 Verify Setup
When to Use This Skill
Explicit Triggers:
- "Add a subdomain for [service]"
- "Create subdomain [name]"
- "Add [service] to the network"
- "Set up reverse proxy for [service]"
- "Expose [service] externally"
Implicit Triggers:
- Setting up a new Docker container that needs external access
- Installing new software that requires HTTPS
- Configuring a new IoT device for remote access
Debugging Triggers:
- "Why can't I access [service].temet.ai?"
- "How do I add HTTPS to my service?"
What This Skill Does
- Gathers Information - Asks interactive questions about the service
- Validates Input - Checks subdomain format, IP addresses, ports
- Suggests Defaults - Recommends settings based on service type
- Configures domains.toml - Adds service entry with correct options
- Applies Changes - Runs manage-domains.sh to generate configs
- Provides Tunnel Instructions - Guides user through manual Cloudflare step
- Verifies Setup - Tests DNS, HTTPS, and authentication
Instructions
3.1 Gather Service Information
Ask the user for the following details (provide examples):
Required:
| 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" |
Service Type (for intelligent defaults):
| 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 |
3.2 Validate Input
Use the validation script to check subdomain and backend:
Rules:
- Subdomain: lowercase alphanumeric + hyphens, max 63 chars, no leading/trailing hyphens
- Backend: IP:port (e.g.,
192.168.68.135:3001) or container:port (e.g.,grafana:3000) - Check for duplicates before adding
3.3 Determine Configuration
Use service type to select defaults (see references/reference.md for full matrix):
| 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 |
3.4 Add to domains.toml
Location: /home/dawiddutoit/projects/network/domains.toml
Steps:
- Read current domains.toml
- Find appropriate section (Core Infrastructure, IoT Devices, or Utility Services)
- Append new service entry before the Advanced Configuration section
- Use Edit tool to add the entry
Template:
3.5 Apply Changes
Run the management script:
Expected output:
3.6 Manual Tunnel Step
Provide clear instructions for the Cloudflare Tunnel configuration:
Tunnel Backend Selection:
| Service Type | Tunnel URL | |
|---|---|---|
| HTTPS enabled | https://caddy:443 | |
| HTTP only (IoT) | Direct to service: http://192.168.68.XXX:80 | |
| Docker container | https://caddy:443 or http://caddy:80 |
3.7 Verify Setup
After tunnel configuration, run verification:
1. DNS Resolution (local):
Expected: Returns the dns_ip configured
2. HTTPS Certificate:
Expected: Valid certificate from Let's Encrypt
3. HTTP Response:
Expected: HTTP/2 200 or 302 (redirect to login)
4. Service List:
Expected: New service appears in list
Supporting Files
| File | Purpose | |
|---|---|---|
references/reference.md | Complete configuration options reference | |
examples/examples.md | Common service configuration examples | |
scripts/validate-subdomain.py | Pre-validation of subdomain and backend |
Validation Script Usage:
Expected Outcomes
Success:
- Service entry added to domains.toml
- Caddyfile regenerated with new service block
- Pi-hole DNS entry created
- Cloudflare Access application created (if require_auth=true)
- Caddy reloaded with new certificate
- Service accessible at https://{subdomain}.temet.ai
Partial Success:
- Configuration applied but tunnel not configured (user reminder provided)
- Certificate pending (may take 1-2 minutes)
Failure Indicators:
- domains.toml syntax error -> validate and fix
- Caddy reload failed -> check Caddyfile syntax
- DNS not resolving -> check Pi-hole logs
- Certificate error -> check Cloudflare API token
Integration Points
This skill integrates with:
| Component | Purpose | |
|---|---|---|
domains.toml | Central configuration source | |
manage-domains.sh | Applies configuration changes | |
generate-caddyfile.py | Generates Caddyfile from domains.toml | |
generate-pihole-dns.py | Updates Pi-hole DNS entries | |
sync-cloudflare-access.py | Creates/updates Access applications | |
| Cloudflare Tunnel | Manual public hostname configuration |
Related Skills:
setup-new-domain-services- For adding new top-level domainstroubleshoot-ssl-certificates- For certificate issuesdiagnose-cloudflare-access- For authentication problems
Expected Benefits
| 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 |
Requirements
Environment:
- Docker running with caddy, pihole containers
- Cloudflare tunnel connected
- Valid
.envwith API tokens
Tools needed:
- Read, Write, Edit (for domains.toml)
- Bash (for apply script and verification)
- Grep (for duplicate checking)
Red Flags to Avoid
- [ ] Do not add duplicate subdomains (check first)
- [ ] Do not use uppercase in subdomain names
- [ ] Do not forget the manual tunnel step
- [ ] Do not skip verification after apply
- [ ] Do not use
host.docker.internalon Linux (use actual IP) - [ ] Do not enable both HTTPS and HTTP unless specifically needed
- [ ] Do not set require_auth=false unless service must be public
- [ ] Do not skip tls_insecure for services with self-signed certs
Notes
- The Pi IP is typically
192.168.68.135for services running on the Pi - IoT devices need
strip_cf_headers = trueto work properly - Services with self-signed certs need
tls_insecure = true - Root redirects (like
/admin/) useroot_redirectoption - The tunnel step is manual because Cloudflare API for tunnels is complex
- Always run
./scripts/manage-domains.sh listto see current services
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/caddy-subdomain-add/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 13 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dawiddutoit/custom-claude/caddy-subdomain-add)