diff --git a/template/deploy/setup-droplet.sh b/template/deploy/setup-droplet.sh index 10e4ae2..b352c47 100755 --- a/template/deploy/setup-droplet.sh +++ b/template/deploy/setup-droplet.sh @@ -28,7 +28,9 @@ chmod -R g+rX /opt/__SLUG__ # Caddy: the site and the game server's paths, from the template beside this script. sed "s|__HOST__|$HOST|" "$(dirname "$0")/Caddyfile.tmpl" > /etc/caddy/Caddyfile caddy validate --config /etc/caddy/Caddyfile -systemctl reload caddy +# Validation as root touches the access log; Caddy runs as caddy and must own it. +chown -R caddy:caddy /var/lib/caddy +systemctl restart caddy # Firewall: ssh + web only. ufw allow OpenSSH