Sign inSign up

thehale/speedtest

By thehale

•Updated 7 months ago

Monitor your home internet speeds with the Ookla Speedtest CLI.

Image
Networking
Monitoring & observability
0

1.0K

thehale/speedtest repository overview

⁠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 VariableDefaultDescription
CRON_SCHEDULE0 */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

⁠License and Source Code

MPL-2.0

https://github.com/thehale/speedtest⁠

Tag summary

Content type

Image

Digest

sha256:6ceeb3da7…

Size

17.9 MB

Last updated

7 months ago

docker pull thehale/speedtest