Skip to content

Instantly share code, notes, and snippets.

@benjja
Last active September 25, 2023 20:29
Show Gist options
  • Select an option

  • Save benjja/183c1e59aefae48ffa336b981a43e5b8 to your computer and use it in GitHub Desktop.

Select an option

Save benjja/183c1e59aefae48ffa336b981a43e5b8 to your computer and use it in GitHub Desktop.
Opensearch single node config snippets for mastodon
#If Mastodon display errors, this is likely due to a wrong number of replicas. You can fix this with the following commands:
#In case of an index with a yellow status, proceed with the second command
curl -XGET "http://localhost:9200/_cat/indices"
#replace <index> with the name of the index with a yellow status
curl -X PUT "localhost:9200/<index>/_settings?pretty" -H 'Content-Type: application/json' -d'
{
"index" : {
"number_of_replicas" : 0
}
}
################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms4g
## -Xmx4g
##
## See https://opensearch.org/docs/opensearch/install/important-settings/
## for more information
##
################################################################
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms256m
-Xmx256m
# Unless you have already configured a cluster, you should set
# discovery.type to single-node, or the bootstrap checks will
# fail when you try to start the service.
discovery.type: single-node
# If you previously disabled the security plugin in opensearch.yml,
# be sure to re-enable it. Otherwise you can skip this setting.
plugins.security.disabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment