Skip to content

How to Set Up OpenSpeedTest on a Linux Server – Your Own Browser-Based Speed Test

Set up OpenSpeedTest as a One-Click App or with Docker on your VPS and measure how fast you can reach your server from your browser.

1 December 202612 min read0 Views0 helpful

Introduction

OpenSpeedTest is a speed test that you host yourself. Open a webpage on your server, click Start, and after about half a minute you’ll see your download, upload, ping, and jitter. It measures the connection between your device and your server—not the connection to a third-party test server on the internet. The software consists only of static files (HTML, CSS, JavaScript) served by an nginx web server. It’s open source (MIT license), doesn’t need a plugin or app, and runs in any up-to-date browser, including on smartphones.

In this guide, we’ll show you two ways to set it up: the easy way as a One-Click App, which makes OpenSpeedTest available over HTTPS at your own address in just a few clicks, and a manual installation with Docker Compose. Then you’ll learn how to read the results, which URL parameters are useful, and what to keep in mind regarding traffic.

When OpenSpeedTest Makes Sense on a VPS

Public speed tests measure the connection to a test server run by your provider or a service such as Ookla. Hosting your own instance on your VPS is useful if:

  • You want to know how fast you can reach your server, for example before uploading large backups, while streaming from your media server, or for remote desktop connections.
  • Players or colleagues report connection problems and you want to check whether the issue is their connection or the route to your server. Just send them the link.
  • You want to compare two internet connections, such as fiber and mobile, on the exact route that matters to you.
  • You need a speed test without ads, an account, or data sharing for yourself or your team.

OpenSpeedTest is less suitable if you want to measure the server’s own internet connection or record results over several weeks. OpenSpeedTest doesn’t save results and only tests in one direction: from the browser to the server and back.

OpenSpeedTest, Speedtest CLI, or Speedtest Tracker?

There are several tools for measuring connection speeds. They measure different routes:

ToolWhat is measured?How it worksAre results saved?
OpenSpeedTestYour device ↔ your serverWebpage in a browserNo
LibreSpeed (in the app catalog)Your device ↔ your serverWebpage in a browserYes, in a database
Speedtest CLIYour server ↔ Ookla test serverConsoleNo, output as text, JSON, or CSV
Speedtest Tracker (in the app catalog)Your server ↔ Ookla test serverWeb dashboard, scheduled testsYes, with history

If you want to know how fast your VPS is connected to the internet, use Speedtest CLI or Speedtest Tracker. If you want to check the connection from your home, office, or phone to your server, OpenSpeedTest is the right tool.

The Easy Way: OpenSpeedTest as a One-Click App

The quickest way to get started with OpenSpeedTest is through your VPS’s One-Click Apps. The app is available directly over HTTPS at your address. You don’t need a reverse proxy, certificate, or firewall rules.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
  • About 256 MB of free RAM; 512 MB is recommended. OpenSpeedTest itself uses very few resources. Network and CPU are the main factors during a test.

Install

  1. Open your VPS in the ZapX dashboard and switch to the One-Click Apps tab.
  2. Search for OpenSpeedTest in the App catalog and click Install app.
  3. Use a custom subdomain or zap.cloud is already selected. Leave this option enabled and enter a name, such as speedtest. With zap.cloud, ZapX adds your server number to the name. You can see the completed address in the form.
  4. There are no other required fields. OpenSpeedTest doesn’t need login credentials, a database, or a volume.
  5. Optional: Under Custom environment variables, click the plus (Add variable) to add the SET_SERVER_NAME variable. For example, set its value to Frankfurt. The name will then appear at the top left of the test page. This is useful if you run several test servers.
  6. Click Queue installation. After one or two minutes, OpenSpeedTest will show as online on the app card.

Run Your First Test

Open the Access link on the app card. You’ll see a speedometer with a Start button. There’s no login. After you click the button, OpenSpeedTest measures ping and jitter first, then download for about 12 seconds and upload for about 12 seconds. After that, “All done” appears, and the results are shown on the right in Mbit/s (Mbps) and milliseconds (ms).

