{"id":13582659,"url":"https://github.com/librespeed/speedtest-go","last_synced_at":"2025-06-12T05:39:22.312Z","repository":{"id":37439579,"uuid":"268760374","full_name":"librespeed/speedtest-go","owner":"librespeed","description":"Go backend for LibreSpeed","archived":false,"fork":false,"pushed_at":"2024-07-01T21:03:39.000Z","size":2259,"stargazers_count":774,"open_issues_count":28,"forks_count":165,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-09T15:06:38.812Z","etag":null,"topics":["go","golang","librespeed","speedtest"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/librespeed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-02T09:40:10.000Z","updated_at":"2025-06-04T20:41:32.000Z","dependencies_parsed_at":"2023-02-09T21:45:47.897Z","dependency_job_id":"a53defac-c098-4df8-9623-85ca998b3509","html_url":"https://github.com/librespeed/speedtest-go","commit_stats":{"total_commits":53,"total_committers":20,"mean_commits":2.65,"dds":"0.39622641509433965","last_synced_commit":"7001fa4fa52945cbc6d4c32200bbcce7bbf6145c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librespeed%2Fspeedtest-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librespeed%2Fspeedtest-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librespeed%2Fspeedtest-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librespeed%2Fspeedtest-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librespeed","download_url":"https://codeload.github.com/librespeed/speedtest-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librespeed%2Fspeedtest-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259236375,"owners_count":22826295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","librespeed","speedtest"],"created_at":"2024-08-01T15:02:55.055Z","updated_at":"2025-06-12T05:39:22.270Z","avatar_url":"https://github.com/librespeed.png","language":"HTML","readme":"![LibreSpeed Logo](https://github.com/librespeed/speedtest-go/blob/master/.logo/logo3.png?raw=true)\n\n# LibreSpeed\n\nNo Flash, No Java, No WebSocket, No Bullshit.\n\nThis is a very lightweight speed test implemented in JavaScript, using XMLHttpRequest and Web Workers.\n\n## Try it\n[Take a speed test](https://speedtest.zzz.cat)\n\n## Compatibility\nAll modern browsers are supported: IE11, latest Edge, latest Chrome, latest Firefox, latest Safari.\nWorks with mobile versions too.\n\n## Features\n* Download\n* Upload\n* Ping\n* Jitter\n* IP Address, ISP, distance from server (optional)\n* Telemetry (optional)\n* Results sharing (optional)\n* Multiple Points of Test (optional)\n* Compatible with PHP frontend predefined endpoints (with `.php` suffixes)\n* Supports [Proxy Protocol](https://www.haproxy.org/download/2.3/doc/proxy-protocol.txt) (without TLV support yet)\n\n![Screencast](https://speedtest.zzz.cat/speedtest.webp)\n\n## Server requirements\n* Any [Go supported platforms](https://github.com/golang/go/wiki/MinimumRequirements)\n* BoltDB, PostgreSQL or MySQL database to store test results (optional)\n* A fast! Internet connection\n\n## Installation\n\n### Install using prebuilt binaries\n\n1. Download the appropriate binary file from the [releases](https://github.com/librespeed/speedtest-go/releases/) page.\n2. Unzip the archive.\n3. Make changes to the configuration.\n4. Run the binary.\n5. Optional: Setup a systemd service file.\n\n### Use Ansible for automatic installation\n\nYou can use an Ansible role for installing speedtest-go easily. You can find the role on the [Ansible galaxy](https://galaxy.ansible.com/flymia/ansible_speedtest_go). There is a [separate repository](https://github.com/flymia/ansible-speedtest_go) for documentation about the Ansible role.\n### Compile from source\n\nYou need Go 1.16+ to compile the binary. If you have an older version of Go and don't want to install the tarball\nmanually, you can install newer version of Go into your `GOPATH`:\n\n0. Install Go 1.17\n\n   ```\n   $ go get golang.org/dl/go1.17.1\n   # Assuming your GOPATH is default (~/go), Go 1.17.1 will be installed in ~/go/bin\n   $ ~/go/bin/go1.17.1 version\n   go version go1.17.1 linux/amd64\n   ```\n\n1. Clone this repository:\n\n    ```\n    $ git clone github.com/librespeed/speedtest-go\n    ```\n\n2. Build\n    ```\n    # Change current working directory to the repository\n    $ cd speedtest-go\n    # Compile\n    $ go build -ldflags \"-w -s\" -trimpath -o speedtest main.go\n    ```\n\n3. Copy the `assets` directory, `settings.toml` file along with the compiled `speedtest` binary into a single directory\n\n4. If you have telemetry enabled,\n    - For PostgreSQL/MySQL, create database and import the corresponding `.sql` file under `database/{postgresql,mysql}`\n\n        ```\n        # assume you have already created a database named `speedtest` under current user\n        $ psql speedtest \u003c database/postgresql/telemetry_postgresql.sql\n        ```\n\n    - For embedded BoltDB, make sure to define the `database_file` path in `settings.toml`:\n\n        ```\n        database_file=\"speedtest.db\"\n        ```\n\n5. Put `assets` folder under the same directory as your compiled binary.\n    - Make sure the font files and JavaScripts are in the `assets` directory\n    - You can have multiple HTML pages under `assets` directory. They can be access directly under the server root\n    (e.g. `/example-singleServer-full.html`)\n    - It's possible to have a default page mapped to `/`, simply put a file named `index.html` under `assets`\n\n6. Change `settings.toml` according to your environment:\n\n    ```toml\n    # bind address, use empty string to bind to all interfaces\n    bind_address=\"127.0.0.1\"\n    # backend listen port, default is 8989\n    listen_port=8989\n    # proxy protocol port, use 0 to disable\n    proxyprotocol_port=0\n    # Server location, use zeroes to fetch from API automatically\n    server_lat=0\n    server_lng=0\n    # ipinfo.io API key, if applicable\n    ipinfo_api_key=\"\"\n   \n    # assets directory path, defaults to `assets` in the same directory\n    # if the path cannot be found, embedded default assets will be used\n    assets_path=\"./assets\"\n\n    # password for logging into statistics page, change this to enable stats page\n    statistics_password=\"PASSWORD\"\n    # redact IP addresses\n    redact_ip_addresses=false\n\n    # database type for statistics data, currently supports: none, memory, bolt, mysql, postgresql\n    # if none is specified, no telemetry/stats will be recorded, and no result PNG will be generated\n    database_type=\"postgresql\"\n    database_hostname=\"localhost\"\n    database_name=\"speedtest\"\n    database_username=\"postgres\"\n    database_password=\"\"\n\n    # if you use `bolt` as database, set database_file to database file location\n    database_file=\"speedtest.db\"\n\n    # TLS and HTTP/2 settings. TLS is required for HTTP/2\n    enable_tls=false\n    enable_http2=false\n\n    # if you use HTTP/2 or TLS, you need to prepare certificates and private keys\n    # tls_cert_file=\"cert.pem\"\n    # tls_key_file=\"privkey.pem\"\n    ```\n\n## Differences between Go and PHP implementation and caveats\n\n- Since there is no CGo-free SQLite implementation available, I've opted to use [BoltDB](https://github.com/etcd-io/bbolt)\n  instead, as an embedded database alternative to SQLite\n- Test IDs are generated ULID, there is no option to change them to plain ID\n- You can use the same HTML template from the PHP implementation\n- Server location can be defined in settings\n- There might be a slight delay on program start if your Internet connection is slow. That's because the program will\nattempt to fetch your current network's ISP info for distance calculation between your network and the speed test client's.\nThis action will only be taken once, and cached for later use.\n\n## License\nCopyright (C) 2016-2020 Federico Dossena\nCopyright (C) 2020 Maddie Zhan\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/lgpl\u003e.","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrespeed%2Fspeedtest-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrespeed%2Fspeedtest-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrespeed%2Fspeedtest-go/lists"}