# Two Days

I built Runlight in a little over a month, and deciding what it wouldn't do shaped a lot of how it turned out.

By Jon C. Phillips · November 16, 2026 · https://joncphillips.com/two-days/

[Runlight](https://runlight.sh) is a free, open source analytics tool that runs inside the apps you already have. It's live on my own sites now, and people are already filing bug reports and feature requests.

The rule I'm proudest of is a **deletion rule**, which says no visitor identifier lasts more than two days.

That rule was the first big decision I made, and pretty much every other one got measured against it.

## Why Build Another One

There are plenty of analytics tools already, and I've used most of them.

I've run Google Analytics on more sites than I can count. I've paid for [Fathom](https://usefathom.com) and [Plausible](https://plausible.io), and both are good products. I've self-hosted [Umami](https://umami.is), and I even ran [my own fork](https://github.com/phillips-jon/umami) of it for a while to bend it toward what I wanted.

**Every one of them left me with the same itch.**

I wanted analytics that lived inside the apps I already run, with the data sitting in my own database next to everything else.

I also wanted it to be open source, because [I love open source software](https://github.com/phillips-jon) and most of what I build lives on GitHub. And I wanted it to be private by default, in a way I could verify by reading the code myself.

When the tool you want doesn't exist in the shape you want, you either keep compromising or you build it. I'd been compromising for years.

## It Lives in Your App

The first decision was where Runlight runs.

Most analytics products are a service, where you sign up and your visitor data flows to someone else's servers. Runlight works the other way around.

You install it as a library inside your own app, and your stats show up at `/runlight` on your own domain.

For sites that aren't a good fit for that, there's a standalone server you can run with one command or a Docker image. Either way, the data lives in a database you control.

It means there's no account to create, and no third party ever sees your traffic.

It also cost me the easy business model, because a library running on your users' own servers is much harder to turn into a subscription than a hosted service. I knew that going in, and I'm cool with it.

## It Forgets on Purpose

The second decision is the one in the title.

Runlight never sets a cookie and never stores an IP address or a full user agent.

That's also why there's no consent banner to show (you should still show one if you have other scripts on your page, this is not legal advice, only that Runlight doesn’t require a consent banner).

Visitors are counted with a hash, and the hash depends on a random salt that changes every day. The actual function in the code is short enough to show in full.

```ts
export async function visitorHash(salt: string, site: string, ip: string, ua: string): Promise<string> {
  return (await sha256(`${salt}\n${site}\n${ip}\n${ua}`)).slice(0, 16);
}
```

Each day gets a new salt, and old salts are deleted within four days. Once a salt is gone, that day's hashes can never be recomputed or matched to anyone's later visits. A visitor lasts one day, or until a visit that runs past midnight ends.

That's where the **two days** come from.

I'm far from the first to take this approach.

Plausible and Fathom use the same family of ideas, and I'm happy to be in that same group. The difference is that with Runlight, **the whole thing runs on your server**, so you can read the code that does the forgetting.

I applied the same instinct everywhere I could.

When Runlight checks whether a visiting AI agent really comes from the company it claims, it compares the address against that company's published list and then drops it, keeping only whether it matched. The report emails draw the logo in HTML instead of loading an image, so opening one fetches nothing.

## What I Cut

Before launch, I dropped heatmaps and revenue attribution that follows a person across weeks of visits.

Both are features people _love_, and both need you to keep more about each visitor than I was comfortable keeping.

Maybe they'll come back one day as optional add-ons, off by default. For the first release, any feature that needed long-term identity didn't ship. I can live with that.

## The Decisions at a Glance

This table lays out every big call, with the reason behind it and what it cost me.

| Decision | Why I made it | What it cost |
| --- | --- | --- |
| Runs inside your app | Your data stays in your database | A much harder path to revenue |
| Forgets visitors within two days | Nothing to leak, no consent banner | No returning visitors over weeks, no long-term cohorts |
| No heatmaps or cross-visit revenue attribution | Both need long-term identity | Two features people ask for |
| Every major language and CMS | Cover as much ground as possible | A huge amount of tedious work |
| Counts and verifies AI agents | They're a real and growing share of traffic | More lists to maintain and refresh |
| Free and open source | I love open source and want it to spread | No subscription revenue, at least for now |
| Shipped in November | Shipping early beats never shipping | A first release that's solid, with rough edges still to find |

If you're building something, I'd encourage you to make a table like this for your own product and be very honest in the cost column.

## Every Stack, the Same Tables

The decision that cost me the most hours was making Runlight run almost everywhere.

On top of the [JavaScript library](https://runlight.sh/docs/install/) and the [standalone server](https://runlight.sh/docs/server/), it runs in [PHP](https://runlight.sh/docs/php/), [Python](https://runlight.sh/docs/python/), [Ruby](https://runlight.sh/docs/ruby/) and [Rails](https://runlight.sh/docs/rails/), [Go](https://runlight.sh/docs/go/), [Java](https://runlight.sh/docs/java/), [.NET](https://runlight.sh/docs/dotnet/), [Elixir](https://runlight.sh/docs/elixir/), and [Rust](https://runlight.sh/docs/rust/), with plugins for [WordPress](https://wordpress.org/plugins/runlight/), [Drupal](https://www.drupal.org/project/runlight), and [Craft CMS](https://plugins.craftcms.com/runlight).

![The Runlight dashboard inside the WordPress admin](https://joncphillips.com/uploads/articles/two-days-wordpress.jpg "The Runlight dashboard, mounted in WordPress.")

Every one of them serves the same dashboard and uses the same database tables, so you can switch from one to another without losing your data.

It was a lot of tedious work, since each language has its own conventions and its own creative ways of breaking. The rule that keeps it sane is that behaviour lands in TypeScript first, and every other implementation has to pass the shared test fixtures that come out of it.

It was worth it, because I wanted the person running a WordPress blog and the person running a Rust service to get the same tool.

Every port I added is another group of people who can use it without rewriting anything.

I've written about [what maintaining your own software really costs](https://joncphillips.com/software-is-not-dead/), and a dozen ports is a lot of maintenance. I went in knowing it, and I'd honestly make the same call again.

## A New Kind of Visitor

A growing share of the traffic to any site now comes from AI agents.

Some are crawling for training data, and some are reading a page live because a person asked a question.

I've argued before that [we're writing for an audience of agents](https://joncphillips.com/an-audience-of-agents/), so it felt wrong to build an analytics tool that ignored them. Runlight counts them separately and splits live fetches from crawls, so you can see when an assistant read your page on someone's behalf.

It also checks whether an agent is who it says it is.

Anyone can put "GPTBot" in a user agent, so a fetch only shows under an agent's real name when it comes from an address that company publishes, and everything else shows as claimed.

## The Assistant Suggests, You Confirm

Runlight has an assistant that answers questions about your numbers right inside the Runlight dashboard. It can also prepare goals, funnels, email reports, and share links for you.

The one rule I held firm on is that _it prepares first_ and then it requires confirmation.

Nothing changes until you've looked at it and said yes. The MCP server that connects Runlight to other AI apps is read-only for the same reason.

Letting an assistant change your analytics settings on its own felt like a problem waiting to happen, so I drew that line before launch.

## Free, For Now

Runlight is free, and there's no paid version.

Part of that is philosophy, since I want it to spread and I want people to run it without asking anyone's permission. Part of it is that I don't know yet what a sustainable version looks like, and the people using it will hopefully tell me.

I'm exploring options like sponsorships, and maybe a hosted version someday if enough people want one. For now, I'm focused on making the open source version as good as I can.

## Shipping in November

I could have waited until January, since there was always one more feature or one more port to add.

I shipped in November because shipping early beats never shipping, and because I believed it was solid enough for a first release. I've written about [shipping while scared](https://joncphillips.com/ship-it-scared/) before, and I was definitely a little scared hitting publish on this one.

Within a few days, people started filing bug reports and feature requests, which is the best possible sign, because it means they're actually using it.

Most of those issues are things I probably would have never have found on my own or simply would not have thought about. This is exactly why I love open source software.

## Two Days

Once I'd decided Runlight would forget, every later decision had a test to pass.

Does this feature need to remember someone, and does it keep data I don't need?

Every product I've worked on over the years drifted toward keeping more data, because storage is cheap and it always feels useful later. With Runlight I went the other way, and the two-day rule is the part I'm most proud of.
