# Mint Linux Service (running Elasticsearch as a service on Mint Linux)

**URL:** https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169
**Category:** Elasticsearch
**Created:** [March 11, 2016, 2:38pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169 "2016-03-11T14:38:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mithel](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@Mithel](https://discuss.elastic.co/u/Mithel)
#### Post date: [March 11, 2016, 2:38pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169/1 "2016-03-11T14:38:33Z")

</div>

Could someone help me get Elasticsearch set up as a service on Mint Linux?

Running Elasticsearch on Windows is no problem, running Elasticsearch manually  
on Mint is no problem. But I need help combining two tidbits of  
knowledge:

1. Configuring something to run as a service on Mint.
2. Anything specific to running Elasticsearch as a service on Linux

I downloaded the Elasticsearch tar.gz and easily uncompressed it and  
configured it to run. So Elasticsearch runs on Mint no problem.

Next I set up the repository and pulled the Elasticsearch Debian package and  
installed it (sudo apt-get install elasticsearch), I edited the configuration file for basic setup like normal. Then I used [Preferences]"Startup Applications" and created what I assume is a "service" executing "/usr/share/elasticsearch/bin/elasticsearch - however it doesn't appear to run (and I lack Linux skills to debug the problem).

I'm a bit confused on how "Startup Applications" works as there is no facility to specify which user the program is running as. I can't find anything related to elastic in syslog. Elasticsearch itself is not generating any (new) log so that is consistent with it not actually running.

Mint 17.3 Cinnamon  
Elasticsearch 2.2.0

---

<div class="post-metadata">

### Author: ![vad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vad/32/3901_2.png) [@vad](https://discuss.elastic.co/u/vad)
#### Post date: [March 11, 2016, 3:12pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169/2 "2016-03-11T15:12:23Z")

</div>

"Startup Applications" are applications started after the UI is loaded to start GUI applications. It's better to use "low level" standard linux tools to start services like ElasticSearch. There are 3 of them at the moment: the old sysvinit, upstart and systemd.

I've never used Linux Mint, but apparently it's using Upstart (and sysvinit, but don't use it). You can easily find docs and tutorials about upstart. This is my upstart conf (in /etc/init/elasticsearch.conf):

```
exec /elasticsearch/bin/elasticsearch
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
limit nofile 524288 1048576
limit nproc 524288 1048576
respawn

```

Change the path to the ES bin.

Regards.

---

<div class="post-metadata">

### Author: ![Mithel](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@Mithel](https://discuss.elastic.co/u/Mithel)
#### Post date: [March 11, 2016, 4:00pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169/3 "2016-03-11T16:00:43Z")

</div>

Thanks vad.

The current Elastic documentation says: "Users running Debian 8 or Ubuntu 14 or later may require configuration of systemd instead of update-rc.d. In those cases, please refer to the the section called “Using systemdedit” section."

That calls for running: "sudo /bin/systemctl enable elasticsearch.service" which on Mint responds with "sudo: /bin/systemctl: command not found.

I'll try to research "upstart" that's all "Greek" to me at the moment.

---

<div class="post-metadata">

### Author: ![vad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vad/32/3901_2.png) [@vad](https://discuss.elastic.co/u/vad)
#### Post date: [March 11, 2016, 4:23pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169/4 "2016-03-11T16:23:56Z")

</div>

Well, you can just create that file and then start it with

```
service elasticsearch start

```

When you reboot, it will start automatically.

---

<div class="post-metadata">

### Author: ![Mithel](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@Mithel](https://discuss.elastic.co/u/Mithel)
#### Post date: [March 11, 2016, 4:29pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169/5 "2016-03-11T16:29:03Z")

</div>

Thanks again vad.

I also found some excellent documentation for accomplishing this:

> **[How To Install Elasticsearch, Logstash, and Kibana (ELK Stack) on Ubuntu 14.04 |...](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04)**
>
> In this tutorial, we will go over the installation of the Elasticsearch ELK Stack on Ubuntu 14.04—that is, Elasticsearch 2.2.x, Logstash 2.2.x, and Kibana 4.4.x. We will also show you how to configure it to gather and visualize the syslogs of your...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 11:09pm UTC](https://discuss.elastic.co/t/mint-linux-service-running-elasticsearch-as-a-service-on-mint-linux/44169/6 "2017-07-05T23:09:06Z")

</div>


