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:

Bash
sudo apt update
sudo apt install flatpak

Verify:

Bash
flatpak --version

If 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:

Bash
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

That 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)

Bash
flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub
flatpak update

USTC’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)

Bash
flatpak remote-modify flathub --url=https://mirrors.sjtug.sjtu.edu.cn/flathub
flatpak update

SJTUG’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:

Bash
flatpak remote-modify flathub --url=https://dl.flathub.org/repo
flatpak update

Try it out

Install something to confirm the mirror works:

Bash
flatpak install flathub org.tuxfamily.StuntRally
flatpak run org.tuxfamily.StuntRally

The 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 found after install — log out and back in, or run source /etc/profile.
  • No remotes found — re-run the remote-add command above.
  • Mirror has older app versions than dl.flathub.org — flip back to the official URL with the command under “Switching back”.
  • HTTPS certificate errorsflatpak remote-modify flathub --url=https://... does not change the GPG key. Run flatpak update once after switching to refresh the trust chain.
Last modified: 2026年7月18日

Author

Comments

Write a Reply or Comment

Your email address will not be published.