Repository navigation
EdgeWatch: new service - #437
Merged
Merged
Conversation
Add a stack for EdgeWatch, a scheduled network-surface monitor, with the upstream container hardening, a tracked config.yaml for Tailscale Serve, and a row in the service list.
… note /metrics behind Serve Run tailscale status through the Compose service key instead of a container name that changes with SERVICE. Say that Serve forwards /metrics too once web.metrics is on, as upstream advises keeping it off the proxy.
jackspiering
marked this pull request as ready for review
November 24, 2026 07:47
Say what the scanners reach from the sidecar's network, and add a tested override that attaches another stack's network to the tailscale service. Also point to the setup-token command when a recreated container no longer shows the token in its log.
crypt0rr
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a stack for EdgeWatch, a self-hosted network-surface monitor that scans with Nmap and Naabu on a schedule and alerts when the exposed ports change. It uses the image upstream publishes,
ghcr.io/crypt0rr/edgewatch:latest.compose.yamlfollows the template. It keeps upstream's hardening on theapplicationcontainer:cap_drop: ALLplusNET_RAW,SETUID,SETGID, andKILL,no-new-privileges, a read-only root, a 128 MB/tmptmpfs withTMPDIRin the data folder, a 512 MB memory limit, a 7m stop grace period, and boundedjson-filelogs.config.yamlis upstream'sconfig.example.yaml. It setsweb.allowed_hoststoedgewatch.<tailnet>.ts.netandweb.trusted_proxiesto loopback for Tailscale Serve, and adapts the comments to the sidecar setup. It's mounted read-only, as upstream does. Compose refusescontentconfigs for a read-only container (fileis the sole supported option), so a tracked file is the only way to keepread_only: true. Vikunja and Caddy already track a file at the stack root.wgetagainst/healthz(CONTRIBUTING option 2). It returns 200 when ready and 503 while starting or unhealthy. The check keeps upstream's 20m start period and 5sstart_intervalso migrations can finish.portsblock, because EdgeWatch refuses non-loopback listeners.Related Issues
Verification
docker compose config --quietfromservices/edgewatch, with dummy values for required variables (there are none). It exits 0 with no "variable is not set" warnings.check-service-list.shandcheck-sidecar.shalso pass locally, and the Serve JSON is valid.curl --resolve <name>.<tailnet>.ts.net:443:<tailscale-ip>returned 200 for the console and for/api/v1/setup/status. I ran the health command (wget -q -O /dev/null http://127.0.0.1:8080/healthz) withdocker exec, and it exits 0.__Host-edgewatch_sessioncookie, so EdgeWatch detected HTTPS behind Serve.X-Forwarded-Forworks.scanme.nmap.orgon ports 22 and 80 found both open. Nmap's raw packets and the scanner sandbox work in the sidecar's namespace: identity pool, Landlock, and seccomp are enforced, andedgewatch healthreportsready.docker compose restartanddown/up.rumdl check --config .markdownlint.yml .(0.3.0, the version CI pins) on the whole repository, andgit diff --check origin/main, both clean.Also checked:
edgewatch.<tailnet>.ts.netstill inconfig.yaml, the daemon stops at start withweb.allowed_hosts[0]: invalid host name.Hostgets421 Misdirected Request.mkdir /var/lib/edgewatch/tmp: permission denied. A folder that Docker creates works.TZ.docker compose exec application edgewatch admin setup-token --config /etc/edgewatch/config.yaml --force, works with the read-only root and issues a new token, which created the first administrator in a second test. Within one minute of the previous token, it refuses withsetup token was issued too recently. A container that is recreated before setup is finished shows no token in its log, and this command issues one.filtered, and its name doesn't resolve.docker compose config), an EdgeWatch job found the container's open port by IP address and by container name. Internet scans kept working, and the default route stayed on the stack's own network.docker network rmof the other network fails with "active endpoints".Not run (taken from the upstream documentation): the Naabu SYN
NET_ADMINoverride, UDP and IPv6 scans, scanning Tailnet addresses, and ARM64.Impact on existing users
Checklist
Additional Context
tailscale.comdependency ingo.mod, and notailscaleortailscaledin the image. Upstream documents Tailscale Serve as a way to reach the loopback-only console, which is what the sidecar provides.network_mode: hostso scanners see the host's networks. Here the application shares the sidecar's namespace, as every stack does, so scans leave through Docker's network and can't see the host's own interfaces. Scans of external targets work, as tested above. To scan containers in other stacks, the README shows how to attach their networks to thetailscaleservice. The README lists this under "Deviations from the standard setup".start_interval. No other stack uses it, so the README mentions it under "Before you start".