Skip to content
← Back to blog

November 17, 2026 · 3 min read

Counting how many people install my Linux programs without tracking anyone

I wanted to know whether anyone installs my programs without putting telemetry in the apps. A Cloudflare Worker in front of GitHub Pages counts downloads in D1 without storing IPs, and one header too many broke everything.

In this post
  1. A Worker in front of Pages
  2. What isn’t stored
  3. Indexes say more than downloads
  4. The extra header
  5. What I learned

repo.rossmel.com is my own Linux software repository: my apps install and update from there with pacman, apt or dnf, like any other program. With that up, the usual question showed up: is anyone using it? GitHub shows how many times each Release file was downloaded, but that number was inflated: every repository deploy downloads the packages to sign them, and that counts too.

The easy way out would be telemetry in the apps: have them report when they open. I didn’t want that. A music visualizer has no business telling anyone when you use it.

The alternative is to count in the one place everybody goes through: the package server.

A Worker in front of Pages

repo.rossmel.com was a GitHub Pages site with a custom domain. Now the domain points to a Cloudflare Worker, and the Worker forwards every request to Pages as is. Nothing changes for users: same files, same signatures.

Along the way, the Worker classifies the request: is it a package, an index, a program’s page or the check script? Which format (pacman, APT, DNF, F-Droid, APK)? Which program and version? Which kind of client asked (pacman, apt, dnf, F-Droid or a browser)?

And it adds one to a D1 database (Cloudflare’s SQLite), in a single table:

hits (day, kind, fmt, item, version, client, country, count)

Rows are daily counts. There’s no column that tells one person from another.

What isn’t stored

StoredNot stored
day, program, version, formatIP address
kind of client (pacman, apt…)full user agent
country, as Cloudflare reports itanything that identifies someone

The country comes from Cloudflare, which already computes it for every request; the Worker doesn’t see or store the IP to get it.

Indexes say more than downloads

The most useful number isn’t package downloads but index downloads: ross.db, InRelease, repomd.xml and the F-Droid index. Every system with the repository added fetches them when it checks for updates, usually once a day. So indexes fetched per day are a fair approximation of how many machines have the repository installed.

To read it I have a command, ross-stats, that sums up the last few days by program, version and format.

The extra header

The first version of the Worker copied every header of the original request and sent them to GitHub Pages. Result: Pages answered “Site not found” to everything.

Instead of chasing which header caused it, I flipped the logic: the Worker builds a new request and sets only a short list of headers (the user agent, the format ones and the caching and range ones). With that, Pages answered correctly. Pages’ redirects are rewritten so they point to the public domain and not to GitHub’s internal address.

A counting detail: package managers sometimes resume an interrupted download by asking for just a range of the file. Those requests don’t count, except the one starting at byte 0, so the same download isn’t counted twice.

Two more deployment details: Cloudflare’s API wants the Worker file named worker.js in the part of the form where it’s uploaded, and after the switch my own computer kept resolving the old domain for a few minutes because of the DNS cache. To test without waiting, I forced the resolution to Cloudflare with curl --resolve.

Before opening it up, I wiped the counts from my tests: the counter started at zero.

What I learned

  • You can measure usage without telemetry: the server already sees what’s needed; you just decide what to keep.
  • Designing the table with no identifying columns is easier than promising you won’t use them.
  • Index fetches are a good approximation of active installs.
  • A proxy should forward the minimum: copying everything breaks more than it fixes.

Rossmel Abasto — Frontend → Fullstack Developer. LinkedIn · GitHub

Leer este artículo en español →See the case studyrepo.rossmel.com →My own Linux software repository: my apps install and update with pacman, APT or DNF (and F-Droid on Android), at zero cost.

Keep reading

Write to me: I read everything and reply by email.

Questions or comments about this post?

send-mail.sh