From 25e22759995c5294be9813d76d8bea4e94375a9e Mon Sep 17 00:00:00 2001 From: Paul Payne Date: Wed, 1 Jul 2026 16:54:27 -0700 Subject: [PATCH] deploy: fix tunnel unit name so deploy auto-reloads cloudflared MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _TUNNEL_NAME was "tunnel", but the deployment is named castle-tunnel, so unit_name() produced castle-tunnel.service — a unit that doesn't exist (the real one is castle-castle-tunnel.service). The is-active check never matched, so deploy printed "Tunnel not running" and skipped the ingress reload. New public: true services then 404'd until a manual tunnel restart. Set _TUNNEL_NAME = "castle-tunnel" to match the deployment name, mirroring _GATEWAY_NAME. Deploy now restarts cloudflared on ingress changes. --- core/src/castle_core/deploy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/castle_core/deploy.py b/core/src/castle_core/deploy.py index ee7f5cb..b8d12c8 100644 --- a/core/src/castle_core/deploy.py +++ b/core/src/castle_core/deploy.py @@ -190,7 +190,8 @@ def _acme_preflight(config: CastleConfig, messages: list[str]) -> None: ) -_TUNNEL_NAME = "tunnel" # the cloudflared service is castle-tunnel +# Tunnel service name in the registry → its systemd unit (castle-castle-tunnel). +_TUNNEL_NAME = "castle-tunnel" def _write_tunnel_config(registry: NodeRegistry, messages: list[str]) -> None: