Hello, kelog
This is the first post on kelog. Before writing about anything else, it seems right to write down how the site itself works, because it took a few detours to get here.
The short version#
The whole site is a folder of static HTML files, served by nginx on an ordinary Ubuntu desktop at home. Nothing on the router is port-forwarded. Instead, the machine keeps an outbound connection open to Cloudflare, and visitors reach it through that.
visitor
│ HTTPS
▼
Cloudflare edge
│ outbound tunnel (QUIC)
▼
cloudflared on this machine
│
▼
nginx :80 → static files
Why a tunnel#
A home connection makes hosting awkward in two ways:
- NAT. The machine has a private address behind the router, so the internet can't reach it directly.
- Blocked ports. Many home ISPs block incoming traffic on ports 80 and 443 anyway.
A tunnel sidesteps both. cloudflared dials out to Cloudflare, which is always allowed, and Cloudflare sends requests for kelog.org back down that connection. As a bonus, HTTPS certificates are handled at Cloudflare's edge.
How posts get written#
Posts are plain Markdown files with a few lines of front matter:
---
title: Hello, kelog
tags: [meta, self-hosting]
---
The post body goes here.
A small Python script turns them into HTML pages, a tag index, and an RSS feed. Saving a file rebuilds the site automatically, so publishing is just writing.
That's the setup. Everything after this post is about something else.