<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o" -->

---
title: MOVING My Website from Static Hosting to Caddy! | daily.dev
description: A walkthrough of migrating a personal website from Linode object storage to a self-hosted VPS running Caddy web server. The setup includes privacy-respecting...
canonical: https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: MOVING My Website from Static Hosting to Caddy! | daily.dev
og:description: A walkthrough of migrating a personal website from Linode object storage to a self-hosted VPS running Caddy web server. The setup includes privacy-respecting...
og:url: https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o
og:image: https://api.daily.dev/og/posts/G52Tx8r0o.png
og:image:alt: MOVING My Website from Static Hosting to Caddy!
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MOVING My Website from Static Hosting to Caddy!

**[apalrd's adventures](https://daily.dev/sources/apalrd)** · 4 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of migrating a personal website from Linode object storage to a self-hosted VPS running Caddy web server. The setup includes privacy-respecting analytics via Goatcounter (reading Caddy log files stored in a RAM-based /run directory to avoid persistent IP storage), systemd service units for Caddy and Goatcounter, and an automated Hugo site rebuild triggered daily via a systemd timer and git pull.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.apalrd.net/posts/2023/studio_website>

## Questions this post answers

### How do I set up Goatcounter with Caddy to get privacy-respecting web analytics on a self-hosted VPS?

Run Caddy to serve your static site and write access logs to a directory in /run (a RAM disk on modern Linux), which avoids persisting IP addresses to disk. Goatcounter reads those log files every few seconds, feeds IPs into a geo-IP database for country detection, then discards them. Caddy caps log files at 10MB, and systemd units manage both services. Once data reaches the Goatcounter database it is sufficiently anonymized.

_Developers self-hosting their analytics stack find related setups and configs on daily.dev._

### How can I auto-rebuild a Hugo site on a VPS using systemd timers?

Create a systemd service unit that runs git pull followed by hugo -v to regenerate the site, then add a systemd timer unit to trigger that service on a schedule (e.g., daily). You can also trigger the rebuild manually over SSH with systemctl start webrebuild, and inspect the output in journalctl.

_Hugo site operators managing their own VPS deployments share patterns like this on daily.dev._

## Similar posts on daily.dev

- [Caddy handles reverse proxying so well that I ditched my entire toolchain](https://daily.dev/posts/caddy-handles-reverse-proxying-so-well-that-i-ditched-my-entire-toolchain-glaqlmpl7) · XDA Developers · 0 upvotes · 0 comments
- [The Switch To Linux And The Beginning Of My Self-Hosting Journey](https://daily.dev/posts/the-switch-to-linux-and-the-beginning-of-my-self-hosting-journey-nwybyqfkf) · Hacker News · 3 upvotes · 0 comments
- [Migrating from Codeberg Pages to an OpenBSD VPS](https://daily.dev/posts/migrating-from-codeberg-pages-to-an-openbsd-vps-sxyhvh5jq) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#self-hosting](https://daily.dev/tags/self-hosting)

[View this post on daily.dev](https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"MOVING My Website from Static Hosting to Caddy!","url":"https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o"},"datePublished":"2026-08-11T08:56:31.808Z","dateModified":"2026-08-11T09:35:32.424Z","description":"A walkthrough of migrating a personal website from Linode object storage to a self-hosted VPS running Caddy web server. The setup includes privacy-respecting...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/edc295618f043d47025776856b26c3b7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/edc295618f043d47025776856b26c3b7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"apalrd's adventures","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"apalrd's adventures","logo":"https://media.daily.dev/image/upload/s--4zkx8dRj--/f_auto,q_auto/v1786438309/logos/apalrd?_a=BAMAMicg0","url":"https://daily.dev/sources/apalrd"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,self-hosting","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"apalrd's adventures","item":"https://daily.dev/sources/apalrd"},{"@type":"ListItem","position":3,"name":"MOVING My Website from Static Hosting to Caddy!"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/moving-my-website-from-static-hosting-to-caddy--g52tx8r0o#faq","mainEntity":[{"@type":"Question","name":"How do I set up Goatcounter with Caddy to get privacy-respecting web analytics on a self-hosted VPS?","acceptedAnswer":{"@type":"Answer","text":"Run Caddy to serve your static site and write access logs to a directory in /run (a RAM disk on modern Linux), which avoids persisting IP addresses to disk. Goatcounter reads those log files every few seconds, feeds IPs into a geo-IP database for country detection, then discards them. Caddy caps log files at 10MB, and systemd units manage both services. Once data reaches the Goatcounter database it is sufficiently anonymized. Developers self-hosting their analytics stack find related setups and configs on daily.dev."}},{"@type":"Question","name":"How can I auto-rebuild a Hugo site on a VPS using systemd timers?","acceptedAnswer":{"@type":"Answer","text":"Create a systemd service unit that runs git pull followed by hugo -v to regenerate the site, then add a systemd timer unit to trigger that service on a schedule (e.g., daily). You can also trigger the rebuild manually over SSH with systemctl start webrebuild, and inspect the output in journalctl. Hugo site operators managing their own VPS deployments share patterns like this on daily.dev."}}]}
```