The page is in English and follows your device’s light or dark mode. To run another test, reload the page and click Start again.

Info: Results with the One-Click App

With the One-Click App, the test runs over HTTPS through your VPS’s proxy, which serves all One-Click Apps under their respective domains. Download and upload are both measured in full. However, this route can limit bandwidth at very high speeds: in our test between two servers in a data center, the One-Click App showed around 250 Mbit/s download and 200 Mbit/s upload, while an instance on the same server accessed directly over port 3000 showed around 700 and 850 Mbit/s. Ping and jitter were nearly identical. The One-Click App is sufficient for measuring ping, jitter, and most home connections. For accurate measurements of connections with several hundred Mbit/s, use the manual installation with a direct port, as described below.

Public Access: Who Can Run Tests?

OpenSpeedTest doesn’t have a login, including when installed as a One-Click App. That’s intentional: you can simply share the link with players or colleagues, and anyone who knows the address can start a test. The downside is that each test transfers as much data in each direction as the connection can handle in about 12 seconds. On a gigabit connection, that’s around 1.5 GB per direction, or about 3 GB per test.

Warning: Avoid Traffic Abuse

Anyone with the link can start as many tests as they like. The ?Stress URL parameter can even run continuous tests for hours. Incoming and outgoing traffic both count toward your traffic allowance. Only share the link with people who need it, and don’t publish it on websites or large Discord servers.

If you want to limit who can use the app, you have these options with the One-Click App:

  • Only run it when needed: Stop the app by clicking Stop on the app card, or go to the app’s settings (gear icon), then App actions and Stop immediately. No one can run a test while the app is stopped. Click Start on the app card to bring it back in a few seconds.
  • Remove the app: If you no longer need the test, uninstall the app under App actions by clicking Uninstall app. No data will be lost because OpenSpeedTest doesn’t store any.

The One-Click App doesn’t offer access limited to specific IP addresses. All One-Click Apps on your VPS use the same HTTPS port, 443, so a rule in the Network firewall would affect every app on the server. If you need to allow access only from specific connections, use the manual installation and follow the “Restrict Access” section below.

Updates and Backups

To check whether a new version is available, go to the app’s settings (gear icon), select App update, and click Check for updates. Install a new version by clicking Apply update. If the app is up to date, there isn’t a newer version in the app catalog.

There’s nothing to back up: OpenSpeedTest doesn’t save results or settings on the server.

Manual Installation

The rest of this guide describes a manual installation of OpenSpeedTest with Docker Compose—for example, if you don’t use One-Click Apps on your server or want to measure fast connections without a proxy. This guide is based on the official OpenSpeedTest instructions.

Requirements

  • A Linux VPS running Debian or Ubuntu, with SSH access. See First SSH Access.
  • Docker and Docker Compose. See Install Docker. Check the installation with docker --version and docker compose version.
  • For HTTPS: a domain or subdomain whose A record points to your VPS’s IP address (e.g., speedtest.example.com).

The official image includes a lightweight nginx server with the speed test files. These specifications are sufficient:

MinimumRecommended
CPU1 vCore1 vCore, more for gigabit tests
RAM256 MB512 MB
Storage1 GB1 GB

Prepare the Firewall

According to the developer, OpenSpeedTest is most accurate without a reverse proxy in front of it. The Compose file below therefore makes the test available directly on port 3000 (HTTP). Use ufw to allow SSH and this port:

Code
ufw allow OpenSSH
ufw allow 3000/tcp
ufw enable

If you also use the reverse proxy described in a later section, allow 80/tcp and 443/tcp as well.

Warning: Docker Bypasses ufw

Ports published by Docker with ports: can still be accessed from outside even if they’re blocked by ufw. Docker adds its own rules ahead of the ufw rules. If OpenSpeedTest shouldn’t be directly accessible, bind the port to 127.0.0.1, as described in the reverse proxy section. For more on firewalls, see Managing the Firewall on Linux.

