How to run multiple instances of nextcloud client?

There’s a question posted in 2020: Is it possible to run multiple instances of nextcloud client?

I also wanted to do this, and years later I have figured out how - at least on Linux. I can’t make a comment on the original topic because it’s closed and archived.

The short answer is: set TMPDIR. The Qt nextcloud client obtains the “Single Application” logic from the Qt add-on library KDAB , and that implements the check by creating a lock file and a socket in /tmp. If your second instance has a wrapper that sets TMPDIR to a different directory (${HOME}/tmp , for instance), then it will create a second lock file and socket there.

You also need a separate config, which is easier. It’s not the only way to do it, but a clean way is to make a separate copy of the Nextcloud Appimage binary (you can rename it), and use the AppImage option --appimage-portable-home. This creates a directory alongside the Nextcloud-version-arch.Appimage executable called Nextcloud-version-arch.Appimage.home, and that directory is treated as your home directory by the program.

(That means that by default it will put your sync folder under that directory, but you can easily change that in the config).

  1. Copy the Nextcloud-33.0.2-x86_64.Appimage binary to ~/bin/Nextcloud-alt.Appimage
  2. ~/bin/Nextcloud-alt.AppImage --appimage-portable-home

What is the use case for this unsupported method?

Probably one instance need to use a VPN and the other not? But this can be done by using a proxy.

Yes, either you don’t want them to always be active at the same time, or you want completely isolated configurations. The original query from 2020 was to have one for work and one from home, the work one being dependent on a VPN. You might have a removable drive that you want to keep synchronized when it is present, or an encrypted volume that is only activated when needed.