Time: an hour to set up, then nothing; it runs itself. Cost: nothing. Difficulty: you need to be comfortable in a terminal and editing a short list of your sites. You don't need to write any test code.

If you run more than a couple of websites or apps, you can't check them all by hand. You won't, and the ones you skip will be the ones that break. Not loudly, either: a contact form that stopped submitting, a page that went blank after an update, a site that answers with an error to everyone but you, because you're still logged in.

So every night, a machine nobody is sitting at opens a real browser, visits every site I run, and checks each one is up, has the page it should have, and isn't throwing errors. In the morning, if anything's wrong, I hear about it. Billy, the agent in my fleet who does my testing, runs it on Osgiliath, a 2018 all-in-one in the corner. It has 1,625 runs recorded since March, 344 of them in the last thirty days, across thirteen apps.

Setting that up is the easy half, and this guide covers it in full. The other half is what I learned the hard way: the dangerous failures in a test setup don't make anything go red. They make it go quiet. A rig that has stopped running looks exactly like one with nothing to report. So the kit you'll build checks your sites every night, and then checks that the checking happened. I built it from scratch on Osgiliath on Thursday 19 November 2026, pointed it at my own sites, and then broke it eight different ways to make sure it notices. Every number below is from that afternoon.

Verified 19 November 2026 on Debian 13.7, Node 22.23, Playwright 1.58.2 (Chrome Headless Shell 145).

At the end of this you will have

Why shallow and broad

This isn't the place to test what your apps do. That's each app's own job, and its own tests. This is the smoke alarm: is the site there, is it the right page, is it on fire? A shallow check across everything catches the failures that actually happen to small estates: a server that didn't come back after a reboot, an expired certificate, an update that broke a page, a form that disappeared from a template. A deep check on one app catches none of those on any of the others.

So the kit starts with one check, run against every site in your list. You can go deeper on the ones that matter later. Most people never need to.

Before you start

Have

Decide

Step 1: Get the kit

Download it: one-machine-that-tests-everything.zip. Unzip it on the machine that will do the checking, and in the kit folder:

npm install
npx playwright install chromium
one-machine-that-tests-everything/
  apps.json              your sites: name, address, the phrase that must be there
  playwright.config.js   where things go, and the settings that matter
  tests/smoke.spec.js    the one check, run against every site in apps.json
  tests/login.spec.js    an example check that needs a password
  tests/credentials.js   finds a password without crashing the run if it isn't there
  reporter.js            writes one line per run to runs.jsonl
  check-runs.js          did the checking happen? exits 1 if not

The first command took 2.6 seconds; the browser download takes longer and is most of the disk space. On a bare Linux server, use npx playwright install --with-deps chromium, which also installs the system libraries the browser needs. The kit pins Playwright at 1.58.2, because each Playwright version only works with the browser build it was made for. Upgrade both together or neither.

What you should see: npx playwright --version prints Version 1.58.2.

Step 2: List your sites

Open apps.json. It's my list, so replace it with yours:

[
  { "name": "azorius-home",    "url": "https://azorius.com/",        "expect": "Azorius" },
  { "name": "azorius-blog",    "url": "https://azorius.com/blog",    "expect": "Insights" },
  { "name": "azorius-guides",  "url": "https://azorius.com/guides",  "expect": "Build It Yourself" },
  { "name": "azorius-contact", "url": "https://azorius.com/contact", "expect": "Get in Touch",
    "form": "form" },
  { "name": "rifthaul",        "url": "https://rifthaul.com/",       "expect": "Without haulers" }
]

name is what you'll see in reports; keep it short and unique. url is the page to load. expect is the phrase that must be visible. form is optional: if it's there, the page must also have that element, so "form" means "there must be a form on this page", which is how you find out the contact form disappeared from a template.

Check pages inside your house network the same way, with their local addresses. The machine doing the checking only needs to be able to reach them.

