/SKILL.md
Add a new service to my homelab — Docker/LXC deployment, Caddy reverse proxy, Authentik SSO, and Cloudflare DNS
npx skillsauth add jamesperenchio1/homelab-add-service homelab-add-serviceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Onboard a new service to my homelab infrastructure. Covers deployment, reverse proxy routing, SSO authentication, and DNS.
When I want to add a new self-hosted service to my homelab — whether it's a Docker container, an LXC container, or a native service.
Internet → Cloudflare (TLS termination) → cloudflared tunnel → Caddy (port 80) → backend service
192.168.1.102/etc/caddy/Caddyfilelocalhost:9000 (compose at /opt/authentik/docker-compose.yml)cloudflared (systemd service)10.55.205.x subnetAsk me:
myapp.gingerbrosshop.com)/mnt/hdd or /mnt/nvme-usb?If Docker on host:
/opt/<service-name>/docker-compose.yml/opt/ for each service127.0.0.1:<port> unless it needs LAN accesscd /opt/<service-name> && sudo docker compose up -dIf LXC container:
lxc launch ubuntu:24.04 <name> (or appropriate image)lxc exec <name> -- bashlxc config device add <name> <label> disk source=/mnt/... path=/mnt/...lxc list for Caddy configEdit /etc/caddy/Caddyfile and add a new site block.
Critical rules:
header_up X-Forwarded-Proto https — never use {http.request.scheme} (Cloudflare terminates TLS, so scheme is always http at Caddy)localhost:<port><container-ip>:<port>With Authentik forward auth:
<subdomain>.gingerbrosshop.com {
forward_auth localhost:9000 {
uri /outpost.goauthentik.io/auth/caddy
copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Entitlements X-Authentik-Email X-Authentik-Name X-Authentik-Uid X-Authentik-Jwt X-Authentik-Meta-Jwks X-Authentik-Meta-Outpost X-Authentik-Meta-Provider X-Authentik-Meta-App X-Authentik-Meta-Version
trusted_proxies private_ranges
}
reverse_proxy <backend-address> {
header_up X-Forwarded-Proto https
}
}
Without auth (or native OIDC only):
<subdomain>.gingerbrosshop.com {
reverse_proxy <backend-address> {
header_up X-Forwarded-Proto https
}
}
If the service uses WebSockets, use a bare reverse_proxy directive (forward auth + WebSockets works fine with this pattern).
Apply with: sudo systemctl reload caddy
For forward auth:
external_host: https://<subdomain>.gingerbrosshop.commode: forward_singlecd /opt/authentik && sudo docker compose restart server
For native OIDC:
redirect_uris: must be a list of objects [{"matching_mode":"strict","url":"https://<subdomain>.gingerbrosshop.com/callback"}] — NOT plain stringscd /opt/authentik && sudo docker compose restart server<subdomain> pointing to the tunnel hostname<subdomain>.gingerbrosshop.com → http://192.168.1.102:80caddy validate --config /etc/caddy/Caddyfilecurl -s -o /dev/null -w "%{http_code}" http://<backend-address>/curl -s -o /dev/null -w "%{http_code}" -L https://<subdomain>.gingerbrosshop.com/journalctl -u caddy -fcd /opt/authentik && sudo docker compose logs server --tail=50 -fsudo docker logs <name> --tail=50 -f or lxc exec <name> -- journalctl -fdocker restart docker restarts ALL containers — use docker compose restart or docker restart <name> instead192.168.1.102:9000, not 127.0.0.1:9000dashboard, not jellyfindocker compose up -d --force-recreate <service>devops
Local text-to-speech via sherpa-onnx (offline, no cloud)
devops
Feishu cloud storage file management. Activate when user mentions cloud space, folders, drive.
devops
Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.
devops
Local text-to-speech via sherpa-onnx (offline, no cloud)