UbuntuUbuntu Based

How To Install Speedtest Tracker on Ubuntu 24.04 LTS

Install Speedtest Tracker on Ubuntu 24.04

Monitoring your internet speed is crucial in today’s digital age. A reliable and consistent internet connection is essential for everything from streaming videos to conducting online meetings. Speedtest Tracker offers a way to automatically monitor your internet speed and keep a historical record of performance. This guide explains how to install Speedtest Tracker on Ubuntu 24.04, providing step-by-step instructions and troubleshooting tips to ensure a smooth setup.

Ubuntu 24.04 is a Long Term Support (LTS) release, making it a stable and secure platform for running Speedtest Tracker. It is a very popular Linux distribution for servers and personal computers. This comprehensive guide ensures that you can efficiently set up Speedtest Tracker to keep tabs on your network performance.

Prerequisites

Before you begin, ensure that your system meets the necessary requirements and that you have the proper setup. This preparation is critical for a successful installation.

System Requirements

To install Speedtest Tracker, your system should meet these minimum hardware specifications:

  • Minimum Hardware: A basic server or desktop with at least 1GB of RAM and a single-core processor is sufficient.
  • Disk Space: At least 10GB of free disk space for the operating system, Docker containers, and data storage.
  • Network Connectivity: A stable internet connection is required to perform speed tests accurately.

These requirements are modest, ensuring that Speedtest Tracker can run on most systems without significant performance overhead.

Initial Setup

Before installing Speedtest Tracker, complete these initial setup steps:

  • Update Ubuntu: Ensure your Ubuntu 24.04 system is up-to-date. Open the terminal and run:
sudo apt update
sudo apt upgrade
  • Sudo Privileges: You need a user account with sudo privileges to install software and configure the system.
  • Command Line Knowledge: Basic familiarity with the Linux command line is helpful for executing commands and troubleshooting issues.

Updating your system ensures that you have the latest security patches and software versions, which is essential for system stability and security.

Installation Methods

There are two primary methods to install Speedtest Tracker on Ubuntu 24.04: using Docker, which is the recommended approach, and manual installation. Each method has its advantages, but Docker simplifies the process by containerizing the application and its dependencies.

Docker Installation

Docker is a containerization platform that allows you to run applications in isolated environments. This method is simpler and reduces the chances of dependency conflicts.

Installing Docker Dependencies

First, install Docker and its dependencies:

  1. Update the package index:
sudo apt update
  1. Install required packages:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
  1. Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

This command downloads the Docker GPG key and adds it to your system, ensuring that the packages you install are authentic and secure.

Setting up the Docker Repository

Next, add the Docker repository to your system:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

This command adds the Docker repository to your system’s package sources, allowing you to install Docker directly from Docker’s official repository.

Installing Docker Engine

Now, install Docker Engine, Docker CLI, and Containerd:

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

These commands update the package index and install the latest versions of Docker Engine, Docker CLI, and Containerd. Docker Engine is the core service, Docker CLI is the command-line interface for interacting with Docker, and Containerd is a container runtime.

Verifying Docker Installation

Verify that Docker is installed correctly by running the hello-world image:

sudo docker run hello-world

This command downloads and runs the hello-world image, which prints a message to the console if Docker is set up correctly. If you see the message, Docker is running correctly.

Pulling the Speedtest Tracker Image

Pull the Speedtest Tracker Docker image from Docker Hub:

sudo docker pull henrywhitaker3/speedtest-tracker

This command downloads the latest version of the Speedtest Tracker image from Docker Hub. This may take a few minutes depending on your internet connection.

Container Configuration

Create and run the Speedtest Tracker container with the following command:

sudo docker run -d \
  --name=speedtest-tracker \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/Los_Angeles \
  -p 8000:8000 \
  -v /path/to/your/data:/opt/speedtest-tracker/data \
  --restart unless-stopped \
  henrywhitaker3/speedtest-tracker

Replace /path/to/your/data with the actual path where you want to store the Speedtest Tracker data. Also, replace America/Los_Angeles with your appropriate timezone. Let’s break down the parameters:

  • -d: Runs the container in detached mode (in the background).
  • --name=speedtest-tracker: Assigns the name “speedtest-tracker” to the container.
  • -e PUID=1000: Sets the User ID to 1000 (adjust as necessary).
  • -e PGID=1000: Sets the Group ID to 1000 (adjust as necessary).
  • -e TZ=America/Los_Angeles: Sets the timezone.
  • -p 8000:8000: Maps port 8000 on the host to port 8000 on the container.
  • -v /path/to/your/data:/opt/speedtest-tracker/data: Mounts the specified host directory to the container’s data directory.
  • --restart unless-stopped: Ensures the container restarts automatically unless explicitly stopped.

Environment Variables Setup

The environment variables (-e options) configure the container. Here’s what each variable means:

  • PUID: The User ID that Speedtest Tracker will run under.
  • PGID: The Group ID that Speedtest Tracker will run under.
  • TZ: The timezone for Speedtest Tracker.

Adjust these values according to your system configuration.

Manual Installation

Manual installation involves setting up the required dependencies and configuring the application manually. This method is more complex but can be useful if you prefer not to use Docker.

Installing System Dependencies

Install the necessary dependencies using the following commands:

