Available

Night Watch

Keep your sites up through scraper floods: an uptime watch, a Cloudflare Free-plan shield and a bot gate.

  • Linux
  • Python 3.10+
  • Cloudflare Free plan
  • ASGI or WSGI apps
$497one-time

Includes 12 months of updates

What it does

Night Watch opens every site you run the way a visitor does, every five minutes, and tells you the moment one stops opening and the moment it is back. When a site falls over because a scraper is flooding it, the watch switches on a Cloudflare rule that stops the flood at the edge, and your app keeps serving people while it lasts.

Tested on our own sites

What is inside

The watch

Sites from your Cloudflare account and a list, checks that look like a visitor, messages by mail or webhook, and a test that tells "all down" from "this machine is offline".

The shield

Install, status, on, off, uninstall and restore for one zone or all, with every change backed up first.

The gate

ASGI and WSGI middleware, a 2-second "one moment" page that hands people a cookie, and one log line a minute.

The runbook

What to do when a site is slow or down, how to read a flood, and what not to switch on in Cloudflare's dashboard.

Requirements

  • Linux with systemd and Python 3.10 or newer; nothing to install from pip.
  • For the shield and the event view, sites on Cloudflare (any plan, the Free plan included) and an API token.
  • A machine other than the one serving your sites, so it can tell you when that one is down.

Good to know

  • The emergency rule also challenges a person who types your address into a fresh browser, which is why it is off except during a flood.
  • Verified bots and robots that name themselves are never challenged, and search engines are never turned away by the gate.
  • The shield uses three of the five custom rules the Free plan allows per zone.

Questions

Do I need a paid Cloudflare plan?

No. Everything Night Watch does works on the Free plan: the three rules, the event view and the automatic switching. A paid plan only gives you more rule slots next to ours.

Will it block Google or AI search crawlers?

No. Cloudflare's verified bots and every robot that names itself in its user agent pass the shield, and the gate never turns away a search engine or a link preview. If you want to block AI crawlers, that is a separate choice in Cloudflare's dashboard.

My site is not on Cloudflare. Is it still useful?

The watch and the gate work anywhere: the watch opens any URL, and the gate protects any Python web app. The shield and the event view need Cloudflare.

How is this different from an uptime monitor?

An uptime monitor tells you that a site is down. Night Watch tells you too, then acts on the most common cause we see: it switches on the shield at Cloudflare's edge, and the gate keeps your app serving the people you want while the flood lasts.

Updated: