Documentation

Google Cloud Storage

Available for 7.4+

Liferay DXP provides integration with Google’s Cloud Storage (GCS) service. With GCS integration, you can seamlessly store and access your Liferay instance files in the cloud.

Before enabling this connection, you must first prepare your GCS account. When ready, configure the Liferay instance to use GCS via the Control Panel, and set the dl.store.impl portal property to use GCS as the default store.

Important

If a database transaction rollback occurs in a Document Library, the transaction’s file system changes are not reversed. Inconsistencies between Document Library files and those in the file system store can occur and may require manual synchronization. This is a limitation of all DXP stores besides DBStore.

GCS Prerequisites

Enabling Liferay’s GCS integration requires an active GCS account and project. This project must have a storage bucket and a service account to enable server-to-server, app-level authentication. You must also create a JSON security key for the service account. See official Google Cloud Storage documentation for more information.

Important

The service account’s security key must use the JSON key type.

Configuring the GCS Store in Liferay

Follow these steps to configure the GCS Store:

  1. Open the Global Menu (Global Menu), click on the Control Panel tab, and go to ConfigurationSystem Settings.

  2. Click on File Storage.

    Click on File Storage under System Settings.

  3. Click on GCS Store Configuration.

  4. (Required) Enter the following information.

    • Service Account Key: the private JSON key used to securely access the GCS project’s service account.

    • Bucket Name: the name of the GCS bucket used to store files.

    Enter a Service Account Key and Bucket Name.

  5. (Optional) Configure Liferay call attempts to GCS.

    Configure Liferay call attempts to GCS.

  6. (Optional) Enter an AES-256 encryption Key for an extra layer of security.

    Enter an AES-256 encryption Key.

  7. Click Save when finished.

Once you’ve configured the GCS Store, you can set GCS as your default file storage system.

Setting GCS as Default Store

Follow these steps to use GCS as the default Store for the Liferay instance:

  1. Add the following property to the instance’s portal-ext.properties file:

    dl.store.impl=com.liferay.portal.store.gcs.GCSStore
    

    If a portal-ext.properties file doesn’t exist, create a new one with the above value and add it to the instance’s [LIFERAY_HOME] or [USER_HOME] folder.

    This overrides the default value for dl.store.impl in the portal.properties file.

  2. Restart the Liferay server.