Fast downloads
Why big downloads from your server can be much faster, how LibrePortal turns that on by itself, and how to switch it off.
On a server running rootless Docker (LibrePortal's default), traffic from outside the box passes through a small helper program before it reaches your apps. That helper handles one download at a time at roughly 25 MB/s, and much less on a small VPS. Fast downloads skips the helper for Traefik's web ports, 80 and 443, so every app behind Traefik benefits. On a busy test machine a single download went from about 24 MB/s to between 180 and 450 MB/s.
What you need to do#
Nothing. It is on by default:
- A new install turns it on once Traefik is up.
- An existing install gets it from an update, which first tests it on a throwaway Traefik, then checks a real request through the real one. If your server can't do it, nothing is changed and the reason is shown under Admin → Config → Network, with one notification.
Nothing is loosened to make it work, and the things you rely on behave as before: apps still see real client addresses, the firewall and your trusted places still apply, and apps that reach Traefik by name still can. Only web traffic on 80 and 443 uses it; HTTP/3 stays on Docker's own ports.
It looks after itself#
Every time Traefik starts, LibrePortal checks within a second that each port really landed on the fast path, and restarts Traefik straight away if one didn't. A health check also keeps watching afterwards. If a port goes missing, for instance after Docker restarts, it is put back. If that doesn't hold, Traefik goes back onto Docker's own ports by itself, and you are told on the dashboard and by notification. You lose speed, never access.
The switch#
Open Admin → Config → Network → Fast downloads to turn it on or off and see its status.
From the command line#
| Command | What it does |
|---|---|
fastpath status |
Whether it is on, and whether each port works end to end. |
fastpath on |
Turn it on (it tests first, and leaves things alone if it can't). |
fastpath off |
Put Traefik back on Docker's own ports. |
Run each one as sudo -u libreportal libreportal <command>.