Accessing Documents with WebDAV

You can access the Document Library from your desktop file manager via WebDAV. WebDAV is a protocol based on HTTP for managing files stored on web servers. WebDAV is supported by most major operating systems and desktop environments, including Linux, macOS, and Windows.

To access the Document Library folder from a file browser, you must use your log-in credentials and the WebDAV URL of the folder you want to access.

Generating WebDAV Password

Liferay DXP 2023.Q4+/Portal GA98+

In the latest Liferay versions, you must generate a WebDAV password from your account settings to use in your WebDAV client. This is to avoid storing weak hashes used in digest authentication by WebDAV. Digest authentication is insecure and deprecated in Liferay. When trying to access a document through WebDAV for the first time, you’re prompted to generate a WebDAV password.

You must generate a WebDAV password before using it for the first time.

To generate a WebDAV password,

  1. Click on the user-icon from your site’s home page and select Account Settings.

  2. Select Password from the left-menu.

  3. Scroll down to the WEBDAV PASSWORD section and click Generate WebDAV Password.

    Generate a WebDAV password to use with your client.

    This displays your WebDAV username and an auto-generated password. This is a read-only field, so you must copy it for future use. If you click the button to generate the WebDAV password again, it generates a new one, rendering the existing one useless.

Now, follow the instructions below and use the WebDAV username and password when prompted.

Using the WebDAV Client to Access Documents

  1. Open the Documents and Media application in the desired Site or Asset Library.

  2. Click Actions for the desired folder (Actions Button) and select Access from Desktop.

    Select Access from Desktop to get the folder's WebDAV URL.

  3. Copy the folder’s unique WebDAV URL.

    Copy the folder's WebDAV URL.

  4. Follow the instructions for your operating system.

    • Windows: Map a network drive to the WebDAV URL. Enter your credentials when prompted. Once authenticated, the Document Library folder appears as a network drive.

    • macOS: Open Finder and select GoConnect to Server. In the Server Address field, enter the WebDAV URL of the folder you want to access, then click Connect and enter your credentials when prompted.

    • Linux: For Linux, you must slightly modify the folder’s WebDAV URL. For KDE Dolphin, change the URL’s protocol to webdav:// instead of http://. For GNOME Files, change the URL’s protocol to dav:// instead of http://. Paste the modified URL in your file manager, press Enter, and enter your credentials when prompted.

Once set up, you can use your operating system’s file browser to add, edit, and delete files in the connected Documents and Media folder. If you edit a file in this folder on your file system, all changes appear in Liferay and the file’s minor version is incremented.

Hosting Static Sites with WebDAV

Liferay DXP 2025.Q1+

Most file types are downloaded automatically when accessed by their WebDav URL, but HTML files are rendered for viewing. WebDAV also automatically integrates CSS, JS, and image files referenced in the HTML. This way, you can quickly host a static site using Documents and Media files.

  1. In the Documents and Media application, create a folder for all of the required files.

  2. Upload an .html file for each page in the static site and choose one to be the home page (named index.html).

  3. Upload all .css, .js, and image files referenced by the .html files. When WebDAV renders the HTML into the browser, all of these files are also integrated and applied to the site pages.

  4. Open the home page’s HTML file (index.html) in Documents and Media by clicking on its name.

  5. Click Info (Info Button).

  6. Copy the WebDAV URL.

    Copy the WebDAV URL of the file

  7. On a new tab, paste the URL to view the home page. WebDAV requests users’ credentials to access the site.

The WebDAV URL is primarily for managing the site’s files and viewing it while authenticated. Since it requires authentication, it cannot be used for unauthenticated public access. For guest-accessible static sites hosted in documents and media files, you must use the standard Documents and Media URL. In this case, as long as the folder and files are viewable by guest users, they can see the rendered document content at the generated URL. However, you must edit all links to other files (CSS, JS, and images) in the HTML.