From 239dbd1d7d4f330a9eef73f99327952ce1a11917 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 17 Apr 2026 09:38:04 +0200 Subject: [PATCH] fix(slink): restart caddy after config write, add API_URL to client env - apt auto-starts caddy with default config (port 80); systemctl enable --now is a no-op if already running, so new Caddyfile (:8080) was never loaded - client falls back to http://localhost:8080 without explicit API_URL; add API_URL=http://127.0.0.1:8080 to /etc/default/slink-client --- install/slink-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/slink-install.sh b/install/slink-install.sh index c62f6531..0e25f0ae 100644 --- a/install/slink-install.sh +++ b/install/slink-install.sh @@ -88,6 +88,7 @@ PORT=3000 NODE_ENV=production BODY_SIZE_LIMIT=Infinity ORIGIN=http://${LOCAL_IP}:3000 +API_URL=http://127.0.0.1:8080 EOF cat <<'EOF' >/etc/systemd/system/slink-client.service [Unit] @@ -106,7 +107,8 @@ RestartSec=5 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now redis-server php${PHP_VER}-fpm caddy slink-client +systemctl enable -q --now redis-server php${PHP_VER}-fpm slink-client +systemctl restart caddy { echo "Slink Credentials" echo "Admin Email: admin@slink.local"