Commit Graph
11 Commits
Author SHA1 Message Date
tben cbd5451ab7 Run the Caddy TLS ingress as a Docker container
Caddy previously ran as a host binary in /opt/caddy with a wgui-caddy
systemd/OpenRC unit. Only Caddy is containerized; the app still runs on the
host as root because it shells out to wg, ip and iptables.

- Add caddy-container-commands.ts as the single source of truth for the
  run/exec/validate/inspect argument arrays. Every value stays a separate
  argv element, the image is pinned to caddy:2.11.4-alpine, and the
  entrypoint is set explicitly because some mirrors publish the image with
  a null Entrypoint (which made Docker exec "run" as a binary).
- Rewrite install-caddy.sh: require_docker with distro-specific hints,
  pull + recreate the container, assert it is running and echo the daemon
  error instead of discarding it, normalize the admin socket path in
  existing Caddyfiles, and clean up a legacy native install only after the
  container is up so the ingress port is never unbound. Add
  --purge-legacy / --purge for hosts that want to drop the old install
  without installing the container.
- Move the admin socket to /var/lib/wgui/caddy/admin.sock so it lives
  inside the mounted Caddy dir and reloads work over docker exec.
- Validate candidate configs in a throwaway container, mounting the TLS
  dir read-only as well: provisioning the tls app loads every certificate
  referenced by a tls directive, so without that mount a route with a
  certificate failed validation and its Caddyfile was never committed.
- Report docker-based installed/version/service_active, skip
  validate/reload with a warning when the image is absent, and update the
  system setup tool check to look for docker.
- Issue certificates with a docker exec reload command and chown files to
  root:root, since the container reads them through a read-only mount.
- Update the Setup UI copy and docs (README, AGENTS.md).

Also drops the unused EmptyContent import and a stray debug log in the
client route form, and stops passing the unsupported cancel_href prop to
ClientRouteForm from the route add/edit pages.
2026-10-21 14:34:16 +01:00
tben ed4a6f3ec8 Add TLS feature with Caddy 2026-10-21 09:13:59 +01:00
tben dbae73a746 Add firewall rules logic for all hosts 2026-09-27 14:25:27 +01:00
tben bbf29a5c1a Update README.md. Add link to site URL 2026-09-27 07:10:28 +01:00
tben d52c584c8f Update README.md. Update curl installation URL 2026-09-21 07:13:31 +01:00
tben 501b99cbc8 Update README.md. Remove deploy and docker. Add zip and unzip to dependencies 2026-09-21 04:30:51 +01:00
tben 7f7f295546 Update README.md 2026-09-20 18:43:41 +01:00
tben bd1aa199d3 Update README.md 2026-09-20 18:38:34 +01:00
tben 86a58c6869 Update README.md 2026-09-20 18:32:54 +01:00
tben f05384d8fe Add admin setup page 2026-09-20 18:15:51 +01:00
tben 4d75af0418 First Commit 2026-09-12 13:56:36 +01:00