What you should see: node -e "console.log(require('./apps.json').length)" prints how many sites you listed. If it prints an error, there's a missing comma or quote.

Step 3: Run it

npx playwright test

Here's mine, the first time, unedited:

Running 6 tests using 1 worker

  -  1 tests/login.spec.js:7:1 › myapp login
  ✓  2 tests/smoke.spec.js:14:3 › azorius-home (1.6s)
  ✓  3 tests/smoke.spec.js:14:3 › azorius-blog (1.3s)
  ✓  4 tests/smoke.spec.js:14:3 › azorius-guides (1.3s)
  ✓  5 tests/smoke.spec.js:14:3 › azorius-contact (1.3s)
  ✓  6 tests/smoke.spec.js:14:3 › rifthaul (1.9s)

  1 skipped
  5 passed (10.3s)

[run log] PASSED: 5 executed of 6 collected -> runs.jsonl

Five sites in ten seconds. The skipped one is the login example, which has no password yet; step 5 covers it. Each site took about a second and a half, so a list of fifty would take a couple of minutes.

What you should see: a tick for each of your sites, and the [run log] line at the end. Look in the archive folder: there's a folder named with today's date and a screenshot of every site in it. Open a couple. A screenshot of an error page with a tick next to it means your expect phrase is too easy to find; make it more specific.

Step 4: Make sure it can fail

A check that has never failed hasn't been tested. Before you trust it, break it twice, on purpose. Add a page that doesn't exist to apps.json:

{ "name": "test-missing", "url": "https://yoursite.example/no-such-page", "expect": "anything" }

and run it again. Mine said https://azorius.com/no-such-page answered 404 and failed. Then take it out, and change one expect to a phrase that isn't on the page. That's the more important test: the page loads fine and answers 200, the kind of thing a simple uptime monitor would call healthy, and the check should still fail because the content is wrong. Mine did.

What you should see: a red cross and a reason for each, and [run log] FAILED. Put your list back how it was afterwards.

Step 5: Checks that need a password

Some pages are only worth checking logged in. tests/login.spec.js is an example: edit the address and the two field selectors for your app, and put the login in secrets/myapp.json as {"user": "…", "password": "…"}. Keep that folder readable only by you (chmod 700 secrets), and out of any backup that goes off the machine.

The important part is what happens when the file isn't there, because one day it won't be: you'll copy the kit to another machine, or tidy up a folder. The check skips, and says why:

note  skipped myapp login: no myapp credentials; looked in:
      …/secrets/myapp.json, ~/.config/site-tests/myapp.json

Every other site still gets checked. A file that's there but broken is different. That's a real problem, not a missing file, so that one check fails, loudly, and the rest still run. I tested both.

What you should see: with no file, the login check shows as skipped with that note. With a file, it runs.

Step 6: Run it every night, and check it ran

Two cron jobs, not one. crontab -e on the checking machine:

0 2 * * *  cd /home/YOU/site-checks && npx playwright test >> nightly.log 2>&1
0 7 * * *  cd /home/YOU/site-checks && node check-runs.js || echo "site checks need a look" | mail -s "site checks" you@example.com

Replace the second half of the second line with however you like to be told. As written, it tells you every morning something is wrong, so a week away with one broken site means seven identical emails. For a few sites that's a useful nag. For many, do what Billy's real setup does and alert on changes: one message when a site goes from passing to failing, nothing while it stays broken, and one when it recovers. As his notes put it, an alarm you've learned to ignore is worse than no alarm, because you still believe you have one. The morning check is a separate job on purpose. If you chain it onto the end of the nightly run and the nightly run stops happening (a full disk, a broken update, cron itself), the check stops with it, and you hear nothing, which is exactly the failure you set it up to catch. The morning check has to run whether or not the night did.

This is what it says on a good morning:

  PASS  there is a run log                       1 runs recorded
  PASS  the last run is under 26h old            0.0h ago (2026-11-19T15:02:14.246Z)
  PASS  the last run executed something          5 executed of 6 collected
  PASS  every app in apps.json was tested        5 of 5
  PASS  nothing failed                           all passed

