Jan So7o: I, then, defy.

My server is a phone that won’t fold

Inspired by "My server is a phone now", hackernews entry, here's my version — except mine is a phone that can't fold.

It's an old Samsung Galaxy Z Flip 3. Fold it and it shuts down. The screen has four permanent pink lines running down it. By any reasonable measure it's e-waste. But it has a working Termux install, and — because it physically refuses to fold — it stays open, permanently unfolded, which turns out to be exactly the right posture for an always-on server (capped at an 80% charge threshold so the battery doesn't turn into a pillow).

The stack

Everything lives in Termux on Android, supervised by runit and started at boot via Termux:Boot:

  • Hono.js on Node 26
  • PocketBase 
  • Cloudflare Tunnel 

The Hacker News upvotes

On the phone, I create some scripts for scraping:

  • hn-upvoted.mjs — logs in (password or a browser user cookie), saves the session, lists upvoted stories.
  • hn-upvote-sync.mjs — walks the newest upvoted pages and upserts new stories into PocketBase, stopping at the first already-synced item. Incremental runs take about two seconds.
  • upvotes.pb.js — a PocketBase JSVM hook: a cronAdd("0 * * * *") firing the sync every hour, plus a routerAdd JSON endpoint.

Each synced story is enriched from the official HN Firebase item API. All live in an upvotes PocketBase collection, served date-grouped at z3.so7o.com/hn-upvotes and as JSON at /pbdb/me/upvotes.json.

The about page

The blog you're reading runs on a real VPS — but the Hacker News section of the about page doesn't. It fetches the phone's JSON server-side through a small Astro element with a one-hour TTL cache. If the phone is asleep, dead, or mid-update, the blog quietly falls back to the last-good snapshot as upvotes-cache.json.

How it got built

All of it — the monorepo, the sync scripts, the hooks, the tunnel config — was set up AI-aided: the Pi coding agent doing the thinking and typing, Herdr keeping the pi coding and processes alive on Termux. A broken phone, a coding agent, and an hour of cron.

Now that the pipeline is solid, I’m left wondering: what else should I run on this server?

It wasn't about the physical device, but the philosophy: repurposing obsolete hardware for functional utility.