sudo apt update
sudo apt install python3 python3-pip speedtest-cli

These commands install Python 3, the Python package installer (pip), and the Speedtest CLI. Python is required to run Speedtest Tracker, and Speedtest CLI is used to perform the actual speed tests.

Database Configuration

Speedtest Tracker requires a database to store the speed test results. You can use SQLite, which is simple and doesn’t require a separate database server.

Install SQLite:

sudo apt install sqlite3

This command installs the SQLite database engine. SQLite is a lightweight database that is suitable for small to medium-sized installations.

Web Server Setup

To serve the Speedtest Tracker web interface, you need a web server. This guide uses Apache, but you can also use Nginx.

Install Apache:

sudo apt install apache2 libapache2-mod-wsgi-py3

These commands install the Apache web server and the mod_wsgi module, which allows you to run Python web applications on Apache.

Application Deployment

Download the Speedtest Tracker source code and configure it:

  1. Download the source code:
git clone https://github.com/henrywhitaker3/Speedtest-Tracker.git
cd Speedtest-Tracker

This command clones the Speedtest Tracker repository from GitHub to your local system.

  1. Install Python dependencies:
pip3 install -r requirements.txt

This command installs the Python dependencies listed in the requirements.txt file.

  1. Configure Apache:

Create a new Apache configuration file for Speedtest Tracker:

sudo nano /etc/apache2/sites-available/speedtest-tracker.conf

Add the following configuration to the file:

<VirtualHost *:80>
  ServerName your_domain.com
  DocumentRoot /path/to/Speedtest-Tracker
 

  <Directory /path/to/Speedtest-Tracker>
  <Files wsgi.py>
  Require all granted
  </Files>
  </Directory>
 

  WSGIScriptAlias / /path/to/Speedtest-Tracker/wsgi.py
 

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
 </VirtualHost>

Replace your_domain.com with your domain name or server IP address, and /path/to/Speedtest-Tracker with the actual path to the Speedtest Tracker directory.

  1. Enable the site:
sudo a2ensite speedtest-tracker.conf
sudo systemctl restart apache2

These commands enable the new Apache site and restart the Apache web server to apply the changes.

Configuration

After installation, you need to configure Speedtest Tracker to ensure it runs correctly and provides accurate data.

Initial Setup

Follow these steps to set up Speedtest Tracker for the first time:

  1. Web Interface Access: Open your web browser and navigate to http://your_domain.com or http://your_server_ip.
  2. Database Initialization: The first time you access the web interface, Speedtest Tracker will initialize the database.
  3. User Account Creation: Create an admin user account to manage the Speedtest Tracker settings.

These steps ensure that Speedtest Tracker is properly initialized and that you have administrative access to configure its settings.

Install Speedtest Tracker on Ubuntu 24.04 LTS

Advanced Settings

Configure these advanced settings to customize Speedtest Tracker to your needs:

  • Scheduling Speed Tests: Set up a schedule for automatic speed tests. You can configure the interval between tests and the time of day when tests are performed.
  • Alert Configuration: Configure alerts to notify you when your internet speed drops below a certain threshold. You can set up email notifications or use other alerting methods.
  • Data Retention Policies: Define how long to retain speed test data. This helps manage disk space and keeps the database size under control.

These settings allow you to automate the speed testing process and receive notifications when there are issues with your internet connection.

Usage Guide

Learn how to use Speedtest Tracker to monitor your internet speed effectively.

Basic Operations

Perform these basic operations to monitor your internet speed:

  • Running Manual Tests: Use the web interface to run manual speed tests at any time. This is useful for troubleshooting or verifying your connection speed.
  • Viewing Results: View the historical speed test results in the web interface. You can see the download speed, upload speed, and ping time for each test.
  • Generating Reports: Generate reports to analyze your internet speed over time. You can create graphs and charts to visualize your data.

These operations provide you with the tools to monitor your internet speed and identify any issues.

Maintenance

Regular maintenance ensures that Speedtest Tracker runs smoothly and provides accurate data.

  • Updating Speedtest Tracker: Keep Speedtest Tracker up-to-date to benefit from the latest features and bug fixes. If using Docker, pull the latest image and recreate the container. If using manual installation, update the source code and dependencies.
  • Backup Procedures: Regularly back up the Speedtest Tracker data to prevent data loss. This includes the database and any configuration files.
  • Troubleshooting Common Issues: Refer to the Speedtest Tracker documentation or online forums for solutions to common issues. This can help you resolve problems quickly and keep your system running smoothly.

Troubleshooting

Here are some common issues you might encounter and how to resolve them:

  • Web Interface Not Accessible: Ensure that the Speedtest Tracker container is running and that the port mappings are correctly configured. Check your firewall settings to ensure that port 8000 is open.
  • Speed Tests Failing: Verify that the Speedtest CLI is installed correctly and that it can connect to the internet. Check the Speedtest Tracker logs for any error messages.
  • Database Errors: Ensure that the database is properly initialized and that the Speedtest Tracker application has the necessary permissions to access it.

These troubleshooting tips can help you resolve common issues and keep your Speedtest Tracker installation running smoothly.

Congratulations! You have successfully installed Speedtest Tracker. Thanks for using this tutorial for installing the Speedtest Tracker on Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Speedtest Tracker website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button