Monitor your home internet speeds with the Ookla Speedtest CLI.
0

Configure Feed

Select the types of activity you want to include in your feed.

31 1 0

Clone this repository

https://tangled.org/thehale.dev/speedtest https://tangled.org/did:plc:lke3kmezpya6ok3jps3myit2
git@tangled.org:thehale.dev/speedtest git@tangled.org:did:plc:lke3kmezpya6ok3jps3myit2

For self-hosted knots, clone URLs may differ based on your setup.



README.md

Speedtest Docker#

A lightweight Docker container (~35MB) that runs Ookla Speedtest on a configurable cron schedule and serves interactive graphs via http.

Joseph Hale's software engineering blog

Screenshot of the speedtest historical results page showing the average metrics in cards across the top and the chart of download, upload, and ping across the bottom

Quick Start#

Using Docker Compose#

Create a docker-compose.yml file:

services:
  speedtest:
    image: thehale/speedtest:latest
    container_name: speedtest
    ports:
      - "8080:8080"
    volumes:
      - ./data:/data
    environment:
      - CRON_SCHEDULE=0 */5 * * *
    restart: unless-stopped

Then run:

docker-compose up --detach

Access the dashboard at http://localhost:8080

Using Docker Run#

docker run \
  --detach \
  --name speedtest \
  --publish 8080:8080 \
  --volume $(pwd)/data:/data \
  --env CRON_SCHEDULE="0 */5 * * *" \
  --restart unless-stopped \
  thehale/speedtest:latest

Configuration#

Environment Variable Default Description
CRON_SCHEDULE 0 */5 * * * Cron expression for test frequency

Cron Schedule Examples#

  • Every hour: 0 * * * *
  • Every 5 hours: 0 */5 * * *
  • Every 6 hours: 0 */6 * * *
  • Daily at midnight: 0 0 * * *

You may find crontab.guru a helpful resource for building cron expressions.

Data Persistence#

The CSV file containing all speedtest results is stored at /data/speedtest.csv inside the container. Mount a volume to persist data:

--volume /path/to/data:/data

Available Images#

Images are published to both Docker Hub and GitHub Container Registry:

  • Docker Hub: docker.io/thehale/speedtest
  • GitHub: ghcr.io/thehale/speedtest

Available tags:

  • latest - Most recent stable release
  • 1.0.0, 1.1.0, etc. - Specific version tags

Building from Source#

docker build --tag speedtest .

Architecture#

  • Base image: nginxinc/nginx-unprivileged:alpine-slim (~20MB)
  • Speedtest: Ookla's official CLI
  • Scheduling: dcron (cron daemon)
  • Graphs: Plotly.js (loaded from CDN) renders CSV data client-side
  • Security: Runs as non-root user by default
  • Image size: ~35MB total

Viewing Logs#

# Docker Compose
docker-compose logs --follow

# Docker
docker logs --follow speedtest

License#

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).