dotCMS requires an Elasticseach node or cluster to index and search the stored content, the file metadata and also in order to perform site wide searches. It is important to note that dotCMS does not automatically manage the Elasticsearch cluster - you must perform management functions yourself to ensure proper operation of the Elasticsearch infrastructure. That said, generally speaking, an elasticsearch cluster that is dedicated to dotCMS does not require much care or feeding aside from consuming memory and disk space and many dotCMS instances run happily for years against a single node ES installation or container given enough disk space.
To connect dotCMS to an elasticsearch cluster you should specify at least 3 environmental variables:
DOT_ES_ENDPOINTStakes a comma separated list of urls that it will connect and load balance search requests to. The property can look like this
or contain multiple entries, such as
DOT_ES_AUTH_BASIC_USERis the basic auth username that will be sent and used to perform search and indexing operations (defaults to
DOT_ES_AUTH_BASIC_PASSWORDis the basic auth password. Best practices are to use a secret store mechanism when providing these to your container.
Other, less well used options include
DOT_ES_AUTH_TYPE, which defaults to
BASICbut can also be set to
JWTJWT based authentication.
DOT_ES_AUTH_JWT_TOKENwhich can be used to pass the JWT auth token (again, use secrets).
In 2021 and at version 7.10, Elastic.co changed Elasticsearch's licensing from an Apache 2.0 (pure open source) license to a proprietary license that precludes other companies from offering a hosted/managed version of Elasticsearch software. This was aimed primarily at Amazon, who had been offering an AWS managed Elasticsearch service “OpenSearch” without paying any royalites to Elastic.co. After Elastic.co changed the Elasticsearch license, Amazon forked the original open source Elasticsearch project and created a competeing version of Elasticsearch software licensed under the Apache 2.0 that they have dubbed “OpenSearch” (https://opensearch.org/). Amazon now uses the Opensearch project in all their managed “Elasticsearch” offerings.
Due to the Elasticsearch licencing change, dotCMS has decided to standardize on Amazon's OpenSearch version of Elasticseach licensed under the Apache 2.0 license rather than Elastic.co's proprietary Elasticseach version. In doing this, dotCMS upgraded the Elasticsearch drivers in our software to the last open source version of Elasticsearch provided by Elastic.co, version
7.10.2. As of this writing, we believe dotCMS continues to be compatible with all known versions of Elasticsearch > 7.1.0 whether they are offered by Elastic.co or Amazon but test and support only Amazon's OpenSearch. Moving forward, dotCMS will continue to be compatiable with OpenSearch as the OpenSearch versions progress but cannot guarentee that we will maintain version compatiability with Elastic.co's Elasticsearch offerings if they choose to include breaking changes.