My version of Nextcloud came with a known bug. When you try to add an external storage drive through the admin web interface it fails and repeatedly asks for your password. I did some digging and found that you can add an external drive via the command line interface. It saved my bacon so I thought I would share it here. Follow these simple steps:-
- Login to your YNH server via SSH.
- Go to the nextcloud (NC) directory so you can run the .occ commands built into NC.
- cd /var/www/nextcloud
- See what shares are active (or broken)
- php occ files_external:list
- Now create your external drive entry, (it is one very long command on one line)
- php occ files_external:create sharename smb password::password -c host=192.168.8.1 -c share=sharename -c user=username -c password=theuserspassword
- In the above you replace sharename with the sharename for your drive, replace the host ip address with the ip address of your drive, you replace username with the user you want to have access and of course you replace theuserpassword with that user’s password.
- NOTE: DO NOT replace the part that says password::password , leave that as shown
- You can now test to see if your drive has been added to the list with the command we used earlier
- php occ files_external:list
Hope this is useful to someone.