How to install nextcloudcmd


I need to sync some folders I have on Nextcloud to a local headless Linux machine.
I found some docs about nextcloudcmd, but apparently, I can only install it alongside nextcloud-desktop.

Is there a way to sync using nextcloudcmd if I’m not running a desktop environment?
Or, is there any other tool I can use to sync in a headless Linux?

PS: I tried to use rclone, but sync for rclone means overwriting everything in the local machine with the contents of the server. I need something bidirectional.

Installing nextcloud-desktop doesn’t even seem to do it. Although it installs a great deal of software, there is no sign of nextcloudcmd after it is installed. This is really frustrating. I want to do the kind of things that can be done easily with Dropbox on a headless server, but I don’t want to use Dropbox. This thread is the only direct hit for a search on “install nextcloudcmd”!

You may run nextcloudcmd by cron regularly , so it will stay in sync.

How did you install it?
Usually it is located there:


or try find as root or sudo

sudo find / -name "nextcloudcmd"

Check if it is there or check your $PATH

user@terminal ~$ which nextcloudcmd
user@terminal ~$ nextcloudcmd --version
Nextcloud version 2.6.5git
Git revision adada8b2eecd65d7a587b6abe0ae2aabca9a0b75
Using Qt 5.15.0, built against Qt 5.15.0
Using 'OpenSSL 1.1.1g  21 Apr 2020'
Running on Arch Linux, x86_64

Same problem here:

I successfully installed nextcloud-desktop on Debian 10 (Buster) , but no trace of nextcloudcmd

Here is the result of some commands:

  • # whereis nextcloudcmd gives an empty answer: nextcloudcmd:
  • nextcloudcmd --version results in command not found
  • # find / -name "nextcloudcmd" says:
    • find: ‘/proc/5145/task/5145/net’: Argument invalide
    • find: ‘/proc/5145/net’: Argument invalide

Any hint?

It looks like for debian there are separate packages.

sudo apt update
sudo apt install nextcloud-desktop-cmd

I have stumbled across what seems a much better solution. You can install rclone ( straight from the standard Debian repository. It doesn’t pull in lots of other stuff in the way nextcloudcmd does, it simply installs a single module. Rclone supports over 20 cloud storage services, including webdav, and with specific support for Nextcloud. It is easy to install and use.

It will sync in only one direction for one call. For me, that is fine, because I want the server to be a replica of the data on the Nextcloud server. But presumably it is possible to run it more than once, with the sync going in opposite directions.

One of my uses is to sync music to a local DLNA server (running minidlna on a Raspberry Pi). The way rclone works is to go through a configuration process that provides all the details of the cloud storage. The config process is shown in detail at Once that is done, all I have to do is to run:

/usr/bin/rclone sync music: /var/lib/minidlna/MyMusic

1 Like