Custom, LNVPS-themed front-end and deployment config for the
LibreSpeed Rust backend
(librespeed-rs), running at https://speedtest.lnvps.net.
This repo exists so the themed index.html and server changes aren't lost.
assets/index.html LNVPS-themed speedtest page (drop-in for LibreSpeed)
deploy/
configs.toml.example librespeed-rs config (native TLS on :443)
systemd/…/override.conf systemd socket drop-in — listen on 443 instead of 8080
letsencrypt/…/restart-speedtest.sh certbot deploy hook (reload after renewal)
A single self-contained page styled to match lnvps.net:
- Pure-black background, Source Code Pro monospace, LNVPS green
(
oklch(0.8 0.3 142)) + cyan (#00fff2) accents, thin green rules. - Redrawn gauges (green download / cyan upload) and a live throughput sparkline plotting both series over the duration of the test.
- Full SEO/social tagging: title, description, canonical,
robots, Open Graph, Twitter Card, and JSON-LD (WebApplication) structured data. - Accessibility floor: responsive to mobile, visible keyboard focus,
prefers-reduced-motionrespected.
It relies on the LibreSpeed assets shipped with librespeed-rs
(speedtest.js, servers_list.js, favicon.ico) being present in the same
directory — only index.html is customised.
The server runs the official librespeed-rs .deb. Assets live in
/var/lib/librespeed-rs/.
wget https://github.com/librespeed/speedtest-rust/releases/download/v1.4.0/librespeed-rs-x86_64-unknown-linux-gnu.deb
sudo dpkg -i librespeed-rs-x86_64-unknown-linux-gnu.debsudo cp assets/index.html /var/lib/librespeed-rs/assets/index.htmllibrespeed-rs terminates TLS itself, so there's no proxy hop to skew
measurements. It uses systemd socket activation, so the listening port is
set on the socket, not just in the config.
# certificate (port 80 free for the HTTP-01 challenge)
sudo certbot certonly --standalone -d speedtest.lnvps.net \
--agree-tos --register-unsafely-without-email
# config: enable TLS + point at the cert (see deploy/configs.toml.example)
sudo cp deploy/configs.toml.example /var/lib/librespeed-rs/configs.toml
# make the socket listen on 443 instead of 8080
sudo mkdir -p /etc/systemd/system/speedtest_rs.socket.d
sudo cp deploy/systemd/speedtest_rs.socket.d/override.conf \
/etc/systemd/system/speedtest_rs.socket.d/override.conf
# reload cert automatically on renewal
sudo cp deploy/letsencrypt/renewal-hooks/deploy/restart-speedtest.sh \
/etc/letsencrypt/renewal-hooks/deploy/restart-speedtest.sh
sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/restart-speedtest.sh
sudo systemctl daemon-reload
sudo systemctl enable --now speedtest_rs.socket
sudo systemctl restart speedtest_rs.serviceVerify:
curl -sI https://speedtest.lnvps.net/ | head -1 # HTTP/1.1 200 OK- Static file serving is limited.
librespeed-rsonly serves files with.js,.html,.ico,.cssextensions (res_200_fsin its source); any other path 404s. That's whyrobots.txt/sitemap.xmlcan't be hosted here — the in-page<meta name="robots">covers indexing instead. - The service unit is named
speedtest_rs(notlibrespeed-rs) since v1.4.0. Manage withsystemctl {status,restart,stop} speedtest_rs. - Certbot's timer auto-renews; the deploy hook restarts the service so it picks up the new certificate.
Front-end derived from LibreSpeed (LGPL-3.0). Theming and deployment config © LNVPS.