Taking the VPS public — blog, swap, and a stale binary

June 24, 2026

Notes from getting the learning journal actually online.

The memory crunch

The 512MB droplet fell over under vim-go's tooling. gopls alone wanted more RAM than the box had. Two fixes:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile

The blog generator

Go + goldmark, generating static HTML from Markdown. Two binaries: gen builds the site, serve serves public/.

The bug that ate an hour

serve kept 404ing. The cause: http.Handle("/home/user/go/blog/", fs) — the directory path had been pasted into the URL route. Should have been http.Handle("/", fs). The file server was fine; it was just mounted at a URL nobody was requesting.

Lesson

A 404 with the file clearly present means the router, not the filesystem. Check the route before the permissions.

Still to do