Skip to content

Repository files navigation

tubespotting

Every London Underground train on one live map
🌐 tubespotting.peng.ly

The live map, with trains on every line around central London and the line status board down the side

Contents

About

Real-time London Underground map, showing live tube, Elizabeth line, Overground, DLR, Trams and trains using TfL data.


Usage

Just open tubespotting.peng.ly and drag/ pinch around.

  • Tap a line on the status board to pick it out and see every train on it
  • Tap a station for its next trains, platform by platform, on a countdown board
  • Tap a train to see where it's off to and follow it across London
  • Search (or just press /) finds any station or line
  • The locate button opens your nearest station. Your location never leaves your device
  • Additional lines like the Elizabeth line and Overground can be added to the map from the line list
  • The map button switches between the real geography and a tube map laid out like TfL's own
  • Settings has dark mode, the map layout and zoom, which lines show, how often it updates, plus accessibility and privacy options
  • You can append a station or line to the URL to share a link, e.g. ?line=victoria or ?station=940GZZLUOXC

Deployment

Option 1: Docker

There's a multi-arch image on DockerHub (notaflightrisk/tubespotting) and GHCR (ghcr.io/notaflightrisk/tubespotting):

docker run -p 3000:3000 notaflightrisk/tubespotting

Option 2: Cloudflare

Set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID, then:

ADAPTER=cloudflare npm run build && npx wrangler deploy

Option 3: From a release

Each release has a site.zip with the built Node server in it. Unzip it and run node build (Node 22 or newer).

Option 4: Build from source

Follow the Development steps, then npm run build and npm start.


Configuration

No config is needed, but adding a TFL_API_KEY is reccomended to raise the rate-limits.

Optional environmental variables
Variable What it does
TFL_APP_KEY A free TfL API key, which raises the rate limit. Without one TfL's asked anonymously
PORT Port for the Node server and Docker image, 3000 by default
PUBLIC_PLAUSIBLE_SCRIPT Build time. A Plausible script URL to count visits, off when empty
PUBLIC_SENTRY_DSN Build time. A Sentry or Bugsink DSN for error reports, off when empty

Development

You'll need Node 22 or newer, plus Git.

git clone git@github.com:NotAFlightRisk/tubespotting.git
cd tubespotting
npm install
npm run dev

The dev server is then on localhost:5173.
The other scripts you'll want are npm run check (types), npm test (tests) and npm run format.
Alternatively, build the container with docker build -t tubespotting .


Credits

Powered by TfL Open Data. Contains OS data Β© Crown copyright and database rights 2016 and Geomni UK Map data Β© and database rights [2019]. Track shapes and the Thames are Β© OpenStreetMap contributors. Not affiliated with TfL.

Contributors

contributors badge



Licensed under MIT, Β© NotAFlightRisk 2026

Releases

Packages

Used by

Contributors

Languages