Skip to content

web-speedtest

A network speed test with a web UI and CLI client — measure ping, download, and upload speeds.

Why?

Running a quick network speed test usually means visiting a third-party website full of ads, or installing a heavy CLI tool with many dependencies. web-speedtest gives you a lightweight, self-hosted alternative — start the server on any machine, then test from a browser or the command line.

Features

  • Server mode — HTTP server with a web UI for browser-based speed testing
  • Client mode — CLI tool for terminal-based speed measurements
  • Ping test — measure round-trip latency
  • Download test — measure download throughput (configurable size)
  • Upload test — measure upload throughput
  • Web UI — dark-themed single-page app with animated gauge and live progress
  • API endpoints — programmatic access for custom integrations
  • Zero dependencies — single statically-linked Go binary
  • Cross-platform — works on macOS, Linux, and Windows

Quick Start

Install

pip install web-speedtest

Or run directly with uv:

uvx web-speedtest

Start the server

web-speedtest server

Then open http://localhost:8080 in your browser.

Run a CLI speed test

web-speedtest client localhost:8080

See the Usage page for full details on all commands and API endpoints.

How It Works

The server is a single statically-linked Go binary using Go's built-in net/http package to serve both a web UI and API endpoints. The web UI is a single-page app with embedded CSS and JavaScript, compiled into the binary at build time via go:embed — no external files needed at runtime.

Speed tests work by:

  1. Ping — sending small requests and measuring round-trip time
  2. Download — streaming random data from the server and measuring throughput
  3. Upload — sending random data to the server and measuring throughput

The CLI client uses Go's net/http to hit the same API endpoints, providing a terminal-based alternative to the browser UI.