You can use a WebDAV client as an alternative to the native LabKey Server interfaces for accessing files on LabKey Server. WebDAV allows you to read, modify and delete files on the server. You can use either a 3rd party WebDAV client, such as Cyberduck, or, once properly configured, you can use Windows Explorer or OSX without installing any new software.
You can also enable a site-wide WebDAV root that provides a more user-friendly user interface: see Set File Roots
Example Setup for Cyberduck WebDAV Client
To set up Cyberduck to access a file repository on LabKey Server, follow these instructions:
- First, get the WebDAV URL for the target repository:
- On LabKey Server, go to the target file repository.
- Click the title of the Files web part.
- The URL used by WebDAV appears at the bottom of the screen.
- Alternatively, administrators can get the WebDAV URL directly from the Files web part as follows:
- Open the Upload Files panel, then click the (file upload help) icon.
- The File Upload Help dialog appears.
- The URL used by WebDAV appears in this dialog. Copy the URL to the clipboard.
- Set up Cyberduck (or another 3rd party WebDAV client).
- Click Open Connection (or equivalent in another client).
- Enter the URL and your username/password.
- Click Connect.
- You can now drag-and-drop clients into the file repository using the 3rd party WebDAV client.
Tested 3rd Party clients
- CyberDuck: GUI WebDAV client.
- WebDrive: Integrates with Explorer and allows you to mount the LabKey Server to a drive letter.
- NetDrive: Integrates with Explorer and allows you to mount the LabKey Server to a drive letter.
- cadaver: Command line tool. Similar to FTP
Native Windows WebDAV Client (WebDAV Redirector)
A WebDAV client called "WebDAV Redirector" is built into Windows 8 and Windows 10. Assuming your server is configured to use SSL, you can connect from Windows directly to a LabKey Server file repository. (I.e., any LabKey Server folder that has a Files web part.) Configuring the WebDAV Redirector to work over non-SSL connections is not recommended
To connect, you can use the Window Explorer to map a network drive to the file repository URL, using the URL shown below.
To connect using a Windows Command prompt, use "net use". For example:
net use Y: https://hosted.labkey.com/labkey/_webdav/myProject/myFolder/@files/ /USER:firstname.lastname@example.org * /PERSISTENT:YES
Explanation of the command above:
|Command line item||Description|
|Y:||The drive letter that will allow the client to copy multiple files to the LabKey Server using familiar Windows commands . It can’t be in use at the time; if it is, either choose a different drive letter or issue a net use Y: /D command first to disconnect the Y: drive.|
|https://hosted.labkey.com/labkey/_webdav/myProject/myFolder/@files/||The URL to the WebDAV root. Use double quotes if there are spaces in the URL. (To get this URL, see the screen shot above.)|
|_webdav||This component of the URL applies to all WebDAV connections into LabKey Server.|
|myProject||The LabKey Server project name.|
|myFolder||The folder name within the project - the location of the Files web part.|
|@files||The directory root for the file content. This folder is viewed by the Files web part in a LabKey Server folder. Files managed by the pipeline component appear under a root directory called @pipeline.|
|email@example.com||the same user email you would use to sign into LabKey Server from a browser.|
|*||Causes Windows to prompt for your LabKey password.|
|/PERSISTENT:YES||Causes Windows to remember the drive letter mapping between restarts of the system.|
Once you’ve mapped a drive letter to LabKey Server, you can use COPY, REN, XCOPY and other standard Windows command to move data files between the client and LabKey Server.
The mapped network drive feature is accessible in the Windows File Explorer There is a button for "Map Network Drive" above the files/folders list. ( On Windows 8, make sure the "This PC" node in the left panel Windows Explorer has selected the "This PC" node in the left hand pane. )
You can now use Windows Explorer to drag-and-drop files into the @files directory on the server.
Native OSX WebDAV Client
When using OSX, you do not need to install a 3rd party WebDAV client. You can mount a WebDAV share via the dialog at Go > Connect to Server
. Enter a URL of the form:
To have the URL generated for you, see the instructions above for Cyberduck.
- <username%40domain.com> - The email address you use to log in to your LabKey Server, with the @ symbol replaced with %40. Example: Use username%40labkey.com for firstname.lastname@example.org
- <www.sitename.org> - The URL of your LabKey Server. Example: www.mysite.org
- <projectname> - The name of the project you would like to access. If you need to force a login, this project should provide no guest access. Example: _secret
Linux WebDAV ClientsTested clients:
- Gnome Desktop: Nautilus file browser can mount a WebDAV share like an NFS share.
- KDE Desktop: Has drop down for mounting a WebDAV share like an NFS share.
- cadaver: Command line tool. Similar to FTP.