Fixes and syntax for setting up Tailscale repositories with DNF5 on Fedora¶
If you are running Fedora 41 or newer, repository management syntax has changed due to the migration to DNF5. Specifically, --add-repo was replaced with the addrepo positional verb.
Tested on: Fedora 44 KDE Plasma
The Fix: Adding Tailscale Repo in DNF5¶
Run the following commands in your terminal:
# 1. Add the official Tailscale repository using DNF5 syntax
sudo dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo
# 2. Install Tailscale (or update it if it's already installed)
sudo dnf install --refresh -y tailscale
sudo dnf upgrade --refresh tailscale
Alternative Direct Method¶
If you encounter issues with config-manager plugin commands in DNF5, download the .repo file directly into /etc/yum.repos.d/ using curl:
sudo curl -fsSL https://pkgs.tailscale.com/stable/fedora/tailscale.repo -o /etc/yum.repos.d/tailscale.repo
sudo dnf install --refresh -y tailscale
Technical Details & Syntax Changes¶
- DNF v4 vs. DNF5 CLI Syntax: In older versions of Fedora (DNF v4), repository management was handled by
dnf-plugins-coreviadnf config-manager --add-repo <url>. - DNF5 Standardization: With DNF5,
config-managerbecame a core subcommand. Sub-options were refactored into explicit positional verbs (addrepo,setopt,enable,disable). - Remote Repofile Flag: The
--from-repofile=flag explicitly tells DNF5 to fetch and parse a remote.repoconfiguration file into/etc/yum.repos.d/.
Operational Considerations¶
- GPG Key Trust Prompts: The first time DNF upgrades a package from a newly added repository, it will prompt you to inspect and import Tailscale's public GPG signing key. In automated non-interactive update scripts, this will fail unless the
-yflag is passed or the GPG key is imported ahead of time (sudo rpm --import ...). - Repository Naming Conflicts: If an existing community or COPR repository is already configured for Tailscale, adding the official
.repofile might result in duplicate repository definitions, causing DNF to throw repository ID warnings during system updates.
Sources & References¶
- Fedora Project Documentation — DNF5 Changes: Official documentation detailing command updates and plugin changes in DNF5.
- Tailscale Official Linux Package Repositories: Official repository listing and setup specifications for RPM systems.