Flatpak on Ubuntu gives you access to Flathub — the largest catalog of sandboxed Linux apps. Out of the box on Ubuntu 26.04 it pulls from dl.flathub.org, which sits overseas and crawls for most users in China. This guide installs Flatpak the APT way and switches Flathub to a domestic mirror in about five minutes.
Install Flatpak
Ubuntu 26.04 ships Flatpak 1.16 in the universe repo. You can install it straight from APT — no PPA needed:
sudo apt update
sudo apt install flatpakVerify:
flatpak --versionIf you’d rather not have Flatpak as an APT package, Ubuntu also offers it as a Snap. The APT route is what’s covered here because it integrates cleanly with apt update and is the route Flathub officially documents.
Add the Flathub remote
After installing, add the Flathub repository so flatpak install knows where to look:
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepoThat URL points at the overseas default. To make installs and updates fast from China, replace it with a mirror.
Switch Flathub to a China mirror
Two reliable options — pick one.
USTC (University of Science and Technology of China)
flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub
flatpak updateUSTC’s mirror has been around since 2019, is generally complete, and is the safest default. Coverage of new Flathub submissions is usually within hours.
SJTUG (Shanghai Jiao Tong University)
flatpak remote-modify flathub --url=https://mirrors.sjtug.sjtu.edu.cn/flathub
flatpak updateSJTUG’s mirror is younger but syncs aggressively — for newly-submitted apps it tends to catch up faster than USTC. Pick it if you install bleeding-edge titles often.
Switching back to the official source
If a mirror lags behind for a specific app, flip back temporarily:
flatpak remote-modify flathub --url=https://dl.flathub.org/repo
flatpak updateTry it out
Install something to confirm the mirror works:
flatpak install flathub org.tuxfamily.StuntRally
flatpak run org.tuxfamily.StuntRallyThe first run downloads the runtime (~1 GiB) and the app; subsequent runs are cached locally.
A note on APT mirrors too
Flatpak is only one of the package sources on Ubuntu. If your apt update is also slow, switch Ubuntu’s package mirror the same way — see Ubuntu 26.04 LTS China Mirrors: One-Click Switch to Tsinghua, USTC & Aliyun.
Troubleshooting
flatpak: command not foundafter install — log out and back in, or runsource /etc/profile.No remotes found— re-run theremote-addcommand above.- Mirror has older app versions than dl.flathub.org — flip back to the official URL with the command under “Switching back”.
- HTTPS certificate errors —
flatpak remote-modify flathub --url=https://...does not change the GPG key. Runflatpak updateonce after switching to refresh the trust chain.
Comments