Installing Kibana on Laravel Homestead

5th of September 2015

Kibana 4 is an analytics and visualization platform that builds on Elasticsearch to give you a better understanding of your data. Here we cover how to quickly and easily get Kibana up and running on your Laravel Homestead environment.

Kibana Screenshot

For ease of installation we can run the installation script using a single cli command via wget, just ssh into you Laravel Homestead VM and run the following command and the installation script will run.

sh -c "$(wget -O -)"

Wanna see what’s happening checkout the installation script in full below or checkout the gist.

#!/usr/bin/env bash

echo ">>> Installing Kibana"

# Set some variables
KIBANA_VERSION=4.1.1 # Check for latest version

sudo mkdir -p /opt/kibana
wget --quiet$KIBANA_VERSION-linux-x64.tar.gz
sudo tar xvf kibana-$KIBANA_VERSION-linux-x64.tar.gz -C /opt/kibana --strip-components=1
rm kibana-$KIBANA_VERSION-linux-x64.tar.gz

# Configure to start up Kibana automatically
cd /etc/init.d && sudo wget --quiet

sudo chmod +x /etc/init.d/kibana4
sudo update-rc.d kibana4 defaults 95 10
sudo service kibana4 start

Optional Port Configuration

By default once you’ve installed Kibana using the script above you should now have access to the Kibana UI from (the IP address may differ if you’re not using the default configuration for homestead)

Great so we’re up and running, however just to make it a little easier and accessible from http://localhost:5601. We can use the Laravel Homesteads configuration file to setup some custom port forwarding configurations.

$ homestead edit

Edit you’re homestead.yaml file and add the following port configuration, you can set the ‘to’ port to suit you’re own needs and preference.

     - send: 5601
       to: 5601

Restart Homestead to apply the new port settings, once you’re backup and running you’re ready to access the Kibana UI via http://localhost:5601.

And start exploring your data…