tldr-docker

Self-host tldr pages: one small, always-running container that answers from curl, a browser, a JSON API and ssh. Works fully offline and keeps its pages up to date when it can.

source docs ghcr.io docker hub

Quick start

docker run -d -p 8080:8080 -p 2222:2222 -v tldr-data:/data \
  --read-only --cap-drop ALL ghcr.io/spikethedragon40k/tldr-docker

curl localhost:8080/tar          # colored page in the terminal
ssh -p 2222 localhost tar        # the same over ssh
ssh -p 2222 localhost            # interactive browser
open http://localhost:8080/tar   # web GUI

Also on Docker Hub as buck40k/tldr-docker: same image, same signature.

Interactive browser over SSH

Live search with preview, "See also" links, platform and language switching, light and dark themes. No shell, ever.

Searching for tar, opening the page, following a See also link, switching platform and language in the SSH browser

Web GUI

Server-rendered and usable without JavaScript. Instant search, copy buttons, placeholder fill-in, 40+ languages, light / auto / dark.

The tar page, light theme
Light theme
The tar page, dark theme
Dark theme
Placeholders filled in across every command
Fill in placeholders once, for every command
git commit in Italian
One switch for page and interface language

On a phone

Phone, dark theme
Phone, light theme
Phone, menu with platform, language and theme

Features

Three ways in

curl and wget get colored text, browsers get HTML, scripts get JSON, all on one port. SSH on another.

Offline first

Pages are baked into the image. Air-gapped networks can point updates to an internal mirror.

Self-updating

Checks for new pages on a schedule, verifies the SHA-256 checksum and swaps them in atomically, without a restart.

Small

One static Go binary on a distroless base. About 75 MB of memory.

Security

cosign verify ghcr.io/spikethedragon40k/tldr-docker:latest \
  --certificate-identity-regexp '^https://github.com/SpikeTheDragon40k/tldr-docker/\.github/workflows/publish\.yml@refs/(tags/v|heads/main)' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Found a vulnerability? See the security policy.

Compose examples

compose.yamlHardened default setup
reverse-proxy.yamlBehind Caddy with HTTPS, under a sub-path
air-gapped.yamlInternal mirror, or baked-in pages only
ssh-keys-only.yamlSSH only for listed public keys
http-only.yamlcurl, browser and API, no SSH