Docker Speedtest Grafana

This is a nice little application that is very straight-forward to install and get running.  After my previous videos on self hosted / open source speed tests you can run from a Web GUI, many of you asked about an option for getting multiple test results over time in order to track consistency of your internet speed performance.

I looked at several options, but I really liked this one that best.

What You'll Need

  • Git
  • Docker-CE
  • Docker-Compose
  • A text editor
  • About 10 minutes of your time


If you don't already have Docker and Docker-Compose setup, you'll want to get those installed. I have a script out on GitHub that will help you do that with ease.

You can just get the script with the command:


This will pull down the script to your machine.  NOTE: this is a bash script, so you'll need a bash shell to run it (most Linux systems have bash by default).

Make the script executable with the command:

chmod +x

Next, execute the script with the command


You'll be prompted to select your OS, then asked what you want to install.  Simply answer "y" to any of the items you want installed.

Installing Docker Speedtest Grafana

Now, we want to pull down the Speedtest system.

Again, using git, we'll grab the entire repo with the command:

git clone

This will create a new folder called "docker-speedtest-grafana" in the directory you are currently in.

Now move into that new folder with:

cd docker-speedtest-grafana

Next, we need to copy the .env.sample file to a new .env file.

cp .env.sample .env

Now, we'll edit that file with a text editor. I like to use the nano editor, but feel free to use any text editor you like.

nano .env

You'll possibly want to change a couple of values in this file.


If you have port 3000 already in use on your host machine, then you'll want to change the GRAFANA_PORT value to an unused port. I changed it to 3201 in my system.

Additionally, the speedtest is set to run one time per hour (or every 3600 seconds).  If you want to run the test more or less often, adjust the SPEEDTEST_SPEEDTEST_INTERVAL to a different time frame in seconds.

You can calculate the seconds as follows:

 1 minute = 60 seconds
 1 hour = 60 minutes = 3600 seconds

So if I want to run the ttest every 15 minutes, I do

15 x 60 = 900

And I enter 900 for my interval.

If you want to run the speedtest every 5 hours, you do

5 x 60 x 60 or 5 x 3600 =18000

and enter 18000 for the interval.

Once you've made those changes, use CTRL + O to save, and press Enter to confirm. Then, use CTRL + X to exit the nano editor.

Next, let's look at the docker-compose.yml file.

nano docker-compose.yml

version: '2'

    restart: always
    image: influxdb:1.8
      - "8086:8086"
      - "./data/influxdb/:/var/lib/influxdb"
      - "INFLUXDB_ADMIN_USER=admin"
      - "INFLUXDB_ADMIN_PASSWORD=password"
      - "INFLUXDB_DB=speedtest"

    restart: always
    image: grafana/grafana:6.7.2
      - "./docker/grafana/provisioning:/etc/grafana/provisioning"
      - "${GRAFANA_PORT}:3000"
      - "GF_SERVER_ROOT_URL=http://localhost"
      - influxdb

    restart: always
    image: frdmn/speedtest-grafana:latest
    container_name: speedtest
      - influxdb

Here, I suggest making sure port 8086 is open on your host. If it's already in use, then change the left side of the port mapping under the influxdb section to an available port on your host.  Only change the left side of the colon ":".  Never change the right side in docker.

Save the changes. Use CTRL + O to save, and press Enter to confirm. Then, use CTRL + X to exit the nano editor.

Now, let's start up our containers with the command:

docker-compose up -d

Give the containers time to pull down, and startup.  Then when you see the "done" messages, and are back at your terminal prompt, open your web browser, and navigate to the IP address of your host machine, and the Port you set in the .env file.

In my case I went to

From there, in the Grafana UI, click on Home near the top left, then select the Speedtest option that comes up below it.

You should now see your speedtest dashboard.  It will take time to fill in, but eventually you should have a dashboard that shows you your speedtests over time.

Something like:

Speedtests after 1 night