Portainer Templates logo

Portainer Templates

Elasticsearch Elasticsearch

Container

Database

Open-source search and analytics engine

Image details

Pulls: 981.1M
Architecture: amd64, arm64/v8
Image size: 853 MB
Latest: 9.5.3
User: stackbrew
Created: Feb 06, 2015
Updated: 11 hours ago
Status: active

Configuration

Type
Container
Platform
linux
Image
elasticsearch:9.5.3
Ports
9200/tcp9300/tcp
Volumes
/usr/share/elasticsearch/data
Env vars
discovery.type=single-nodexpack.security.enabled=false
Restart
unless-stopped

Notes

Elasticsearch publishes no rolling latest tag, so this template pins a specific version. discovery.type and xpack.security.enabled are set so a single-node container starts and stays reachable without TLS setup.

Standalone Install

Select an install method, to see config/commands for deploying Elasticsearch

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Elasticsearch, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

More install options in our documentation.

Quick reference

  • Maintained by:
[the Elastic Team](https://github.com/elastic/elasticsearch)
  • Where to get help:
the [Elasticsearch Discuss Forums](https://discuss.elastic.co/c/elasticsearch), the [Elastic community](https://www.elastic.co/community)

Supported tags and respective Dockerfile links



Quick reference (cont.)

  • Where to file issues:
For issues with Elasticsearch Docker Image or Elasticsearch: https://github.com/elastic/elasticsearch/issues
[`amd64`](https://hub.docker.com/r/amd64/elasticsearch/), [`arm64v8`](https://hub.docker.com/r/arm64v8/elasticsearch/)
  • Published image artifact details:
[repo-info repo's `repos/elasticsearch/` directory](https://github.com/docker-library/repo-info/blob/master/repos/elasticsearch) ([history](https://github.com/docker-library/repo-info/commits/master/repos/elasticsearch))  
(image metadata, transfer size, etc)
  • Image updates:
[official-images repo's `library/elasticsearch` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Felasticsearch)  
[official-images repo's `library/elasticsearch` file](https://github.com/docker-library/official-images/blob/master/library/elasticsearch) ([history](https://github.com/docker-library/official-images/commits/master/library/elasticsearch))
  • Source of this description:
[docs repo's `elasticsearch/` directory](https://github.com/docker-library/docs/tree/master/elasticsearch) ([history](https://github.com/docker-library/docs/commits/master/elasticsearch))

What is Elasticsearch?

Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.
For more information about Elasticsearch, please visit www.elastic.co/products/elasticsearch

logo

About This Image

This default distribution is governed by the Elastic License, and includes the full set of free features.
View the detailed release notes here.
Not the version you're looking for? View all supported past releases.

How to use this image

Note: Pulling an images requires using a specific version number tag. The latest tag is not supported.
For Elasticsearch versions prior to 6.4.0 a full list of images, tags, and documentation can be found at docker.elastic.co.
For full Elasticsearch documentation see here.
The commands below are intended for deploying in a development context only. For production installation and configuration, see Install Elasticsearch with Docker.

Running in Development Mode

Create user defined network (useful for connecting to other services attached to the same network (e.g. Kibana)):
$ docker network create somenetwork

Run Elasticsearch:
$ docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:tag

Running in Production Mode

See Install Elasticsearch with Docker

License

View license information for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Some additional license information which was able to be auto-detected might be found in the repo-info repository's elasticsearch/ directory.
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Serve Elasticsearch on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying elasticsearch.example.com to http://elasticsearch:9200

Add this to your Caddyfile

elasticsearch.example.com {
	reverse_proxy http://elasticsearch:9200
}

Known issue

This template is currently marked as broken, so it may not deploy or run as expected (last reviewed Sep 23, 2026).

  • No source has a working image. Portainer's copy pins 7.15.1 from 2021, and every other copy uses the elasticsearch:latest tag, which upstream does not publish. Elasticsearch ships no rolling tag at all, so a version has to be pinned and bumped by hand. Maintained in sources/local/development_templates.json.
  • Until it's fixed, one of the similar apps below may work as an alternative.

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs elasticsearch
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Published on a random port

This template exposes 9200/tcp without setting a host port, so Docker picks a random free one on every deploy.

  • Find it in the Ports column of Portainer's container list, or with docker port elasticsearch

Image won't pull

Test the pull directly on the host: docker pull elasticsearch:9.5.3

  • "manifest unknown" means the tag no longer exists.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64/v8
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect elasticsearch --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

  • Bug within the app: Open an issue within elasticsearch's repo
  • Template not working: Open an issue within the template's repo
  • This website not working: Open an issue on lissy93/portainer-templates

A single container

Elasticsearch runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.

The app image

An image is the app packed up ready to go, everything Elasticsearch needs bundled into one download. This template pulls elasticsearch:9.5.3, which Docker fetches once (about 853 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Elasticsearch's comes from Docker Hub as one of its official, curated images.

Version tags

The bit after the colon in the image name is the version tag. This one pins 9.5.3, so every redeploy gives you that exact build until you bump it yourself.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64/v8, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. Here the app exposes a port but leaves the host side blank, so Docker picks a free one for you. It opens:

  • 9200, published on a random host port
  • 9300, published on a random host port

Volumes

A volume is where Elasticsearch keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /usr/share/elasticsearch/data as a volume Docker manages for you

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Elasticsearch takes 2 of them, all with defaults you can leave alone or tweak:

  • discovery.type, defaults to single-node
  • xpack.security.enabled, defaults to false. Disable X-Pack security

Restart policy

The restart policy here is unless-stopped, so Docker restarts Elasticsearch after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Nothing custom is set, so Elasticsearch sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container elasticsearch. That's what you'll spot in the containers list and use in commands like docker logs elasticsearch.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Elasticsearch up. Add the template list to Portainer once, then deploying Elasticsearch is a click rather than a wall of config.