Hi
Here is my system, all newly setup as it’s a lab environment and I am testing
NC Server: VMWare Virtual Machine (hanssonit)
NC version: 31.0.7
Client OS: Windows 11
Desktop Client: 3.16.6-x64
Environment: Windows domain with AD
I have installed the NC client MSI on a windows 11 PC, but have not added any user accounts because I am trying to automate the adding user accounts process. Basically, if I run NC I get the Add NC account screen, which is what I want:
Currently I am working in a test environment, but I’m wanting to deploy where we will have up to 10 users with access to 6 PCs, within a windows active directory domain. Any user will be able to log into any PC and I don’t want the users to setup their NC account every time they log into a PC for the first time. I do not also want to setup each user manually on each PC, meaning I will have to log onto each PC, for each user and repeat the add NC account 60 times. Also, in the future if there’s a new user or new PC, a lot of manual configuration will be required.
I have read on the the NC website user manual it is possible to setup accounts for “Mass Deployment And Account Creation” so that the scenario above can be avoided and automated. The documentation is here:
I followed the instructions to created the --apppassword for a test user and obtained an app password to allow setting up the account via the command-line.
I then run the following command to add a user account with only the required argument:
C:\PROGRA~1\NEXTCL~1\NEXTCL~2.EXE --userid %username% --apppassword <my_generated_app_password> --serverurl https://<my_domain.com>
Note: C:\PROGRA~1\NEXTCL~1\NEXTCL~2.EXE
will go to
C:\Program Files\Nextcloud\nextcloud.exe
This will work by connecting to the user account on the NC server, but it does not set the default local sync folder for the NC Server to connect to:
I can create the local sync folder manually by clicking “Add Folder Sync Connection” and going through the wizard and everything works fine, however this defeated the purpose of “Mass Deployment” as you need to add the local sync folder manually and do additional steps in the wizard. I only did this command with the minimum arguments for testing just to make sure I can establish a connection between the NC windows client and NC server.
What I am trying to do is set the local sync folder via the command-line as per the documentation, which requires adding the --localdirpath
argument to the command above:
C:\PROGRA~1\NEXTCL~1\NEXTCL~2.EXE --userid %username% --apppassword <my_generated_app_password> --localdirpath C:\Test\ --serverurl https://<my_domain.com>
But then nothing happens, the command just fails and NC is still asking for a user account to connect to, ie no user account is added when the --localdirpath
arguement is included:
I have tried various formats for the --localdirpath argument:
--localdirpath "C:\Test\"
--localdirpath 'C:\Test\'
I have also tried adding the --remotedirpath /Documents
argument to the command and point to a folder named “Documents” on the NC server, but it still fails as above, ie no account is setup. I have tried the commands in both terminal and powershell but still the same outcome, ie with the minimum arguments the account is added but no local sync folder, with the --localdirpath
argument, command fails and no account is added.
What I need is if someone can tell me how to get the --localdirpath
argument to work with the command-line of nextcloud.exe or point to the documentation where I can see how this works.
Also, if someone can tell me how to change these settings via the command-line, that would also be appriciated:
Thanks in advance for any help
Kal …