What you should see: five PASS lines, and echo $? prints 0. The next morning, look for the email that didn't come, then deliberately make it come once, by renaming runs.jsonl and running the check, so you know the alert actually reaches you.

How it works

The check

For each site in the list, smoke.spec.js loads the page in a real browser and checks five things in order: it got a response; the response isn't an error (any status of 400 or above fails, and names the code); the page has a title, since many error pages don't; your phrase is visible on the page; and the page's own scripts didn't crash while loading. If you gave a form, that has to be visible too. Then it takes a screenshot into archive/today's date/.

The config retries a failed check once. A single network blip shows up as flaky (passed on the second try) rather than failed, and the morning check mentions flaky sites without failing. A site that fails twice in a row is down.

One at a time

The config runs one check at a time (workers: 1). For public sites it barely matters. But Billy learned this one on our own apps: when checks change things on a shared live database and assert on what's there, running them side by side lets them move each other's numbers, and you get a different set of failures every night with no change to the app. A set of failures that moves between runs is the tell. One at a time costs a little speed and buys results you can believe.

The run log

reporter.js runs alongside Playwright's normal output and writes one line per run to runs.jsonl: when it started and finished, how many checks were found, how many passed, failed, were skipped or were flaky, and the result for each site by name. That log is what the morning check reads. It has one rule that matters more than everything else in it: if the number of checks that actually ran is zero, the run is EMPTY, which counts as a failure, and the npx playwright test command itself exits with an error. Zero failures out of zero tests is how a broken setup looks when you only count the red ones.

The morning check

check-runs.js reads the last line of the log and asks five questions: is there a log at all; is the last run less than 26 hours old (a nightly run, plus a couple of hours' grace); did it run anything; was every site in apps.json in it; and did everything pass? Each question catches a failure the others can't, which the next section shows.

The ways it lied to me

None of these made a test go red. That's the point of the list. Most come from the real setup on Osgiliath over the past year, and I made each one happen again this afternoon against the kit, to show what it looks like and that the kit catches it.

The check that catches all of them

Every item in that list is the rig failing to tell you something, so the check has to be about the rig, not the sites. check-runs.js is that check, and these are the drills I ran against it. Run them against your own setup once, before you rely on it:

What I brokeThe nightly run saidThe morning check said
A page that no longer existsFAILED: answered 404FAIL: failed: azorius-old-page
A page that loads, with the wrong contentFAILED: element not foundFAIL: failed: azorius-home
A spec that reads a missing password file at load timeEMPTY: 0 executed of 0 collectedFAIL on three counts, naming the file
The run-log reporter removed from the config5 passed (and nothing logged)PASS straight away; FAIL once the last run was stale
Output folder pointed at the archivePASSED(archive: 6 files before, 6 after, last month's note gone)
Only one site runPASSED: 1 of 1FAIL: not tested: the other four
Password file presentlogin check runs(fails here, because the example app isn't real)
Password file present but brokenthat one check fails, five passFAIL: failed: myapp login

Three things aren't caught by the morning check, and it's worth being straight about all of them. The archive wipe is caught by the config, not by any check, so if you change outputDir, never point it at anything you want to keep. A missing reporter is only caught when the log goes stale, so the age limit is your safety net; don't raise the 26 hours to quieten it on a weekend you're away. And if the checking machine itself is off, unplugged or off the network, the morning check is off with it, and silence is all you'll get. Billy's real morning check has the same gap and says so in its own notes. If you can, run check-runs.js from a different machine that can read the log, or add an outside "dead man's switch" service that expects a ping every morning and tells you when it doesn't get one.

What it costs

Money: nothing. Playwright and Chromium are free.

Time, measured on Osgiliath on 19 November 2026: 2.6 seconds to install the kit's one dependency, plus the browser download. Five sites checked in 10.3 seconds, 13 seconds including starting the browser. Each site costs about a second and a half; a failing one costs more, because it waits for the page and then retries once.

Disk: about 650MB, nearly all browser. Each night's screenshots come to about a quarter of a megabyte per site. Clear out old dated folders from archive once in a while, or keep them; they're the only record of what each site looked like on a given night.

Your attention: one email you mostly won't get. That's the design. When it comes, read it.

Getting an assistant to do this for you

The checks are the easy part to hand over. Give it the rules:

Then break whatever it gives you, once, on purpose, and see it notice. An assistant will write you a perfectly good check that has never been seen to fail. Making it fail is your job.

What I actually use it for

Every night Osgiliath runs a check for each of my apps, eleven of them, one after another, and Billy runs the bigger suites when there's reason to: 159 tests on one day last week. Last night it started at 2:30 and checked all eleven, each in six or seven seconds, 73 seconds in all: eleven green, none red. It has 1,625 runs recorded since 25 March. Billy is busy. Now imagine if I had to do all this myself.

Has it ever caught something before I or anyone else noticed? Not that I can recall. What it gives me isn't a list of green ticks, or a list of catches. It's being able to not think about it. I don't check my sites because something checks them every night, and I trust that something because a second thing checks it did. That's the arrangement I'd recommend to anybody who runs more than two of anything: let a machine do the boring checking, and spend your one bit of attention on making sure the machine is still doing it.

The code

Everything is in the zip. These three files are the heart of it, here so you can read them before you run them, which you should do with anything from the internet, mine included.

tests/smoke.spec.js

// smoke.spec.js — one shallow check per app in apps.json. Broad, not deep: the point is to
// notice a site is down, erroring or blank, not to test its business logic.
const { test, expect } = require('@playwright/test');
const fs = require('fs');
const path = require('path');

const apps = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'apps.json'), 'utf8'));

