Kibana4 to listen on Port 80 instead of Port 5601 Kibana4 to listen on Port 80 instead of Port 5601 elasticsearch elasticsearch

Kibana4 to listen on Port 80 instead of Port 5601


Edit file {kibana-directory}/config/kibana.yml. Find this line:

port: 5601

and change it to:

port: 80


You need to set capabilities CAP_NET_BIND_SERVICE to bind non root process to a privileged port (<1024)

to make kibana listen on port 80 :

1- edit kibana port in /etc/kibana/kibana.yml

server.port : "80"

2- run the following commands :

sudo setcap cap_net_bind_service=+epi /usr/share/kibana/bin/kibanasudo setcap cap_net_bind_service=+epi /usr/share/kibana/bin/kibana-pluginsudo setcap cap_net_bind_service=+epi /usr/share/kibana/bin/kibana-keystoresudo setcap cap_net_bind_service=+epi /usr/share/kibana/node/bin/node


Setting the port 80 in config file will trigger the following errorkibana[11777]: FATAL Error: listen EACCES: permission denied 0.0.0.0:80due to the fact that kibana service by default executes under the user kibana

You can change the user to root, but this will trigger the following warningkibana[11639]: Kibana should not be run as root. Use --allow-root to continue.

So running kibana service under root user is something not recommended. Better make a port forwarding rule, or a HTTP redirect if you have a web server.