SonarQube, Fargate & AWS ElasticSearch

Hi, I’m running SonarQube 7.9 LTS Community. I am hosting it on AWS using Fargate, RDS and it’s working. I’d like to however switch from using the inbuilt SonarQube ElasticSearch to the AWS ElasticSearch.

Is this possible when using the Community Edition? I ask because essentially what I am trying to setup is pretty much the DataCenter edition as described here It states " Running SonarQube as a Cluster is only possible with a Data Center Edition ."

I am not really looking for high availability. It just isn’t good practice to run ElasticSearch within a Fargate container as the Elasticsearch indexes will be deleted whenever the container is replaced.

In addtion to the above the SonarQube doco states:
" By default, Elasticsearch data is stored in $SONARQUBE-HOME/data , but this is not recommended for production instances. Instead, you should store this data elsewhere, ideally in a dedicated volume with fast I/O. Beyond maintaining acceptable performance, doing so will also ease the upgrade of SonarQube." (

So yeah, I’d like to be able to use the AWS Elasticsearch, not the SonarQube integrated one. Is this possible?


Switching to an external Elasticsearch instance isn’t possible in any edition, not even the Data Center Edition.


The documentation here seems to clearly indicate otherwise Ann? Obviously this documentation is for DataCenter edition.


That documentation page is indeed for the Data Center Edition, which runs Elasticsearch inside SonarQube nodes.


Wow, wow… wow.

So what are the implications of running SonarQube (any edition) in a container setup where the ElasticSearch indexes are wiped anytime the container is refreshed?


It means that starting back up takes longer because ES has to reindex. Really, not what we recommend. This would be one reason you’d configure the ES indices to be stored somewhere else, as mentioned in the docs you cited in your OP.


Appreciate it’s not what SonarQube recommends, but aside from a slower startup there is no material impact? If so, this should work for us in the shorter term.

In the longer term and for a more permanent solution it means we can’t host this on Fargate as it doesn’t support persistent storage :frowning:

Sounds like someone in the community needs to implement external Elastic Search.
Looks like Data Center edition is already able to be configured to have a “Search Node” which talks to the “application nodes”.

Or possibly setting these options…


And then creating your own “search node”