Move from fedora to flatpak

Fedora still has version 3.17 where flathub has the new 33.0.0.

What is the way of transtion from the fedora packaged version to the flathub version? Can I transfer sync sources and files from one to another?

I did not use Fedora but Debian and Ubuntu. You can easy switch between Diferent NC-Clients, eg. out of Debian/Ubuntus DEB’s to AppImage and vice versa.

The relevant infos are stored in a file named nextcloud.cfg. It’s usually stored in the folder: /home/<USERNAME>/.config/Nextcloud/ and will not be deleted if you deinstall packages and switch for example to AppImage-Version.

But just to be prepared if any shit will happen, backup the /home/<USERNAME>/.config/Nextcloud/nextcloud.cfg beforehand.

This nextcloud.cfg is even used on Windows. So i assume it’s also used on Fedora.

1 Like

I’ve never switched between distro packages and Flatpaks. However, Flatpaks usually store their configuration files under ~/.var/com.oraginisation.subproject.appname/ , so I would assume that the content of ~/.config/Nextcloud/ is probably not carried over automatically.

2 Likes

If you have installed Flatpak, you can transfer your sync setting account using a sandboxed location. You just need the old configuration, so for that, you need to note down your server URL and account details.

First, remove the old connection, and after launching the new flakpak client, add your account again and select the same local sync folder. Your synced files on disk, the client will detect them and usually resume syncing without a full re-download.

In theory, that should work. But I’d still back up the data beforehand, just in case something goes wrong. Then again, you should already have a backup. :wink:

1 Like

Finally its @theking2’s decision, but i would not use flatpak but AppImage instead. As AppImage is currently Version Nextcloud-33.0.1 available and uses the nextcloud.cfg.

If you decide to switch to a sandboxed (eg flatpak) version of the NC-Client be prepared to have issues with the GNOME Keyring oder its replacement in KDE. Flatpaks use XDG Portals to communicate with the host’s secret service. So to allow sandboxed applications access to the keyring, the xdg-desktop-portal and xdg-desktop-portal-gnome (or similar) packages must be installed.

This should work out of the box on Fedora. However, you still need to set up the Flatpak client, as I’m pretty sure that it will not automatically recognize or reuse the configuration from the RPM package.

@theking2 Here’s what I would do:

  1. Back up the existing Nextcloud directory.
  2. Uninstall the RPM.
  3. Install the Flatpak.
  4. Sign in.
  5. Test whether it works by pointing it to the existing Nextcloud directory without causing sync conflicts.
    • If yes: :partying_face:
    • If no: use a new/empty directory (all your files will be downloaded again).

Note: Fedora essentially offers three versions of the Nextcloud client:

  • The RPM package from the distribution repositories
  • The Flatpak from Fedora’s own Flatpak repository
  • The version from Flathub

The first two are still on version 3.17, whereas the Flathub version is on the latest version, so make sure the Flathub repository is enabled and select the Flathub version when installing it.

1 Like

By the way, I just tested it. You can add the Flathub repo and install the client via Gnome Software, or probably also via Discover if you are using KDE. However, here are the CLI commands that should definitely give you the correct version:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.nextcloud.desktopclient.nextcloud

I have some discussion on versions on here (and also fedoras forum) but isn’t the problem with AppImage that I have to manually download an updated version? For any software it is important to stay up to date but for software that moves files between computers even more so. We won’t want it be a vessel for malevolent software and any security problems should be update immediately.

Of cause with regard to the obligation to update manually you are right.

But you also need to update flatpak’s seperat (flatpak update) since its not part of the RPM package update routine.

Yeah, but still, manually downloading a new package every time an upgrade is available is suboptimal, since it’s much more tedious than just typing flatpak update in the terminal.

Also, at least in GNOME and KDE, you can update Flatpaks via the App Center (GNOME Software or KDE Discover) along with the distro packages, and you’ll also be notified of updates there.

Or, if you wanted to fully automate it, you could create a systemd timer or cron job that regularly executes flatpak update -y

I think AppImages was a good idea, but in my opinion, Flatpak has won the race for universal package formats in Linux, and it would be great if the Nextcloud devs would adopt the Flathub repo and have it verified so that the Flatpak becomes official.

yeah - you are right. And i was not opposed to the benefit of flatpak before AppImage. As i wrote to @theking2

Yeah. I just wanted to highlight the benefits of Flatpak. :wink:

Btw, while it doen’t affect me, at least for now, on immutable, atomic, or whatever you want to call them, distros, Flatpaks are usually the only supported way to install software. One more reason to make Flatpak official, imho. :slight_smile:

Maybe someone should open a feature request for this in the desktop repo; I couldn’t find one there at a glance.

1 Like

Appreciated.

The releases of NC desktop are quite frequent now and on Fedora I have three ways of installation all with varying versions. Flatpak, Fedora package or AppImage. It seems that AppImage is the latest (?) and I will move away from flatpak/hub for that reason alone.

For me two ways of installing software is way to complicated for my :brain:

Besides if the client is telling me there is a newer version that is as good as dnf up -y

Distro packages often lag behind. Flatpaks are a good way to get more up-to-date software without having to use a rolling-release distro where the whole system is constantly upgraded.

Think of it like the Windows Store or Apple App Store, but with the option to use multiple repos, or as they call it “remotes”.

And yes, Fedora should probably remove their own Flatpak repo and just default to Flathub.

I believe the main reason they keep it is because of their Atomic distros, where Flatpak is the preferred way to install software, so they need to provide Flatpaks for those systems, because it basically replaces RPMs and dnf on these systems. However, because of Fedora’s policies regarding patents and FOSS, they cannot simply use Flathub directly. Instead, they patch out certain proprietary components or patented features, in some packages.

This is probably not a complete explanation of why they patch certain packages or why they do not always provide the latest upstream packages in every case, but that is what they do, and all distros do it to some extent. For the exact specifics, you would have to ask in the Fedora forum, but I hope you get the general idea.

1 Like