// The archive is OURS. Playwright's outputDir is wiped at the start of every run, so
// screenshots we want to keep must never be written there.
const ARCHIVE = path.join(__dirname, '..', 'archive', new Date().toISOString().slice(0, 10));

for (const app of apps) {
  test(app.name, async ({ page }) => {
    const errors = [];
    page.on('pageerror', e => errors.push(e.message));       // uncaught script errors on the page

    const res = await page.goto(app.url, { waitUntil: 'load' });
    expect(res, 'no response at all').not.toBeNull();
    expect(res.status(), `${app.url} answered ${res.status()}`).toBeLessThan(400);

    await expect(page).toHaveTitle(/\S/);                     // a page with no title is usually an error page
    await expect(page.getByText(app.expect).first()).toBeVisible();
    if (app.form) await expect(page.locator(app.form).first()).toBeVisible();

    expect(errors, `script errors on ${app.url}`).toEqual([]);

    fs.mkdirSync(ARCHIVE, { recursive: true });
    await page.screenshot({ path: path.join(ARCHIVE, `${app.name}.png`), fullPage: false });
  });
}

reporter.js

// reporter.js — writes one line per run to runs.jsonl, so check-runs.js can tell
// "everything passed last night" from "nothing has run for three weeks".
//
// The rule that matters: a run in which NOTHING EXECUTED is not a pass. Zero failures out of
// zero tests is how a broken setup looks when you only count the red ones.
const fs = require('fs');
const path = require('path');

const LOG = path.join(__dirname, 'runs.jsonl');

class RunLog {
  onBegin(config, suite) {
    this.started = new Date();
    this.suite = suite;
    this.errors = [];
  }

  onError(error) {   // errors outside any test, e.g. a spec file that fails to load
    this.errors.push((error.message || String(error)).split('\n')[0].slice(0, 300));
  }

