Skip to content

Mount Nextcloud drive to linux server

Dean Kayton edited this page Dec 23, 2021 · 1 revision
  • sudo apt-get update && sudo apt-get install davfs2 (Answer Yes for should unpriveliged users be able to mount)
  • sudo usermod -aG davfs2 ubuntu (log out and in again for it to take effect)
  • mkdir ~/.davfs2
  • sudo cp /etc/davfs2/secrets ~/.davfs2/secrets
  • sudo chmod 600 ~/.davfs2/secrets
  • nano ~/.davfs2/secrets and then add a line such as <absolute_path_to_mnt> <nextcloud_user> <nextcloud_apikey>
  • sudo nano /etc/fstab and then add a line such as https://drive.wakoma.net/remote.php/dav/files/<nextcloud_user>/ <absolute_path_to_mnt> davfs user,rw,auto 0 0
  • To test, mount <absolute_path_to_mnt>