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
- A list of your sites in a short text file, each with a word or phrase that must appear on the page. Adding a site is adding a line.
- A real browser checking every one: that it answers, that it isn't an error page, that the right content is showing, that the page's own scripts aren't crashing, and, where you ask, that a form is there.
- A screenshot of every site, every night, kept in a dated archive, so when something changes you can see when.
- Checks behind a login that skip cleanly, with a reason, when the password isn't available, instead of taking the whole run down.
- A run log, one line per run, and a rule that a run in which nothing was tested is a failure, not a pass.
- A morning check that answers the question a test report can't: did the tests actually run, recently, against everything?
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
- A computer that's on at night. An old laptop, a mini PC, a Raspberry Pi 5, or the always-on machine you already have. A real browser needs some memory; anything with 4GB is plenty. Mine is a seven-year-old all-in-one.
- Node.js 20 or newer (
node --version), from nodejs.org. - About 650MB of disk, nearly all of it the browser.
- A way to be told when the morning check fails: email from cron, a chat webhook, a notification app. Whatever you already look at.
Decide
- Which sites. All of them. The one you think doesn't need checking is the one that'll be down for a month before anybody notices.
- What "working" looks like for each. One phrase that's on the page when it's right and missing when it's wrong. A heading is usually best. Not the site's name, which tends to appear on error pages too.
- When it runs, and when you'll look. Mine runs overnight. The morning check runs a few hours later, separately, for a reason that's in step 6.
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 checking stopped, and it looked like good news. For five weeks, the nightly runs on the real setup didn't happen, and nothing said so. The dashboard just showed no new failures, and Lamb, the agent who keeps an eye on the whole fleet, read five weeks of silence as the fleet being clean. It was an idle instrument. The same thing happens if the piece that records results goes missing. I reproduced that one: I took the run-log reporter out of the kit's config and ran it again. Five passes on screen, nothing in the log, and the morning check, run straight away, passed, because the last thing in the log was a good run from a minute earlier. Only the age check catches this, and only once the last run goes stale, which is why it's there. Fix: check when you last heard, not just what you last heard. A monitoring system's own wiring isn't monitored by that system.
- "Nothing ran" was filed as a pass. The real reporter once recorded a run as PASS with nothing executed. Asking Playwright to list the tests, without running any, reaches the end of a run with every test counted and none of them run, and the reporter's rule was "no failures means it passed". Fix: the real reporter now refuses to file a run in which nothing executed: it writes nothing, and says so on screen. The kit goes one step further and logs it as
EMPTY, which counts as a failure, so the morning check sees it too, instead of finding nothing and having to notice the gap. - One bad file made the whole suite vanish, on one machine. On 4 September, a spec left over from a retired app tried to load a helper file that didn't exist from where it sat. When Playwright can't load a spec file, it doesn't fail that file: it runs nothing. Not one failure, just "0 tests in 0 files", which looks exactly like pointing the tool at the wrong folder. Worse, the fix that told Playwright to ignore retired specs went into one of Billy's two config files and not the other. The always-on machine was fine, while Billy's own machine reported nothing to run for eight days. Two configs had drifted, and the one that had gone dark said "nothing to run", not "can't run". I reproduced the effect in the kit with a spec that reads a missing password file while it's loading:
0 executed of 0 collected, logged asEMPTY, and the morning check failed on three counts. Fix: read passwords inside tests throughcredentials.js, which skips cleanly; keep specs for retired apps intests/retired/, which the config never loads; and have one config, or check that every config you run lists the same number of tests. - The screenshot archive deleted itself on every run. Playwright empties its output folder at the start of every run. The real setup's output folder was set to the screenshot archive, so every run wiped the evidence the archive existed to keep, and a four-test run in August took out the screenshots from an investigation a fortnight earlier, for good. I reproduced this one too, with a note-to-self file in the archive standing in for last month's evidence: six files in the archive before the run, six after, and the note was gone. The new screenshots had replaced the old files one for one, so even a count of the archive would have said everything was fine. Fix: the kit's output folder is
test-results, which is scratch, and the archive is a separate folder that only the screenshots write to. With the kit's config, the note survived. - Half the suite ran, and it said PASSED. If you run part of the suite by hand, say to re-check one site after fixing it, the run log records a run with one site in it, all green. If that's the last run before the morning check, a green "last run" hides four sites that weren't checked. I did exactly that: one site,
PASSED, and the morning check failed it withnot tested: azorius-home, azorius-blog, azorius-guides, azorius-contact. Fix: the morning check compares the last run against the whole list, not just against itself. - The number in the notes was true of nothing. The August draft of this guide said the setup ran 828 tests. Today it runs 562, in 88 files. Nothing broke: apps were switched off and their tests retired with them. A test count in a document starts going out of date the day it's written, and nobody re-counts it because it looks like a fact. Fix: if you need the number, run
npx playwright test --list, which counts without running. Then don't write it down.
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 broke | The nightly run said | The morning check said |
|---|---|---|
| A page that no longer exists | FAILED: answered 404 | FAIL: failed: azorius-old-page |
| A page that loads, with the wrong content | FAILED: element not found | FAIL: failed: azorius-home |
| A spec that reads a missing password file at load time | EMPTY: 0 executed of 0 collected | FAIL on three counts, naming the file |
| The run-log reporter removed from the config | 5 passed (and nothing logged) | PASS straight away; FAIL once the last run was stale |
| Output folder pointed at the archive | PASSED | (archive: 6 files before, 6 after, last month's note gone) |
| Only one site run | PASSED: 1 of 1 | FAIL: not tested: the other four |
| Password file present | login check runs | (fails here, because the example app isn't real) |
| Password file present but broken | that one check fails, five pass | FAIL: 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:
- "Here's my
apps.json. For each site, visit it and suggest anexpectphrase that appears on the real page but wouldn't appear on an error page or a hosting company's holding page. Show me why for each." - "Add a deeper check for my shop: load the product page, add one item to the basket, and check the basket total. Don't submit an order. Put it in its own spec file and make it skip with a reason if the shop's test login isn't available."
- "Change the morning check to post to my chat webhook at this address instead of sending email, but only when it fails, and include the list of failed sites."
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);