  onEnd(result) {
    const tests = this.suite ? this.suite.allTests() : [];
    const count = { passed: 0, failed: 0, skipped: 0, flaky: 0 };
    const outcomes = {}, skipped_why = {};
    for (const t of tests) {
      const o = t.outcome();                     // expected | unexpected | skipped | flaky
      const k = o === 'expected' ? 'passed' : o === 'unexpected' ? 'failed' : o;
      count[k]++;
      outcomes[t.title] = k;
      const why = t.annotations.find(a => a.type === 'skip');
      if (k === 'skipped' && why) skipped_why[t.title] = why.description;
    }
    const executed = count.passed + count.failed + count.flaky;
    const status = executed === 0 ? 'EMPTY' : count.failed > 0 || this.errors.length ? 'FAILED' : 'PASSED';
    const line = {
      started: this.started.toISOString(), finished: new Date().toISOString(),
      status, collected: tests.length, ...count, errors: this.errors, outcomes, skipped_why,
    };
    fs.appendFileSync(LOG, JSON.stringify(line) + '\n');
    console.log(`\n[run log] ${status}: ${executed} executed of ${tests.length} collected -> runs.jsonl`);
    if (status === 'EMPTY') return { status: 'failed' };   // make the command itself fail, too
  }

  printsToStdio() { return false; }
}

module.exports = RunLog;

check-runs.js

// check-runs.js — is the testing actually happening? Exits 1 if not.
//
// "The last run was green" is half a question. The other half is WHEN, and whether it
// tested anything. A dashboard that stopped hearing from its tests three weeks ago looks
// exactly like one with nothing to report.
//
//   node check-runs.js            # usual
//   node check-runs.js 2          # treat runs older than 2 hours as stale (for testing)
const fs = require('fs');
const path = require('path');

const MAX_AGE_H = Number(process.argv[2] || 26);   // nightly, plus two hours' grace
const LOG = path.join(__dirname, 'runs.jsonl');
const apps = JSON.parse(fs.readFileSync(path.join(__dirname, 'apps.json'), 'utf8')).map(a => a.name);

const results = [];
const check = (name, ok, detail) => {
  results.push(ok);
  console.log(`  ${ok ? 'PASS' : 'FAIL'}  ${name.padEnd(40)} ${detail}`);
};

const runs = fs.existsSync(LOG)
  ? fs.readFileSync(LOG, 'utf8').trim().split('\n').filter(Boolean).map(l => JSON.parse(l))
  : [];
const last = runs[runs.length - 1];

check('there is a run log', runs.length > 0, runs.length ? `${runs.length} runs recorded` : `no ${path.basename(LOG)}`);
if (last) {
  const ageH = (Date.now() - new Date(last.finished)) / 3600e3;
  check(`the last run is under ${MAX_AGE_H}h old`, ageH < MAX_AGE_H,
    `${ageH.toFixed(1)}h ago (${last.finished})`);
  const executed = last.passed + last.failed + last.flaky;
  check('the last run executed something', executed > 0,
    `${executed} executed of ${last.collected} collected` + (last.errors.length ? `; error: ${last.errors[0]}` : ''));
  const missing = apps.filter(a => !(a in last.outcomes));
  check('every app in apps.json was tested', missing.length === 0,
    missing.length ? `not tested: ${missing.join(', ')}` : `${apps.length} of ${apps.length}`);
  const failed = Object.entries(last.outcomes).filter(([, o]) => o === 'failed').map(([t]) => t);
  check('nothing failed', failed.length === 0 && last.errors.length === 0,
    failed.length ? `failed: ${failed.join(', ')}` : last.errors.length ? 'errors outside tests' : 'all passed');
  const flaky = Object.entries(last.outcomes).filter(([, o]) => o === 'flaky').map(([t]) => t);
  if (flaky.length) console.log(`  note  passed on a retry: ${flaky.join(', ')}`);
  for (const [t, why] of Object.entries(last.skipped_why || {})) console.log(`  note  skipped ${t}: ${why}`);
}
process.exit(results.every(Boolean) ? 0 : 1);