Skip to content

Instantly share code, notes, and snippets.

@jverweijL
Last active November 1, 2021 14:30
Show Gist options
  • Save jverweijL/dd9a68f41600f13cc76f82c9cf048834 to your computer and use it in GitHub Desktop.
Save jverweijL/dd9a68f41600f13cc76f82c9cf048834 to your computer and use it in GitHub Desktop.
Using S3 repo with Liferay DXP (7.0)

Enable S3 repository storage

This gist is based on Liferay DXP (7.0) with Tomcat

  1. Create system-ext.properties in /WEB-INF/classes

  2. Add org.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser to system-ext.properties

  3. Create com.liferay.portal.store.s3.configuration.S3StoreConfiguration.cfg in osgi/configs

    accessKey=
    secretKey=
    s3Region=eu-central-1
    bucketName=your-bucket-repo

    # Amazon S3 offers several storage classes
    # http://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html

    s3StorageClass=STANDARD
    httpClientMaxConnections=50
    cacheDirCleanUpExpunge=7
    cacheDirCleanUpFrequency=100

  4. In portal-ext.properties add dl.store.impl=com.liferay.portal.store.s3.S3Store

  5. Restart tomcat

@jverweijL
Copy link
Author

CE or DXP?

@prajudarekar
Copy link

prajudarekar commented Nov 1, 2021 via email

@jverweijL
Copy link
Author

With DXP you should be able to find some information here: https://help.liferay.com/hc/en-us/articles/360061217591-Support-between-Amazon-S3-and-Liferay.
Otherwise I suggest you contact Liferay support to help you out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment