Skip to content

feat: initial WireGuard#100

Open
tonsV2 wants to merge 16 commits into
development-2.0from
feat/vpn
Open

feat: initial WireGuard#100
tonsV2 wants to merge 16 commits into
development-2.0from
feat/vpn

Conversation

@tonsV2
Copy link
Copy Markdown
Collaborator

@tonsV2 tonsV2 commented May 11, 2026

No description provided.

tonsV2 and others added 7 commits May 12, 2026 06:55
Grafana is no longer publicly accessible. It's now only reachable at
https://grafana.internal for clients connected to the WireGuard VPN.

- Add stacks/traefik/conf.d/internal.yml with VPN-only routes for
  grafana.internal and glowroot.internal (served with mkcert wildcard cert)
- Mount overlays/wireguard/certs/ into stacks/traefik so certs are shared
  between the wireguard and traefik compose projects
- Fix wireguard overlay incompatibilities with multi-instance approach:
  use bind-mount for certs instead of named volume, change network from
  `frontend` to `proxy`, remove orphaned traefik service override that
  referenced the now-deleted single-instance dynamic.yml
- Add service definitions to overlays/wireguard/traefik/internal.yml
  (grafana-internal → monitoring-grafana:3000, glowroot-internal → app:4000)
- Remove stacks/traefik/conf.d/monitoring.yml.template and the
  start-monitoring Makefile step that generated it (public Grafana route)
- Remove GRAFANA_HOSTNAME from monitoring .env.template and generate script;
  hardcode GF_SERVER_ROOT_URL=https://grafana.internal in docker-compose.yml
- Gitignore overlays/wireguard/certs/ and config/ (contain private keys)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds wireguard-proxy service that listens on 10.8.0.1:443 (wg0 IP) inside
the WireGuard container's network namespace and forwards to traefik:443.
Docker DNS resolves 'traefik' per connection, so it handles Traefik
container restarts without needing hardcoded IPs or iptables DNAT rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread overlays/wireguard/docker-compose.yml Outdated
Comment thread overlays/wireguard/docker-compose.yml Outdated
Comment thread server-tools/inventory.ini Outdated
Comment thread overlays/wireguard/traefik/internal.yml Outdated
Comment thread overlays/wireguard/scripts/mkcert.sh Outdated
Comment thread Makefile
Comment thread docs/vpn.md
tonsV2 added 8 commits May 19, 2026 04:13
Unreferenced near-duplicate of stacks/traefik/conf.d/internal.yml,
which is the file Traefik actually loads.
`make get-vpn-ca` writes the root CA to the working tree so clients
can install it; it should not land in commits.
The mkcert container that writes the key and the Traefik container
that reads it both run as root, so the key does not need to be
world-readable.
The `domain: "*.internal"` env var was never consumed: the compose
file overrides the image entrypoint with `command: sh /mkcert.sh`,
and the script hardcodes the two host names. The generated cert is
already a 2-SAN cert, not a wildcard.
Sweep em dashes out of files added or modified on this branch.
Pre-existing em dashes in master (README intro and footer) are left
alone as out of scope.
The vishnunair/docker-mkcert image only publishes a `latest` tag, so
pinning by digest is the only stable reference available.
Previously mkcert.sh produced a single 2-SAN cert (grafana.internal +
glowroot.internal) shared by both routes. Switch to one cert per host
and list both in Traefik's tls.certificates so SNI selects the right
one.

Existing deployments must clear the wireguard-certs volume to drop the
old internal.crt/internal.key on first run after this change.
@tonsV2 tonsV2 requested a review from radnov May 18, 2026 21:31
Replaces the pinned vishnunair/docker-mkcert digest with a minimal custom Dockerfile that fetches mkcert directly from the upstream release URL, removing the dependency on a third-party image.
@tonsV2 tonsV2 marked this pull request as ready for review May 19, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants