If you prefer, you may also connect your desktop PC to your Nextcloud server by using the WebDAV protocol rather than using a special client application. Web Distributed Authoring and Versioning (WebDAV) is a Hypertext Transfer Protocol (HTTP) extension that makes it easy to create, read, and edit files on Web servers. With WebDAV you can access your Nextcloud shares on Linux, macOS and Windows in the same way as any remote network share, and stay synchronized.
Accessing files using Linux
You can access files in Linux operating systems using the following methods.
Nautilus file manager
When you configure your Nextcloud account in the GNOME Control Center, your files will automatically be mounted by Nautilus as a WebDAV share, unless you deselect file access.
You can also mount your Nextcloud files manually. Use the
davs:// protocol to connect the Nautilus file manager to your Nextcloud share:
davs://example.com/nextcloud/remote.php/dav/files/USERNAME/ #If your server connection is not HTTPS-secured, use dav:// instead of davs:// .
Creating WebDAV mounts on the Linux command line
You can create WebDAV mounts from the Linux command line. This is useful if you prefer to access Nextcloud the same way as any other remote filesystem mount. The following example shows how to create a personal mount and have it mounted automatically every time you log in to your Linux computer.
- Install the
davfs2WebDAV filesystem driver, which allows you to mount WebDAV shares just like any other remote filesystem. Use this command to install it on Debian/Ubuntu:apt-get install davfs2
- Use this command to install it on CentOS, Fedora, and openSUSE:yum install davfs2
- Add yourself to the
davfs2group:usermod -aG davfs2 <username>
- Then create a
nextclouddirectory in your home directory for the mountpoint, and
.davfs2/for your personal configuration file:mkdir ~/nextcloud mkdir ~/.davfs2
~/.davfs2:cp /etc/davfs2/secrets ~/.davfs2/secrets
- Set yourself as the owner and make the permissions read-write owner only:chown <linux_username>:<linux_username> ~/.davfs2/secrets chmod 600 ~/.davfs2/secrets
- Add your Nextcloud login credentials to the end of the
secretsfile, using your Nextcloud server URL and your Nextcloud username and password:https://example.com/nextcloud/remote.php/dav/files/USERNAME/ <username> <password> or $PathToMountPoint $USERNAME $PASSWORD for example /home/user/nextcloud john 1234
- Add the mount information to
/etc/fstab:https://example.com/nextcloud/remote.php/dav/files/USERNAME/ /home/<linux_username>/nextcloud davfs user,rw,auto 0 0
- Then test that it mounts and authenticates by running the following command. If you set it up correctly you won’t need root permissions:mount ~/nextcloud
- You should also be able to unmount it:umount ~/nextcloud
Now every time you login to your Linux system your Nextcloud share should automatically mount via WebDAV in your
~/nextcloud directory. If you prefer to mount it manually, change
Accessing files using Microsoft Windows
If you use the native Windows implementation, you can map Nextcloud to a new drive. Mapping to a drive enables you to browse files stored on a Nextcloud server the way you would files stored in a mapped network drive.
Using this feature requires network connectivity. If you want to store your files offline, use the Desktop Client to sync all files on your Nextcloud to one or more directories of your local hard drive.
Windows 10 now defaults to allow Basic Authentication if HTTPS is enabled prior to mapping your drive. On older versions of Windows, you must permit the use of Basic Authentication in the Windows Registry: launch „regedit“ and navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesWebClientParameters. Create or edit the DWORD value „BasicAuthLevel“ (Windows Vista, 7 and 8) or „UseBasicAuth“ (Windows XP and Windows Server 2003) and set its value data to 1 for SSL connections. Value 0 means that Basic Authentication is disabled, a value of 2 allows both SSL and non-SSL connections (not recommended). Then exit Registry Editor, and restart the computer.
Mapping drives with the command line
The following example shows how to map a drive using the command line. To map the drive:
- Open a command prompt in Windows.
- Enter the following line in the command prompt to map to the computer Z drive:net use Z: https://<drive_path>/remote.php/dav/files/USERNAME/ /user:youruser yourpassword
where <drive_path> is the URL to your Nextcloud server.
net use Z: https://example.com/nextcloud/remote.php/dav/files/USERNAME/ /user:youruser yourpasswordThe computer maps the files of your Nextcloud account to the drive letter Z.
Though not recommended, you can also mount the Nextcloud server using HTTP, leaving the connection unencrypted. If you plan to use HTTP connections on devices while in a public place, we strongly recommend using a VPN tunnel to provide the necessary security.
An alternative command syntax is:
net use Z: \\example.com@ssl\nextcloud\remote.php\dav /user:youruser yourpassword
Mapping drives with Windows Explorer
To map a drive using the Microsoft Windows Explorer:
- Migrate to your computer in Windows Explorer.
- Right-click on Computer entry and select Map network drive… from the drop-down menu.
- Choose a local network drive to which you want to map Nextcloud.
- Specify the address to your Nextcloud instance, followed by/remote.php/dav/files/USERNAME/.
For SSL protected servers, check Reconnect at logon to ensure that the mapping is persistent upon subsequent reboots. If you want to connect to the Nextcloud server as a different user, check Connect using different credentials.
- Click the
Windows Explorer maps the network drive, making your Nextcloud instance available.
Accessing public shares over WebDAV
Nextcloud provides the possibility to access public shares over WebDAV.
To access the public share, open:
in a WebDAV client, use the share token as username and the (optional) share password as password.
Settings → Administration → Sharing → Allow users on this server to send shares to other servers. This option also allows WebDAV access to public sharesneeds to be enabled in order to make this feature work.
Windows does not connect using HTTPS.
The Windows WebDAV Client might not support Server Name Indication (SNI) on encrypted connections. If you encounter an error mounting an SSL-encrypted Nextcloud instance, contact your provider about assigning a dedicated IP address for your SSL-based server.
The Windows WebDAV Client might not support TLSv1.1 / TLSv1.2 connections. If you have restricted your server config to only provide TLSv1.1 and above the connection to your server might fail. Please refer to the WinHTTP documentation for further information.
You receive the following error message: Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved.
Windows limits the maximum size a file transferred from or to a WebDAV share may have. You can increase the value FileSizeLimitInBytes inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters by clicking on Modify.
To increase the limit to the maximum value of 4GB, select Decimal, enter a value of 4294967295, and reboot Windows or restart the WebClient service.
Accessing your files from Microsoft Office via WebDAV fails.
Known problems and their solutions are documented in the KB2123563 article.
Cannot map Nextcloud as a WebDAV drive in Windows using self-signed certificate.
- Go to the your Nextcloud instance via your favorite Web browser.
- Click through until you get to the certificate error in the browser status line.
- View the cert, then from the Details tab, select Copy to File.
- Save to the desktop with an arbitrary name, for example
- Start, Run, MMC.
- File, Add/Remove Snap-In.
- Select Certificates, Click Add, My User Account, then Finish, then OK.
- Dig down to Trust Root Certification Authorities, Certificates.
- Right-Click Certificate, Select All Tasks, Import.
- Select the Save Cert from the Desktop.
- Select Place all Certificates in the following Store, Click Browse,
- Check the Box that says Show Physical Stores, Expand out Trusted Root Certification Authorities, and select Local Computer there, click OK, Complete the Import.
- Check the list to make sure it shows up. You will probably need to Refresh before you see it. Exit MMC.
- Open Browser, select Tools, Delete Browsing History.
- Select all but In Private Filtering Data, complete.
- Go to Internet Options, Content Tab, Clear SSL State.
- Close browser, then re-open and test.
You cannot download more than 50 MB or upload large Files when the upload takes longer than 30 minutes using Web Client in Windows 7.
Workarounds are documented in the KB2668751 article.