How can I disable elasticsearch from boot auto start

Hi everyone I would like to know how to disable auto start elasticsearch i'm using ubuntu 18.04 and my elasticsearch is running on docker .. I should control my elasticsearch on docker manually not automatically whenever I try to boot or restart my server elasticsearch is up .

please help me thank you

Hi @Abdul_Rahuman

You can set the flag "--restart" for a container, the docker documentation reference is here.

Hope this helps.

so how can I disable it ? I don't need auto start elasticsearch container

Hi @Abdul_Rahuman

Please read the description of the options. I recommend to use the flag "no" when creating the container, so that the container never restarts. How do you create the container now? Can you please post the command?

docker run --name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
–v /opt/esdata:/usr/share/elasticsearch/data \
-e xpack.security.enabled="false" \
--restart always \
-d docker.elastic.co/elasticsearch/elasticsearch:5.6.8

I created this way long ago and my ES container is running up to now but I would like to disable auto start after the installation like this is there any method

Hi

You have the flag --restart set in your command. It has the value always, so it always restarts. You can use the docker update command to remove the restart flag. Take a look at the examples section there for using the correct syntax.

Hope this helps.

thanks this solved my prooblem:smiling_face_with_three_hearts:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.