
Self-hosting Elasticsearch the easy way
Yulei ChenElasticsearch is the most popular open-source search and analytics engine. It powers full-text search, log analytics, and real-time data exploration for thousands of companies. Elastic Cloud is convenient, but pricing starts at $95/month and scales up quickly with data volume.
Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get Elasticsearch up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.
Prerequisites
Before deploying, ensure you have a Sliplane account (free trial available).
Quick start
Sliplane provides one-click deployment with presets.
- Click the deploy button above
- Select a project
- Select a server (If you just signed up you get a 48-hour free trial server)
- Click Deploy!
About the preset
The one-click deploy above uses Sliplane's Elasticsearch preset. The preset is built for a clean, production-ready single-node setup:
- Wolfi-based image (
elasticsearch-wolfi) for a smaller footprint and better security - Specific version tag (
8.19.0) for stability - Single-node discovery mode, ideal for self-hosted use cases
- Security disabled by default for easy initial access
- JVM heap set to 512 MB (suitable for the 2 GB base server)
- Persistent storage mounted to
/usr/share/elasticsearch/data
Next steps
Once Elasticsearch is running on Sliplane, access it using the domain Sliplane provided (e.g. elasticsearch-xxxx.sliplane.app).
You can verify it's working by visiting the root URL in your browser. You should see a JSON response with the cluster name, version, and the tagline "You Know, for Search".
Enabling security
The preset ships with security disabled so the healthcheck and initial setup are straightforward. To enable authentication:
- Go to your service settings on Sliplane
- Add or update these environment variables:
xpack.security.enabled=trueELASTIC_PASSWORD= your chosen password
- Redeploy the service
After enabling security, use elastic as the username and your chosen password to authenticate. All API requests will require authentication, including from connected services.
Connecting from other services
If you have another service on the same Sliplane server (e.g. a backend API or Grafana), you can connect to Elasticsearch using the internal service name as the host. The default port is 9200.
Tuning JVM memory
The preset sets the JVM heap to 512 MB via ES_JAVA_OPTS. If you upgrade to a larger server, you can increase this. A common rule of thumb is to set the heap to about half of available RAM, but never more than ~26 GB. For example, on a 4 GB server:
| Setting | Value |
|---|---|
ES_JAVA_OPTS | -Xms1g -Xmx1g |
Logging
Elasticsearch logs to STDOUT by default, which works well with Sliplane's built-in log viewer. For general Docker log tips, check out our post on how to use Docker logs.
Cost comparison
You can also self-host Elasticsearch with other cloud providers. Here is a pricing comparison for the most common ones:
| Provider | vCPU | RAM | Disk | Monthly Cost | Note |
|---|---|---|---|---|---|
| Sliplane | 2 | 2 GB | 40 GB | €9 (~$10.65) | Flat rate, 1 TB bandwidth, SSL included |
| Fly.io | 2 | 2 GB | 40 GB | ~$18 | Disk and bandwidth billed separately |
| Render | 1 | 2 GB | 40 GB | ~$35 | 100 GB bandwidth, Disk billed separately |
| Railway | 2 | 2 GB | 40 GB | ~$67 + $20 plan | Pro plan floor, usage-based, bandwidth billed separately |
Click here to see how these numbers were calculated.
(Assuming an always-on instance running 730 hrs/month)
- Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
- Fly.io:
shared-cpu-2x2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU). - Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
- Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.
Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.
FAQ
What is Elasticsearch used for?
Elasticsearch is a distributed search and analytics engine. Common use cases include full-text search for websites and apps, log and event data analysis (often paired with Kibana), application performance monitoring, and real-time analytics. It's the "E" in the ELK stack (Elasticsearch, Logstash, Kibana).
How do I configure Elasticsearch in Docker?
Elasticsearch in Docker is configured through environment variables. The most important ones are discovery.type (set to single-node for standalone use), ES_JAVA_OPTS (JVM heap size), and the xpack.* settings for security and features. You can find the full list in the Elasticsearch Docker documentation.
How do I update Elasticsearch?
Change the image tag in your service settings on Sliplane and redeploy. Check the Elasticsearch Docker image tags for the latest stable version. Always review the release notes before upgrading, especially for major version changes.
Are there alternatives to Elasticsearch?
Yes, popular alternatives include Qdrant (vector search for AI applications), Typesense (developer-friendly search engine), Meilisearch (lightweight instant search), and Apache Solr (mature full-text search). The best choice depends on your use case - Elasticsearch excels at log analytics and complex queries, while newer tools may be simpler for basic search.
How do I connect Kibana to Elasticsearch on Sliplane?
Deploy Kibana as a separate service on the same Sliplane server. Set the ELASTICSEARCH_HOSTS environment variable to point to your Elasticsearch service using the internal service name (e.g. http://elasticsearch-xxxx:9200). If you've enabled security on Elasticsearch, also set ELASTICSEARCH_USERNAME to elastic and ELASTICSEARCH_PASSWORD to your password.