The Nextcloud Client packages contain a command line client, nextcloudcmd, that can
be used to synchronize Nextcloud files to client machines.

nextcloudcmd performs a single sync run and then exits the synchronization
process. In this manner, nextcloudcmd processes the differences between
client and server directories and propagates the files to bring both
repositories to the same state. Contrary to the GUI-based client,
nextcloudcmd does not repeat synchronizations on its own. It also does not
monitor for file system changes.

To invoke nextcloudcmd, you must provide the local and the remote repository
URL using the following command:

nextcloudcmd[OPTIONS...]sourcedirnextcloudurl

where sourcedir is the local directory and nextcloudurl is
the server URL.

Other command line switches supported by nextcloudcmd include the following:

To synchronize the Nextcloud directory Music to the local directory
media/music, through a proxy listening on port 8080, and on a gateway
machine using IP address 192.168.178.1, the command line would be:

nextcloudcmd requires access to an exclude list file. It must either be
installed along with nextcloudcmd and thus be available in a system location,
be placed next to the binary as sync-exclude.lst or be explicitly specified
with the --exclude switch.

When disk space is low the Nextcloud Client will be unable to synchronize all files. This section describes its behavior in a low disk space situation as well as the options that influence it.

Synchronization of a folder aborts entirely if the remaining disk space falls below 50 MB. This threshold can be adjusted with the OWNCLOUD_CRITICAL_FREE_SPACE_BYTES environment variable.

Downloads that would reduce the free disk space below 250 MB will be skipped or aborted. The download will be retried regularly and other synchronization is unaffected. This threshold can be adjusted with the OWNCLOUD_FREE_SPACE_BYTES environment variable.