Install with Docker Compose

Create a directory for OpenSpeedTest and switch to it:

Code
mkdir -p /opt/openspeedtest
cd /opt/openspeedtest

Create the Compose file with nano docker-compose.yml. It uses the official openspeedtest/latest image with a fixed version number:

Code
services:
  openspeedtest:
    image: openspeedtest/latest:v2.0.8
    container_name: openspeedtest
    restart: unless-stopped
    ports:
      - 3000:3000
    environment:
      SET_SERVER_NAME: Frankfurt
    healthcheck:
      test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:3000/ || exit 1"]
      interval: 30s
      timeout: 5s
      retries: 5
      start_period: 10s

Here’s what the entries mean:

  • image: The official image with a fixed version number. See Docker Hub for available versions.
  • 3000:3000: The speed test is available directly over HTTP on port 3000. The image also provides port 3001 for HTTPS, but it uses a self-signed certificate that browsers will flag.
  • SET_SERVER_NAME: An optional name displayed at the top left of the test page. You can also remove this line.
  • healthcheck: As with the One-Click App, this checks whether the web server is responding.

You don’t need a volume because OpenSpeedTest doesn’t store data. Start the container:

Code
docker compose up -d

Check that everything is running with docker compose ps. After a few seconds, it should show healthy.

First Visit

Open http://SERVER_IP:3000 in your browser and replace SERVER_IP with your VPS’s IP address. Click Start. If you see download, upload, ping, and jitter results after about 30 seconds, the installation is working.

For a speed test, HTTP without encryption is fine because only test data is transferred. If you still want HTTPS under a domain, follow the section below.

Access over HTTPS with a Reverse Proxy

If you already use nginx as a reverse proxy for other services, you can place OpenSpeedTest behind it. For the basics, see Set Up a Reverse Proxy with nginx and Create an SSL Certificate (Let's Encrypt). To do this, change the port line in the Compose file to 127.0.0.1:3000:3000 and restart the container with docker compose up -d. Then create a server block:

Code
server {
    listen 80;
    server_name speedtest.example.com;

    client_max_body_size 35m;
    gzip off;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_request_buffering off;
    }
}

The important lines for accurate results are:

  • client_max_body_size 35m: The upload test sends 30 MB data packets. Without this line, nginx rejects them with a 413 error because nginx allows only 1 MB by default.
  • gzip off: If the proxy compresses the test data, the results will no longer be accurate.
  • proxy_buffering off and proxy_request_buffering off: nginx passes the test data straight through instead of buffering it all before forwarding it. This ensures the test measures the connection rather than the buffer.

Then get the certificate with certbot --nginx -d speedtest.example.com. Certbot adds HTTPS and redirects HTTP in the server block. Don’t enable HTTP/2 for this server block: the developer recommends HTTP/1.1 because the browser then opens multiple parallel connections.

Tip: Compare Before and After

A reverse proxy can use CPU resources at high speeds. Run a test at http://SERVER_IP:3000 (before the change) and another through your domain. If the results are close, the configuration is working well.

Restrict Access

OpenSpeedTest doesn’t have its own login. If you want to allow access only from specific connections, restrict access in the nginx server block to their IP addresses. Add these lines to the location block, then reload nginx with systemctl reload nginx:

Code
allow 203.0.113.10;
deny all;

Replace 203.0.113.10 with your own public IP address. Add more addresses with additional allow lines. In this setup, direct access through port 3000 is no longer available because it’s bound only to 127.0.0.1.

Info: Why No Password?

It’s technically possible to add Basic Auth through the reverse proxy, but in our test it significantly distorted the upload measurement. Allowing access by IP address doesn’t affect the measurement. For more tips on securing your server, see Linux Security Tips.

Back Up Your Data

The server contains only the Compose file and, if you created one, the nginx server block. Back up both:

Code
tar -czf openspeedtest-backup-$(date +%F).tar.gz /opt/openspeedtest/docker-compose.yml /etc/nginx/sites-available/

