Quantifying internet performance is no longer a luxury for the casual user but a necessity for maintaining the integrity of home labs, corporate networks, and remote work environments. By leveraging Docker, users can transform a static internet connection into a monitored data stream, allowing for the identification of ISP throttling, peak-hour congestion, and hardware degradation. This transition from manual testing to automated, containerized monitoring provides a historical baseline that is critical when negotiating service level agreements (SLAs) with Internet Service Providers (ISPs).
The architectural advantage of using Docker for speed testing lies in its isolation and portability. Whether deploying on a dedicated Linux server, a Synology NAS, or a lightweight Raspberry Pi, the container ensures that the speed-testing environment remains consistent regardless of the host OS. This eliminates "dependency hell" and allows for the rapid deployment of sophisticated tools like Speedtest Tracker, OpenSpeedTest, and the Speedtest CLI, each serving a distinct purpose in the network diagnostic stack.
The Architecture of Speedtest Tracker
Speedtest Tracker is a comprehensive, self-hosted application designed to monitor the performance and uptime of an internet connection over long durations. Unlike a manual test, which provides a snapshot of current speed, Speedtest Tracker creates a temporal map of network health.
The application is engineered with a modern full-stack approach. The back-end is powered by Laravel, a robust PHP framework known for its scalability and security, while the front-end utilizes Filament, which provides a clean, administrative interface for managing tests and viewing data. To visualize the captured metrics, the application employs Chart.js, transforming raw numbers into intuitive graphical representations of download and upload trends.
The core functionality of Speedtest Tracker is built upon the Ookla Speedtest CLI. By automating the execution of this CLI, the application can capture a wide array of detailed metrics:
- Download speeds: Measures the rate at which data is transferred from the server to the local client.
- Upload speeds: Measures the rate at which data is sent from the local client to the server.
- Ping: Measures the round-trip time for a data packet to travel from the client to the server and back.
- Packet loss: Identifies the percentage of data packets that fail to reach their destination, a critical indicator of line quality.
The impact of this automation is profound. Users can identify patterns such as "evening slowdowns" or "intermittent jitter," which are often invisible during a single manual test. This historical data provides an empirical basis for filing complaints with ISPs, moving the conversation from anecdotal evidence to hard data.
Deployment Framework for Speedtest Tracker
The deployment of Speedtest-tracker is streamlined via the LinuxServer.io image, which is optimized for various hardware architectures. This ensures that the software can run on both traditional server hardware and ARM-based devices.
Supported Hardware Architectures
The image is designed to be versatile. When pulling the lscr.io/linuxserver/speedtest-tracker:latest image, Docker automatically selects the correct architecture. However, users can specify tags for granular control.
| Architecture | Availability | Tag |
|---|---|---|
| x86-64 | Available | amd64-<version tag> |
| arm64 | Available | arm64v8-<version tag> |
Technical Configuration and Environment Variables
The setup requires a specific set of environment variables to function correctly. These variables define the identity of the container, its time zone, and how it handles data.
- PUID: Defines the User ID for the process, ensuring the container has the correct permissions to write to the host filesystem.
- PGID: Defines the Group ID, which works in tandem with PUID to manage file ownership.
- TZ: Sets the timezone (e.g.,
Etc/UTC), ensuring that the timestamps on the speed tests are accurate. - APP_KEY: A unique key used by the Laravel framework for encryption and session security.
- APP_URL: The full URL where the application is accessed, necessary for generating correct links and redirects.
- DB_CONNECTION: Specifies the database driver. By default,
sqliteis used for simplicity, but this can be changed for higher-performance needs. - SPEEDTEST_SCHEDULE: Defines the frequency of the tests, allowing users to set the intervals (e.g., hourly) for automated checks.
- SPEEDTEST_SERVERS: Allows the user to specify which servers the CLI should target to ensure consistency in testing.
Optional variables provide further refinement:
- DBHOST, DBPORT, DBDATABASE, DBUSERNAME, DB_PASSWORD: These are used when migrating from a local SQLite file to a dedicated database server (like MySQL or PostgreSQL).
- DISPLAY_TIMEZONE: Overrides the system timezone for the web UI, allowing the user to see results in their local time.
- PRUNERESULTSOLDER_THAN: Controls data retention by automatically deleting old records to prevent the database from growing indefinitely.
Implementation via Docker Compose
The recommended method for deployment is using docker-compose, as it allows for version-controlled infrastructure as code.
yaml
services:
speedtest-tracker:
image: lscr.io/linuxserver/speedtest-tracker:latest
container_name: speedtest-tracker
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- APP_KEY=
- APP_URL=
- DB_CONNECTION=sqlite
- SPEEDTEST_SCHEDULE=
- SPEEDTEST_SERVERS=
- DB_HOST= #optional
- DB_PORT= #optional
- DB_DATABASE= #optional
- DB_USERNAME= #optional
- DB_PASSWORD= #optional
- DISPLAY_TIMEZONE=Etc/UTC #optional
- PRUNE_RESULTS_OLDER_THAN=0 #optional
volumes:
- /path/to/speedtest-tracker/data:/config
ports:
- 80:80
restart: unless-stopped
Upon successful deployment, the web interface is accessible at <your-ip>:80. The default administrative credentials are [email protected] and password.
Speedtest CLI and Time-Series Integration
For users who require raw data and custom dashboards without the overhead of a full web application, the robinmanuelthiel/speedtest container provides a lightweight alternative. This tool is designed specifically to run the Speedtest CLI and pipe the results into a time-series database.
Functional Logic and Execution
The basic execution of the container is a simple one-liner:
bash
docker run --rm robinmanuelthiel/speedtest:latest
This command pulls the image, executes a single speed test, prints the results (download speed, upload speed, and ping) to the terminal, and then removes the container.
Advanced Automation and InfluxDB Integration
To move from a "single test" to a "monitoring system," the container utilizes environment variables to create a loop and store data in InfluxDB. This allows the data to be visualized in Grafana, providing professional-grade telemetry.
| Environment Variable | Default Value | Description |
|---|---|---|
| LOOP | false |
Determines if the speedtest should run in a continuous cycle. |
| LOOP_DELAY | 60 |
The interval in seconds between consecutive tests. |
| DB_SAVE | false |
Enables the saving of results to an InfluxDB instance. |
| DB_HOST | http://localhost:8086 |
The network address of the InfluxDB server. |
| DB_NAME | speedtest |
The name of the target database in InfluxDB. |
| DB_USERNAME | admin |
The authentication username for the database. |
| DB_PASSWORD | password |
The authentication password for the database. |
| SPEEDTESTSERVERID | none |
Allows the user to force a specific server ID. |
| SPEEDTEST_HOSTNAME | none |
Allows the user to specify a server via its FQDN. |
To identify the best server for testing, users can use the following curl command to query the Speedtest API:
bash
curl -s https://cli.speedtest.net/api/cli/config | jq -r '.servers[] | "id: \(.id), sponsor: \(.sponsor), host: \(.host)"'
This capability is vital for users who want to test their connection against a specific geographic location or a specific ISP's server to diagnose routing issues.
OpenSpeedTest: Local Network Bandwidth Verification
While Speedtest Tracker and the CLI focus on external internet speed (WAN), OpenSpeedTest is designed for internal network verification (LAN). It acts as a self-hosted speed test server, allowing you to test the actual speed between two devices on your own network without the internet being the bottleneck.
Deployment and Resource Efficiency
OpenSpeedTest is noted for its minimal resource footprint. It can be deployed using the following command:
bash
sudo docker run --restart=unless-stopped --name openspeedtest -d -p 3000:3000 -p 3000:3001 openspeedtest/latest
For those using docker-compose, the configuration is as follows:
yaml
version: '3.3'
services:
speedtest:
restart: unless-stopped
container_name: openspeedtest
ports:
- '3000:3000'
- '3001:3001'
image: openspeedtest/latest
Security and Customization
OpenSpeedTest allows for the integration of SSL certificates to ensure that the test is conducted over HTTPS, which is often required for modern browsers to allow certain high-performance network APIs. To mount a folder containing SSL certificates, the -v flag is used:
bash
sudo docker run -v /Users/vishnu/Desktop/docker/:/etc/ssl/ --restart=unless-stopped --name openspeedtest -d -p 3000:3000 -p 3001:3001 openspeedtest/latest
Furthermore, the container provides advanced configuration via environment variables:
- CHANGECONTAINERPORTS: When set to
True, this allows the user to redefine the internal ports. - HTTP_PORT: Sets the custom port for HTTP traffic (default
3000). - HTTPS_PORT: Sets the custom port for HTTPS traffic (default
3001). - SET_USER: Defines the user ID for the process (e.g.,
101). - ALLOW_ONLY: A security feature to restrict CORS requests to specific domains (e.g.,
domain1.com;domain2.com). - SETSERVERNAME: Changes the name displayed on the user interface (e.g.,
HOME-NAS).
Strategic Integration on NAS Platforms
Deploying these tools on a Network Attached Storage (NAS) device, such as a Synology NAS, is a strategic choice. Because the NAS is typically connected via a high-speed Ethernet cable directly to the router, it provides the most accurate representation of the internet connection, removing the variability introduced by Wi-Fi interference.
Troubleshooting Connectivity Issues
When a user detects a drop in performance via these Docker tools, the recommended diagnostic path is:
- Initial Verification: Use the Docker apps to confirm if the speed drop is consistent or a one-time anomaly.
- Hardware Reset: Restart the modem and router to clear cache and refresh the connection.
- Firmware Updates: Check for manufacturer updates for the networking hardware to ensure stability.
- Physical Layer Check: Inspect network cables for damage or loose connections.
- Congestion Analysis: Verify if other devices on the local network are saturating the bandwidth.
- ISP Escalation: Use the historical graphs from Speedtest Tracker as evidence when contacting the ISP.
Alternative Solutions: MySpeed
For those seeking a different approach, MySpeed offers a specialized analysis tool that records internet speed for up to 30 days. It focuses heavily on notification and health checks, integrating with third-party services such as:
- Gotify
- Discord
- Telegram
This integration ensures that if the internet connection drops or slows below a defined threshold, the user is notified immediately, reducing the Mean Time to Recovery (MTTR) for network outages.
Conclusion: Analysis of the Monitoring Ecosystem
The ecosystem of Dockerized speed-testing tools provides a tiered approach to network visibility. For the majority of users, Speedtest Tracker is the optimal solution because it combines the raw power of the Ookla CLI with a user-friendly interface and automated scheduling. The ability to track performance over time transforms a simple speed test into a diagnostic tool capable of identifying long-term ISP degradation.
For the power user or DevOps engineer, the combination of the robinmanuelthiel/speedtest container and InfluxDB/Grafana allows for the creation of a professional telemetry dashboard. This setup is superior for those who already have a monitoring stack and wish to integrate network performance into a wider set of system metrics.
Finally, OpenSpeedTest fills a critical gap by providing LAN-based testing. By removing the internet from the equation, users can determine if a "slow internet" problem is actually a "slow Wi-Fi" or "bad Ethernet cable" problem. This distinction is vital; if OpenSpeedTest shows 1Gbps internal speeds but Speedtest Tracker shows 10Mbps external speeds, the issue is definitively with the ISP. If both show low speeds, the issue resides within the local hardware or cabling.
Together, these tools form a comprehensive suite that ensures total transparency of the data link, from the local device to the global internet.