Files
homelabstack/.claude/skills/homelab-ssh/SKILL.md
T
ginnoir 20165f48a0 chore: explicit container_name on every service, document compose v2 migration
Every service now has an explicit container_name, eliminating the
htpc-download-box_ prefix/suffix that compose derived from the directory.
Disambiguated duplicates follow type_context naming:
  postgres_resume / postgres_famapp / postgres_authentik
  minio_resume / minio_famapp
  redis_authentik

Also updates CLAUDE.md and the homelab-ssh skill to reflect:
- compose v2 (docker compose, space) replacing the old v1.27.4 standalone
- dc alias updated to docker compose
- htpc-download-box directory is now clean (legacy cruft removed)

Server-side migration steps (docker-compose-plugin apt install, alias
update, Docker Engine upgrade, old binary removal) are documented in
the session but not yet applied — run apply-compose.ps1 -Compose after
completing them.
2026-06-02 22:58:23 -05:00

2.4 KiB

name, description
name description
homelab-ssh Connect to and run commands on the valhalla homelab server (ginnoir@valhalla) over SSH, including docker-compose operations through the `dc` alias. Use when inspecting the live stack, tailing logs, restarting a service, reloading Caddy, or checking container/file state on the server.

homelab-ssh

The production homelab runs on a headless Ubuntu host reachable at ssh ginnoir@valhalla (key-based auth; resolves and works from this Windows host directly).

Connect (non-interactive / safe for automation)

Always pass -o BatchMode=yes so a missing key or password prompt fails fast instead of hanging:

ssh -o BatchMode=yes -o ConnectTimeout=8 ginnoir@valhalla "<command>"

The first Bash command of a session is gated by a GateGuard hook — state the user request + what the command does, then retry.

docker-compose via the dc alias

The stack uses Docker Compose v2 (docker compose plugin, installed via apt). On the server, dc is aliased in ~/.bashrc to:

docker compose -f ~/htpc-download-box/docker-compose.yml --env-file ~/htpc-download-box/.env

It's a shell alias, so it only exists in an interactive shell. Invoke it with bash -ic:

ssh ginnoir@valhalla "bash -ic 'dc ps'"
ssh ginnoir@valhalla "bash -ic 'dc logs -f --tail=200 <service>'"
ssh ginnoir@valhalla "bash -ic 'dc restart <service>'"
ssh ginnoir@valhalla "bash -ic 'dc up -d'"
ssh ginnoir@valhalla "bash -ic 'dc exec caddy caddy reload --config /etc/caddy/Caddyfile'"

Use the compose service name (sonarr, caddy, app, …). Without bash -ic, dc is "command not found".

Key paths on the server

  • ~/htpc-download-box/docker-compose.yml, ~/htpc-download-box/.env — stack definition
  • /config/caddy/Caddyfile — Caddy config (mounted into the caddy container at /etc/caddy/Caddyfile)
  • /config/<service>/ — per-service persisted config; /storage1/ — media & data; plus named Docker volumes
  • ~/htpc-download-box/ contains only docker-compose.yml and .env — the legacy cruft has been cleaned out

Notes

  • Read-only exploration of /config, /storage1, and container state is fine for answering questions.
  • Avoid destructive commands against the live stack without explicit confirmation.
  • To push config changes and apply them, use the homelab-apply skill; to pull prod config into the repo, use homelab-sync.