Install OpenSpeedTest Inside Docker Container on Linux

Install OpenSpeedTest Inside Docker Container on Linux

OpenSpeedTest is a web-based application that allows users to measure their internet connection speed, including download and upload speeds, as well as latency (ping).

This tutorial explains how to install OpenSpeedTest inside a Docker container on Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install OpenSpeedTest

  • Host network

Run the following command to create a container for OpenSpeedTest that uses host network:

docker run -d --name=openspeedtest --restart=always --network=host \
    -v /opt/openspeedtest/log:/var/log/letsencrypt \
    openspeedtest/latest
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, OpenSpeedTest service is listening on port 3000. It can be changed with -p option.

docker network create app-net
docker run -d --name=openspeedtest --restart=always --network=app-net \
    -p 8080:3000 \
    -v /opt/openspeedtest/log:/var/log/letsencrypt \
    openspeedtest/latest

Testing OpenSpeedTest

To access a web application, open a web browser and go to http://<IP_ADDRESS>:3000, where <IP_ADDRESS> is the IP address of the system.

OpenSpeedTest Inside Docker Container on Linux

Uninstall OpenSpeedTest

To completely remove OpenSpeedTest, remove its container:

docker rm --force openspeedtest

Remove OpenSpeedTest image:

docker rmi openspeedtest/latest

You can also remove OpenSpeedTest data:

sudo rm -rf /opt/openspeedtest

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.