Deploys LibreSpeed as a rootless Podman container managed by podman compose. End users open a browser and test their LAN speed — no client installation required.
- Podman and podman-compose installed on the server
- An external Podman network named
www(shared with the reverse proxy)
Run the bootstrap script — it clones the repo, sets up the systemd service, and enables the nightly update timer:
curl -fsSL https://raw.githubusercontent.com/CollegiumAcademicum/speedtest/main/setup.sh | bashThen create the .env file and set a password for the results page:
cp ~/speedtest/.env.example ~/speedtest/.env
nano ~/speedtest/.env # set SPEEDTEST_PASSWORDThen pull the image and start:
cd ~/speedtest && ./start.shAfter this the container starts automatically at every boot.
git clone https://github.com/CollegiumAcademicum/speedtest.git /srv/containers/www/home/speedtest
ln -s /srv/containers/www/home/speedtest ~/speedtest
cd ~/speedtestcp .env.example .env
nano .env # set SPEEDTEST_PASSWORDsudo cp speedtest.service /etc/systemd/system/
sudo cp speedtest-update.service /etc/systemd/system/
sudo cp speedtest-update.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable speedtest.service
sudo systemctl enable --now speedtest-update.timer./start.shThe container listens on port 80 and is attached to the external www network.
Point Caddy at the container name librespeed. The flush_interval -1 ensures the garbage data is streamed immediately rather than buffered:
speedtest.example.com {
reverse_proxy http://librespeed:80 {
flush_interval -1
}
}
HTTP/2 and throughput: Caddy's HTTP/2 flow control significantly limits download speeds for large transfers like speedtests. On the www host, H2 was disabled globally in /srv/containers/www/etc/Caddyfile to achieve acceptable results (~180 Mbps vs ~80 Mbps with H2):
{
debug
servers {
protocols h1
}
}
This has no practical impact on the other services behind the same Caddy instance (all simple low-traffic internal tools with minimal assets).
Add to both map blocks in /etc/nginx/nginx.conf on ca-ingress:
# stream block (HTTPS passthrough)
speedtest.ca-hd.de www.intranet.ca-hd.de:443;
# http block (HTTP redirect)
speedtest.ca-hd.de www.intranet.ca-hd.de:80;Reload: podman exec <nginx-container> nginx -t && podman exec <nginx-container> nginx -s reload
Images are pulled and the container is restarted automatically every night at 03:00. To update manually:
podman compose pull && ./start.sh~/speedtest/
├── docker-compose.yaml
├── speedtest.service # systemd unit (installed by setup.sh)
├── speedtest-update.service # pulls latest image and restarts
├── speedtest-update.timer # fires nightly at 03:00
├── .env.example # copy to .env and fill in SPEEDTEST_PASSWORD
├── setup.sh # bootstrap script for fresh servers
├── start.sh
└── stop.sh
podman compose logs speedtest # container logs
podman compose restart speedtest # restart the container
podman compose down # stop everythingContainer not reachable from the reverse proxy
Check the container is on the www network:
podman network inspect wwwPort blocked by firewall
# Fedora/RHEL
sudo firewall-cmd --add-service=http --permanent && sudo firewall-cmd --reload
# Debian/Ubuntu
sudo ufw allow httpService not starting at boot
sudo systemctl status speedtest.service
journalctl -u speedtest.service