Elasticsearch for Cloudron

This package provides Elasticsearch for Cloudron, configured for internal use only. It is not exposed to the web and is intended to be used by other apps within your Cloudron instance.

Features

  • Elasticsearch 9.1.5
  • Single-node configuration optimized for Cloudron
  • Security enabled with basic authentication
  • Automatically installs the analysis-icu plugin (configurable)
  • Internal access only by default (not publicly exposed)
  • Automatic optimization based on container resources

Usage

After installation, Elasticsearch will be available at the following URLs:

  • HTTP API: http://IPADDRESS:9200 (from within other Cloudron apps)
  • Transport port: IPADDRESS:9300 (for Elasticsearch clients)

Authentication

Authentication credentials:

  • Username: elastic
  • Password: A secure random password is generated during installation

You can find the password in:

  1. The app logs after installation
  2. By accessing the app container
  3. The file at /app/data/credentials.txt

Connection from other Cloudron apps

To connect to Elasticsearch from another Cloudron app, use the following connection details:

Host: IPADDRESS
Port: 9200
Protocol: http
Username: elastic
Password: <password from credentials.txt>

Example connection using cURL:

curl -u elastic:<password> http://IPADDRESS:9200

Setting up Indices

Important: Before using Elasticsearch with apps like NextCloud, you need to create the necessary indices.

For NextCloud FullTextSearch:

# Replace with your actual Elasticsearch IP address and password
curl -X PUT "http://elastic:PASSWORD@IPADDRESS:9200/nextcloud" -H 'Content-Type: application/json' -d'
{
  "settings": {
    "index": {
      "number_of_shards": 1,
      "number_of_replicas": 0,
      "refresh_interval": "10s"
    }
  }
}
'

You can get the IP address from the Cloudron admin panel or by using the cloudron status command. The password is stored in /app/data/credentials.txt.

Language Analysis Plugins

Many integrations (for example, Nextcloud Full-Text Search with German documents) require the analysis-icu plugin so Elasticsearch understands language-specific analyzers. This package ships with analysis-icu preinstalled. You can verify it from the Elasticsearch web terminal:

curl -X GET -u elastic:<password> "localhost:9200/_nodes/plugins?pretty"

Look for analysis-icu in the output before running occ fulltextsearch:index. If you need additional plugins, rebuild this package with the desired plugin installed in the Docker image (Elasticsearch 9 no longer allows runtime plugin installation into read-only filesystems).

Security Notes

  • The app is configured as internal-only by default, so it's not exposed to the public internet
  • If you need external access, you can configure access restrictions in the Cloudron admin panel
  • HTTP SSL is disabled for compatibility with most client applications
  • Transport protocol is secured with internal certificates
  • Authentication is required for all operations
  • All data is stored in the app's data directory

Performance Configuration

The package automatically configures Elasticsearch based on the container's available resources:

  • Java heap size defaults to 50% of the app's memory allocation
  • GC optimization for container environments
  • Index settings tuned for single-node operation

You can override the automatic heap sizing when necessary:

  • Define ES_JAVA_HEAP (e.g. export ES_JAVA_HEAP=8g) in /app/data/.env
  • Provide a full ES_JAVA_OPTS string in /app/data/.env to take complete control
  • Add explicit -Xms/-Xmx entries in /app/data/config/jvm.options.d/heap.options
  • Set ES_SKIP_AUTO_HEAP=1 in /app/data/.env to rely solely on the configuration files

Limitations

  • This package is for internal use only and is not exposed to the web by default
  • It's configured as a single-node cluster for simplicity
  • Memory usage scales with container limits set in Cloudron

Support

For support, please create an issue on the package's GitHub repository or contact the package maintainer.

Description
No description provided
Readme MIT 230 KiB
Languages
Shell 92.1%
Dockerfile 7.9%