Make Kibana 4 remain running after disconnecting SSH session

Jochen van Wylick picture Jochen van Wylick · Feb 24, 2015 · Viewed 9.4k times · Source

I've installed ElasticSearch and Kibana edge versions on a Ubuntu Linux 14 box. So that's Kibana 4 on ElasticSearch 1.4.4.

Runs and works like a charm through: ./bin/kibana

However, as soon as I disconnect my Putty session, Kibana stops working. ElasticSearch keeps listening on port 9200, but Kibana cannot be reached at 5601 anymore.

Difference seems to be that Kibana runs in the 'foreground' - since as soon as you run it - you see log messages flying by all the time. Using -q will make it quiet indeed - but not run in the background.

So I read somewhere that running it in the background might work: ./bin/kibana &. It doesn't. Neither does CTRL-Z and then bg work.

So maybe, the reason is that I run Kibana under the logged in user and when I log out, it kills all processes of that user. So I tried sudo adduser kibanarunner and sudo -u kibanarunner ./bin/kibana but that didn't do the trick either.

I want Kibana to stay up-and-running after I stop my SSH session - how can I do this?

Answer

Louis-Philippe Huberdeau picture Louis-Philippe Huberdeau · Feb 24, 2015

You can detach the process from your session.

./bin/kibana &
disown