Speedtest Tracker with InfluxDB
Automated internet speed testing with tracking.
Overview
Speedtest Tracker is a self-hosted Laravel application that automatically runs internet speed tests using the official Speedtest CLI and stores the results for historical analysis. Originally created to address the need for consistent, automated monitoring of internet connection quality, it provides a clean web interface for viewing speed test results and trends over time. The application eliminates the need to manually run speed tests and provides concrete data when dealing with ISP performance issues or network troubleshooting.
This monitoring stack combines Speedtest Tracker's automated testing capabilities with InfluxDB's time-series database optimized for storing timestamped speed test metrics, and Grafana's powerful visualization platform for creating detailed network performance dashboards. InfluxDB's high-performance time-series storage handles the continuous flow of speed test data efficiently, while Grafana transforms raw metrics into actionable insights through customizable charts, alerts, and trend analysis. The integration allows for sophisticated monitoring that goes beyond simple pass/fail metrics to track performance patterns, identify peak usage impacts, and correlate speed degradation with specific time periods.
Homelab enthusiasts, remote workers, and small businesses who depend on reliable internet connectivity will find this stack invaluable for documenting network performance and holding ISPs accountable for service level agreements. The combination is particularly useful for users who experience intermittent connectivity issues that are difficult to reproduce when contacting support, as it provides historical evidence of performance problems with precise timestamps and measurements.
Key Features
- Automated speed testing every 4 hours using official Speedtest CLI with customizable cron scheduling
- InfluxDB 2.0 time-series storage with built-in data retention policies for managing long-term speed test history
- Grafana dashboard creation with pre-built speedtest visualization templates and alerting capabilities
- Speedtest Tracker web interface showing download/upload speeds, ping latency, and ISP information
- InfluxDB Flux query language support for advanced analytics like percentile calculations and moving averages
- Grafana's 50+ data source integration allowing correlation with other network monitoring tools
- Historical trend analysis with InfluxDB's continuous queries for automatic data aggregation
- Multi-server speedtest support in Speedtest Tracker for testing against different geographic locations
Common Use Cases
- 1Home office workers documenting internet performance for employer reimbursement or upgrade justification
- 2Small businesses monitoring SLA compliance and collecting evidence for ISP service disputes
- 3Homelab administrators tracking network performance impact when adding new services or users
- 4Remote workers correlating video call quality issues with specific bandwidth degradation periods
- 5Network administrators comparing performance across multiple ISPs or connection types
- 6Content creators monitoring upload speeds for streaming and video upload scheduling optimization
- 7Troubleshooting intermittent connectivity issues by identifying patterns in speed degradation over time
Prerequisites
- Minimum 1.5GB RAM for InfluxDB (1GB) and Grafana (512MB) with additional overhead for Speedtest Tracker
- Available ports 3000 (Grafana), 8080 (Speedtest Tracker), and 8086 (InfluxDB) or alternative port configuration
- Docker host with stable internet connection capable of running automated speed tests without interference
- Environment variables configured: INFLUX_USER, INFLUX_PASSWORD, and GRAFANA_PASSWORD for service authentication
- Understanding of InfluxDB bucket and organization concepts for configuring data export from Speedtest Tracker
- Basic Grafana dashboard creation knowledge for building custom speedtest visualizations beyond default views
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 speedtest-tracker: 3 image: ghcr.io/alexjustesen/speedtest-tracker:latest4 container_name: speedtest-tracker5 restart: unless-stopped6 ports: 7 - "${SPEEDTEST_PORT:-8080}:80"8 environment: 9 - PUID=100010 - PGID=100011 - DB_CONNECTION=sqlite12 - SPEEDTEST_SCHEDULE=0 */4 * * *13 volumes: 14 - speedtest_config:/config1516 influxdb: 17 image: influxdb:218 container_name: speedtest-influxdb19 restart: unless-stopped20 ports: 21 - "${INFLUX_PORT:-8086}:8086"22 environment: 23 - DOCKER_INFLUXDB_INIT_MODE=setup24 - DOCKER_INFLUXDB_INIT_USERNAME=${INFLUX_USER}25 - DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUX_PASSWORD}26 - DOCKER_INFLUXDB_INIT_ORG=homelab27 - DOCKER_INFLUXDB_INIT_BUCKET=speedtest28 volumes: 29 - influxdb_data:/var/lib/influxdb23031 grafana: 32 image: grafana/grafana:latest33 container_name: speedtest-grafana34 restart: unless-stopped35 ports: 36 - "${GRAFANA_PORT:-3000}:3000"37 environment: 38 - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}39 volumes: 40 - grafana_data:/var/lib/grafana4142volumes: 43 speedtest_config: 44 influxdb_data: 45 grafana_data: .env Template
.env
1# Speedtest Tracker2SPEEDTEST_PORT=80803INFLUX_PORT=80864INFLUX_USER=admin5INFLUX_PASSWORD=influx_password6GRAFANA_PORT=30007GRAFANA_PASSWORD=adminUsage Notes
- 1Speedtest at http://localhost:8080
- 2Grafana at http://localhost:3000
- 3Tests run every 4 hours
- 4Export to InfluxDB in settings
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
speedtest-tracker
speedtest-tracker:
image: ghcr.io/alexjustesen/speedtest-tracker:latest
container_name: speedtest-tracker
restart: unless-stopped
ports:
- ${SPEEDTEST_PORT:-8080}:80
environment:
- PUID=1000
- PGID=1000
- DB_CONNECTION=sqlite
- SPEEDTEST_SCHEDULE=0 */4 * * *
volumes:
- speedtest_config:/config
influxdb
influxdb:
image: influxdb:2
container_name: speedtest-influxdb
restart: unless-stopped
ports:
- ${INFLUX_PORT:-8086}:8086
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUX_USER}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUX_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=homelab
- DOCKER_INFLUXDB_INIT_BUCKET=speedtest
volumes:
- influxdb_data:/var/lib/influxdb2
grafana
grafana:
image: grafana/grafana:latest
container_name: speedtest-grafana
restart: unless-stopped
ports:
- ${GRAFANA_PORT:-3000}:3000
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
volumes:
- grafana_data:/var/lib/grafana
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 speedtest-tracker:5 image: ghcr.io/alexjustesen/speedtest-tracker:latest6 container_name: speedtest-tracker7 restart: unless-stopped8 ports:9 - "${SPEEDTEST_PORT:-8080}:80"10 environment:11 - PUID=100012 - PGID=100013 - DB_CONNECTION=sqlite14 - SPEEDTEST_SCHEDULE=0 */4 * * *15 volumes:16 - speedtest_config:/config1718 influxdb:19 image: influxdb:220 container_name: speedtest-influxdb21 restart: unless-stopped22 ports:23 - "${INFLUX_PORT:-8086}:8086"24 environment:25 - DOCKER_INFLUXDB_INIT_MODE=setup26 - DOCKER_INFLUXDB_INIT_USERNAME=${INFLUX_USER}27 - DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUX_PASSWORD}28 - DOCKER_INFLUXDB_INIT_ORG=homelab29 - DOCKER_INFLUXDB_INIT_BUCKET=speedtest30 volumes:31 - influxdb_data:/var/lib/influxdb23233 grafana:34 image: grafana/grafana:latest35 container_name: speedtest-grafana36 restart: unless-stopped37 ports:38 - "${GRAFANA_PORT:-3000}:3000"39 environment:40 - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}41 volumes:42 - grafana_data:/var/lib/grafana4344volumes:45 speedtest_config:46 influxdb_data:47 grafana_data:48EOF4950# 2. Create the .env file51cat > .env << 'EOF'52# Speedtest Tracker53SPEEDTEST_PORT=808054INFLUX_PORT=808655INFLUX_USER=admin56INFLUX_PASSWORD=influx_password57GRAFANA_PORT=300058GRAFANA_PASSWORD=admin59EOF6061# 3. Start the services62docker compose up -d6364# 4. View logs65docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/speedtest-tracker-stack/run | bashTroubleshooting
- Speedtest CLI not found or failing: Ensure container has internet access and Speedtest servers are reachable from your network location
- InfluxDB connection refused from Speedtest Tracker: Verify INFLUX_USER credentials and check that InfluxDB initialization completed successfully with docker logs speedtest-influxdb
- Grafana shows no data from InfluxDB: Confirm InfluxDB data source configuration uses correct bucket name 'speedtest' and organization 'homelab' with proper authentication token
- Speed tests not running on schedule: Check Speedtest Tracker logs for cron execution errors and verify SPEEDTEST_SCHEDULE environment variable format
- InfluxDB out of memory errors: Increase container memory limits or configure data retention policies to automatically delete old speedtest data
- Grafana dashboard queries timing out: Optimize InfluxDB queries using appropriate time ranges and consider using InfluxDB continuous queries for pre-aggregated data
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
speedtest-trackerinfluxdbgrafana
Tags
#speedtest#monitoring#network#metrics
Category
Home Lab & Self-HostingAd Space
Shortcuts: C CopyF FavoriteD Download