97 lines
2.9 KiB
Markdown
97 lines
2.9 KiB
Markdown
# 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 8.17.3
|
|
- Single-node configuration optimized for Cloudron
|
|
- Security enabled with basic authentication
|
|
- 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:
|
|
|
|
```bash
|
|
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:
|
|
|
|
```bash
|
|
# 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`.
|
|
|
|
## 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 is set to 50% of available memory
|
|
- GC optimization for container environments
|
|
- Index settings tuned for single-node operation
|
|
|
|
## 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. |