Nextcloud client command line does not work

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.6.3
  • Nextcloud client version:
    • 4.0.7daily

Summary of the issue you are facing:

I am trying to setup nextcloud client via command line on Fedora 43 and the command line client does not seem to work at all.

Steps to replicate it (hint: details matter!):

I am executing the following command which is also written in the nextcloud docu:

nc_config="$HOME/.config/Nextcloud/"

nextcloud --userid "$nc_user" --apppassword "$nc_password" --serverurl "$url" --localdirpath "$nc_path" --confdir "$nc_config" --logdebug

All other variables are read from user input and are correct (if I copy them from the password manager into the GUI, it works).

There is no error being reported but if I check the local path, it is empty and nextcloud is not mounted there. Also the GUI does not show any connection to the server.

Log entries

Nextcloud (client)

No errors, only a couple of warnings from warning default qrc:/qml/src/gui/tray/*** with TypeError: Cannot read property '<component>' of null. They do not seem to be related

Info/debug messages report the following:

PROPFIND of QUrl("<serverurl>/remote.php/dav/files/<user>/") FINISHED WITH STATUS "OK"
(...)
Saved all account settings, status: QSettings::NoError

So, how do I setup nextcloud client via command line? I would like to do this for multiple computers, so I would like to avoid setting up everything manually.

Thanks very much for help! :slight_smile:

Your logs suggest the command-line setup actually succeeded. In particular, PROPFIND ... OK means authentication/server validation worked, and Saved all account settings, status: QSettings::NoError means the client wrote the account configuration.

The most likely issues I can think of are that you’re either:

  • checking a client instance that was already running before you ran the command-line provisioning (e.g., check the process list and really making sure it’s not still running)
  • using --confdir "$HOME/.config/Nextcloud/" during provisioning, but later checking a GUI instance that is not started with the same --confdir , so it reads a different config location and appears unconfigured.

Also, just to clarify: the desktop client does not “mount” the server into the local path like a network filesystem; it creates a sync connection. So an empty local folder does not necessarily mean provisioning failed.