In this tutorial, we will show you how to set up a Speedtest tracker using Docker.
An internet speedtest tracker allows you to monitor your internet performance easily. It is a great way to see if you are getting the speeds your ISP claims to offer while also being a helpful diagnostic tool.
There are various ways that you can set up an internet speedtest tracker. You can write your own custom tool like we did with our Raspberry Pi internet speed monitor guide, or you can use prebuilt software like in this tutorial.
To set up an internet speedtest tracker using Docker, we will be using a container by Alexjustesen. This container contains a piece of software that routinely performs speedtest’s using Ookla’s speedtest service. The results from these speedtests are then tracked and graphed so you can see how your internet performs.
The software we are using is one of the best solutions for tracking your internet speed. It just works straight out of the box. You don’t have to worry about setting up a separate service to track your data; everything is easily viewable and controllable through a modern web interface.
You can even follow this guide on a Raspberry Pi as long as you have a 64-bit operating system. The container we are using provides builds for both x64 and ARM64 architectures.
You can even set up this internet speedtest tracker on a Synology NAS if you wanted.
Installing the Internet Speedtest Tracker Using Docker
Over the next few sections, we will walk you through installing the internet speedtest tracker from a Docker container.
Most of these steps require you to use the terminal. If you are running a desktop variant of your operating system, you can often use the CTRL + ALT + T keyboard shortcut to open the terminal.
Preparing your System for the Speedtest Tracker
1. Before you can set up this internet speedtest tracker, you must have Docker installed on your system.
If you don’t have Docker installed, we highly recommend following our installation guide.
https://pimylifeup.com/linux-docker-install/
2. After installing Docker to your machine, we can now create a directory to store the Speedtest tracker and its configuration files.
You can create this directory by using the mkdir command within the terminal.
sudo mkdir -p /opt/stacks/speedtest
3. With the directory created, use the cd command to change to it. The rest of this guide will expect you to be in this folder.
cd /opt/stacks/speedtest
4. The other thing we will need before we can set up the speedtest tracker docker container is an app key.
The easiest way to generate a random app key is to head to the Speedtest tracker dev website in your favorite web browser.
https://speedtest-tracker.dev/
Once you are on this page, you can find a randomly generated app key at the bottom of this page. You will need this key for the next section.
An example of what this value should look like is shown below. Do not use this value for your own setup. Its just here to show you what it should look like.
base64:13MUJ1DX+WkYCOaHEHSo8llgwucfcRydRM3J5u/rMRo=
Writing a Docker Compose File for the Speedtest Tracker
5. We are at the point where we can begin to write the Docker Compose file that will set up and manage the internet speedtest tracker container.
A Compose file is a way of telling Docker how to set up and manage one, or many containers. It is significantly more straightforward to manage your container using these.
To begin to write this Compose file, use the following command in the terminal. We are using Nano as it is significantly simpler than other terminal-based text editors.
sudo nano compose.yaml
If you want a better way of managing these Docker containers, we highly recommend setting up Dockge.
6. In this file, enter the following lines to set up the speedtest tracker Docker container.
You will need to replace one placeholder within this file before you can turn on the container.
<APPKEY>
: You must replace this placeholder with the app key you generated at the end of the previous section. This key is used to encrypt and decrypt the database.
services:
speedtest-tracker:
container_name: speedtest-tracker
ports:
- 8080:80
- 8443:443
environment:
- PUID=1000
- PGID=1000
- APP_KEY=<APPKEY>
- APP_URL=http://localhost
- DB_CONNECTION=sqlite
volumes:
- ./data:/config
- ./ssl:/config/keys
image: lscr.io/linuxserver/speedtest-tracker:latest
restart: unless-stopped
7. After filling out this information, you can save and quit by pressing CTRL + X, Y, and then ENTER
Starting up the Speedtest Tracker Docker Container
8. Starting up the Speedtest tracker Docker container is as simple as using the following command within the terminal.
This command will download the container and start it up immediately. Additionally, since we are using the “-d
” option, Docker will detach from the current terminal session once it has started.
docker compose up -d
Accessing the Web Interface
9. Now that you have the Speedtest tracker up and running you will want to access its web interface.
To access this interface, you will want to know the IP address of your machine. If you are hosting this locally, you can get the local IP address assigned to your machine by using the
hostname -I
10. Go to the following address to access the web interface in your favorite web browser.
Ensure you replace “<IPADDRESS>
” with the IP you got in the previous step.
http://<IPADDRESS>:8080
Logging in and Changing the Default User
11. You must log in when you access your Docker-powered internet speedtest tracker. This software already has a default login that you can use, but it is something you will want to change immediately.
For your email address, type in “admin@example.com
“, and “password
” as your password (1.).
After entering the user details, click the “Sign in
” button (2.).
12. Once logged in, you will want to adjust the default user to use your own username and password.
To begin this process, change to the “Users
” tab using the sidebar.
13. After swapping to the users screen, you should see a list of every user that has been created. These users will have access to your Docker-based Internet Speedtest tracker.
Identify the root user and click the kebab icon next to it (1.). Clicking this will bring up a context menu. From this menu, click the “Edit
” option (2.).
14. On this screen, you can specify a new email and password for your account (1.).
Once you are happy with your user’s new details, click the “Save changes
” button (2.).
15. Since we adjusted the default user, you will be automatically logged out and be required to log back in again.
Running your First Speed Test
16. Running a speed test from this tracker is a really easy process. All you need to do is click the “Run Speedtest
” button in the top-left corner (1.).
After clicking this button, a drop-down will appear with a single option, simply click “Ooka speedtest
” to continue (2.).
17. You can check your current status by changing to the results tab using the left-hand sidebar.
On this screen, you can see each speed test that has been run from within the Docker container. You can even see tests that are still pending.
Controlling and Setting up an Automated Speed Test
18. Of course, you don’t want to have to perform a speed test every single time manually. Luckily, the internet speed test tracker allows you to automate the tests.
To set this setting, change to the “General
” screen under the “Settings
” heading in the sidebar.
19. With this screen, you can adjust a few things. The first is the time zone (1.). This is a super vital setting to set if you want the time zone to match that of where you live.
The other group of settings on here is “Speedtest Settings
” (2.). Using these speed tests, you can specify a time a test should be run, whether to prune old results, as well as the specific test to use.
The speedtest schedule requires you to specify the schedule using the cron job syntax. For example, if you wanted to run a speed test every hour, you would use “0 * * * *
“. If you want an idea of how to write these, we have a guide that will cover how to write cron jobs.
After making any changes on this screen, click the “Save changes
” button (3.).
Updating to the Latest Version of the Speedtest Tracker Container
This section will be showing you how you can easily update to the latest version of the internet speedtest tracker container.
The update process is made significantly simpler thanks to using a Docker Compose file to run this container.
1. Your first step is to change to the directory where we wrote the Compose file. You must be in the same folder to simplify interacting with your containers.
If you have followed our guide, you can swap to the right place by using the following command.
cd /opt/stacks/speedtest
2. After changing to the correct location, you must get Docker to pull the latest version of the speedtest tracker container. To do this, you only need to run the following command.
This command will pull the latest image but will now upgrade any existing commands.
docker compose pull
3. If Docker downloaded a new release of the Internet Speedtest Tracker, you will want to move your container over to this new release.
To get Docker to do this, you only need to run the following command. Docker will scan the compose file, check if any image is available, and then restart that container with the new image.
docker compose up -d
Conclusion
If you have got to this point in the guide, you should have successfully set up the internet speed tracker software using Docker.
This software gives you a modern and simple-to-use interface to perform speed tests. It can routinely perform these tests and save these results to a database.
It is one of the coolest ways to keep an eye on your internet’s performance.
Please feel free to comment below if you have had any issues with getting this software up and running.
If you liked this tutorial, we recommend exploring our many other Docker guides to see what else you can self-host.