There are no test results on the server; they’re only displayed in the browser.

Update OpenSpeedTest

Enter the new version number for the image in docker-compose.yml, for example, openspeedtest/latest:v2.0.9. Then pull the image and restart the container:

Code
cd /opt/openspeedtest
docker compose pull
docker compose up -d

Since OpenSpeedTest doesn’t store data, nothing will be lost. Remove old images with docker image prune.

How to Read and Use Test Results

Once you’ve set it up, it’s worth understanding what the numbers mean. A browser-based speed test depends on more than just the connection.

What the Test Measures

  • Download: Data from the server to your device over 6 parallel connections for about 12 seconds.
  • Upload: Data from your device to the server, also over 6 parallel connections.
  • Ping: The server’s response time in milliseconds, calculated from multiple requests.
  • Jitter: How much the ping fluctuates. Low values are important for gaming, voice calls, and video calls.

According to the developer, OpenSpeedTest accounts for 4% of browser overhead. The result is always limited by the weakest part of the route: your Wi-Fi, router, internet connection, the route through the internet, or the server itself. For an accurate result, use a network cable and close any unnecessary browser tabs. Extensions such as ad blockers or VPN software can also slow down the test.

Useful URL Parameters

You can control OpenSpeedTest using parameters at the end of the address. They work the same way with the One-Click App and the manual installation:

ParameterEffect
?RunStarts the test as soon as the page opens
?Run=10Starts the test after 10 seconds
?Test=UploadMeasures upload only (Download or Ping work too)
?XHR=3Uses 3 instead of 6 parallel connections (values up to 32 are allowed)
?Ping=50Takes 50 ping measurements for a more accurate result
?Stress=300Runs a continuous test for 300 seconds in each direction

Combine multiple parameters with &, for example, https://speedtest.example.com/?Run&Test=Download. You can send players or colleagues a link with ?Run to start the test without another click.

Warning: Use Continuous Tests with Care

?Stress runs for as long as you specify and continuously transfers data. ?Stress=3600 runs a test for one hour in each direction and transfers around 90 GB at 100 Mbit/s—more on faster connections.

Limitations of OpenSpeedTest

  • No results history: OpenSpeedTest displays results only in the browser and clears them when you reload the page. If you need a history, use LibreSpeed or Speedtest Tracker from the app catalog.
  • Doesn’t measure the server’s internet connection: To measure how fast your VPS itself is connected to the internet, use Speedtest CLI.
  • Doesn’t measure packet loss: For connection drops and packet loss along the route, use a route analysis tool such as WinMTR.
  • Your device can be the bottleneck: Older smartphones or underpowered computers often can’t reach gigabit speeds in a browser, even if the connection can.

Conclusion

You’ve set up OpenSpeedTest on your VPS and can now measure how fast you or others can reach your server at any time. You know how to read the results, which URL parameters can help, and why you shouldn’t share the link publicly.

Prefer to avoid the hands-on Docker setup? Use the easy One-Click App option described above in “The Easy Way: OpenSpeedTest as a One-Click App.”

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the quickest option: OpenSpeedTest is available over HTTPS at your address after one or two minutes, and you can install updates in the ZapX dashboard. Because the test runs through your VPS’s proxy, it may show less bandwidth than a directly accessible instance on connections with several hundred Mbit/s. For accurate results on very fast connections or to allow access only from specific IP addresses, use the manual Docker Compose installation.
OpenSpeedTest measures the connection between your device and your server in a browser. Speedtest CLI runs in the server’s console and measures its connection to an Ookla test server—in other words, the server’s own internet connection. OpenSpeedTest is the right choice for checking connection problems players or colleagues are having when connecting to your server.
A test transfers as much data in each direction as the connection can handle in about 12 seconds. At 100 Mbit/s, that’s around 150 MB per direction; on a gigabit connection, it’s around 1.5 GB. Incoming and outgoing traffic both count toward your traffic allowance. Continuous tests using the ?Stress parameter use correspondingly more.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.