· 1 Min read
Caddy deploy in ten minutes

Deploying static sites is easy — deploying them cleanly is a different story.
Produce the build#
npm run build produces dist/ — plain HTML, CSS and optimized images.
No Node required on the server.
Ship it#
rsync -avz --delete dist/ server:/var/www/site — that is the entire deploy
script. Placeholders like host and destination belong in environment variables.
Configure Caddy#
Caddy provisions TLS certificates automatically. The essentials: try_files
with a /404.html fallback and Cache-Control: immutable for the hashed
assets under /_astro/.
That’s it — ten minutes including coffee.