MySpeed Documentation

repository·development·Indexed 25 days ago

https://github.com/gnmyt/myspeed

MySpeed is a speed test analysis tool that automates internet speed measurements and stores results for long-term analysis. It supports multiple speed test engines including Ookla, LibreSpeed, and Cloudflare, and provides observability via Prometheus and Grafana. Key features include automated testing via Cron expressions, configurable data retention, and health check notifications through email, Signal, WhatsApp, or Telegram.

Tokens
11.8K
Snippets
27
Records
118
Agent score
84%

What's inside MySpeed

  1. Overview of MySpeed features

    development

    MySpeed is a self-hosted speedtest tracking tool designed to monitor internet connection quality. Key capabilities include:

    • Detailed statistics: Generates data on speed, ping, and other connection metrics.
    • Test automation: Automates speed tests using Cron expressions to define intervals.
    • Multiple server support: Allows adding and switching between multiple speedtest servers.
    • Health Checks: Provides notifications via email, Signal, WhatsApp, or Telegram in the event of errors or downtime.
    • Monitoring Integration: Supports direct integration with Prometheus and Grafana.
    • Provider Options: Supports Ookla, LibreSpeed, and Cloudflare speed test servers.
  2. Overview of MySpeed

    development

    MySpeed is a speed test analysis software designed to record internet speed over a fully configurable retention period. It provides statistics on speed, ping, and other metrics.

    Key Capabilities:

    • Automated Testing: Schedule speed tests using Cron expressions.
    • Multi-Server Support: Add and manage multiple speed test servers.
    • Health Checks: Receive notifications via email, Signal, WhatsApp, or Telegram in case of errors or downtime.
    • Data Retention: Configure how long test results are stored (from days to indefinitely).
    • Observability: Supports Prometheus and Grafana for monitoring.
    • Engine Options: Choose between Ookla, LibreSpeed, and Cloudflare speed test servers.
  3. Understand the MySpeed User Interface layout

    development

    The MySpeed user interface is organized into three distinct sections:

    1. Header: Provides direct access to application settings and the button to initiate a new speed test.
    2. Last Test Section: Displays the results of the most recent speed test performed.
    3. Tests Overview Section: Displays a historical list of all previously created speed tests.

    Detailed configuration options for the application can be found in the settings section.

  4. Install MySpeed from Source Code

    development

    To install the latest development version from source, you must install git, curl, and unzip, then install the Bun runtime. After cloning the repository, install dependencies using bun install, build the client using npm, and start the server with bun run server/index.js.

    sudo apt-get install git curl unzip -y
    
    # Install Bun
    curl -fsSL https://bun.sh/install | bash
    export BUN_INSTALL="$HOME/.bun"
    export PATH="$BUN_INSTALL/bin:$PATH"
    
    mkdir /opt/myspeed && cd /opt/myspeed
    
    git clone https://github.com/gnmyt/myspeed.git .
    
    bun install
    
    cd client && npm install && npm run build && cd .. && mv client/build .
    
    bun run server/index.js
  5. Configure Nginx as a reverse proxy for MySpeed

    development

    To connect MySpeed to Nginx, create a configuration file in /etc/nginx/sites-available/myspeed.conf. Ensure the proxy_pass points to the MySpeed local address (default http://localhost:5216). After creating the file, enable the site by symlinking it to /etc/nginx/sites-enabled/ and restart the service.

    # /etc/nginx/sites-available/myspeed.conf
    server {
        listen 80;
        listen [::]:80;
    
        server_name your-domain.com;
    
        location / {
            proxy_pass http://localhost:5216;
        }
    }
    # Activate the configuration and restart Nginx
    sudo ln -s /etc/nginx/sites-available/myspeed.conf /etc/nginx/sites-enabled/myspeed.conf
    sudo systemctl restart nginx
  6. Configure Speedtest behavior and security

    development

    Adjust how and when speed tests are performed using the following settings:

    • Change server: Manually select a server from the list or enter a specific ID to replace the automatic selection.
    • Change password: Protect your MySpeed instance by setting a password that must be entered to access the site.
    • Set frequency: Define how often MySpeed performs speed tests.
    • Pause speed tests: Temporarily stop speed tests for a specified duration to prevent them from impacting your bandwidth during important tasks.
    • Integrations: Configure notifications for when your internet is down. Supported services include Discord, Telegram, and Gotify. You can also provide a custom webhook URL to receive all events.
  7. Analyze internet connection with Statistics & Charts

    development
    MySpeed provides a statistics page to visualize internet connection performance over time. You can view download/upload speeds, ping, jitter, and connection stability through various specialized charts. Use the date picker at the top of the statistics page to select custom time ranges; the default view shows the last 7 days.
  8. Install MySpeed from source code on Windows

    development

    ::: warning Attention This process installs the latest development version of MySpeed. Errors may occur. :::

    To build and run MySpeed from the source code, you must have Bun installed.

    1. Install Bun: Run the following in PowerShell:
      powershell -c "irm bun.sh/install.ps1 | iex"
    2. Clone the repository: Download the source from GitHub.
    3. Install dependencies and build: Run the following command sequence to install dependencies, build the client, and move the build artifacts:
      bun install
      cd client && npm install && npm run build && cd .. && move client\build build
    4. Start the server: Run the server using Bun:
      bun run server/index.js
    bun install
    cd client && npm install && npm run build && cd .. && move client\build build
    
    bun run server/index.js
  9. Configure Internet quality thresholds

    development

    You can define optimal internet performance values in the settings to allow MySpeed to use colored icons to symbolize your connection quality (good, medium, or bad).

    Settings include:

    • Ping: Connection duration in ms (lower is better).
    • Up-Speed: Data upload speed (higher is better).
    • Down-Speed: Data download speed (higher is better).

    If you are unsure of your optimal values, use the Optimal values button to let MySpeed attempt to determine them for you.

  10. Set up Let's Encrypt certificates

    development

    If using Let's Encrypt with certbot, copy your certificates to the MySpeed data/certs directory. Ensure the files have the correct permissions so MySpeed can read them.

    1. Copy the files:
    sudo cp /etc/letsencrypt/live/your-domain.com/fullchain.pem /path/to/myspeed/data/certs/cert.pem
    sudo cp /etc/letsencrypt/live/your-domain.com/privkey.pem /path/to/myspeed/data/certs/key.pem
    1. Set permissions:
    sudo chown $USER:$USER /path/to/myspeed/data/certs/*.pem
    sudo cp /etc/letsencrypt/live/your-domain.com/fullchain.pem /path/to/myspeed/data/certs/cert.pem
    sudo cp /etc/letsencrypt/live/your-domain.com/privkey.pem /path/to/myspeed/data/certs/key.pem
    
    # Make sure MySpeed can read them
    sudo chown $USER:$USER /path/to/myspeed/data/certs/*.pem