Installing Kibana from source


I have built Kibana 8.2.0 from source following these instructions. It has made a folder call build with 3 sub folders: default, Kibana, Kibana-docker.

I couldn't find documentation on how to install my build on Linux (Ubuntu 20.04LTS in my case).

  • Do I just copy the Kibana folder on the system?
  • If I mirror the Install Kibana with Debian package, it puts the config in /etc/kibana/kibana.yml, the Kibana in /usr/share/kibana, etc...
  • Other?

Once I've installed Kibana on Linux, how do I run it for my production? Furthermore, after getting the Kibana running, should I use systemd to configure Kibana to start automatically when the system reboots i.e.
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable kibana.service

thanks in adavnce for all the responses

These folders will have the "distributable" files, such as .tar.gz, .deb.

If you want to install the Linux Debian package that was built, you can do:
sudo dpkg -i kibana-8.2.0-[snapshot/archname].deb

See: Use Kibana in a production environment | Kibana Guide [8.2] | Elastic

If you install Kibana using the .deb distributable, then yes :slight_smile:

If you a different package manager, or no package manager, you'll have to find advice about installing / managing software using those distributable types. For example, if you want to use the .tar.gz file that was built, I think you will have to use the services manager of your choice by defining a custom service that knows where you unpacked the Kibana files.

Thanks for your reply @tsullivan! I will install it using dpkg -i. where Kibana will be running after the installation and I would just use systemd to start Kibana again, if the system reboots.

Following the instructions,

To specify a package to build you can add rpm or deb as an argument.

yarn build --deb
Distributable packages can be found in target/ after the build completes.

As directed, I ran yarn build --deb to produce the "distributable" package . When I went into the target folder, I did not find the .deb "distributable" package. I've looked around in the Kibana folder and even did a search for all .deb files on the system, but can not find any matching files.

Looking for guidance in creating this "distributable" package, as the documentation could be outdated.

Update: I've tried running the command yarn build --deb again and yarn build, but now getting an error. The following is a snippet of the ending output:

fpm --force -t deb --package /home/amphagory/github/source/kibana/target/NAME-8.2.3-SNAPSHOT-ARCH.TYPE -s dir --name kibana --description Explore and visualize your Elasticsearch data --version 8.2.3-SNAPSHOT --url --vendor Elasticsearch, Inc. --maintainer Kibana Team <> --license Elastic-License --after-install /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/package_scripts/ --before-install /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/package_scripts/ --before-remove /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/package_scripts/ --after-remove /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/package_scripts/ --rpm-posttrans /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/package_scripts/ --rpm-digest sha256 --config-files /etc/kibana/kibana.yml --template-value user=kibana --template-value group=kibana --template-value configDir=/etc/kibana --template-value pluginsDir=/usr/share/kibana/plugins --template-value dataDir=/var/lib/kibana --template-value logDir=/var/log/kibana --template-value pidDir=/run/kibana --template-value envFile=/etc/default/kibana --exclude usr/share/kibana/config --exclude usr/share/kibana/data --exclude usr/share/kibana/logs --exclude run/kibana/.gitempty --architecture amd64 --deb-priority optional /home/amphagory/github/source/kibana/build/default/kibana-8.2.3-SNAPSHOT-linux-x86_64/=/usr/share/kibana/ /home/amphagory/github/source/kibana/build/os_packages/config/kibana.yml=/etc/kibana/kibana.yml /home/amphagory/github/source/kibana/build/default/kibana-8.2.3-SNAPSHOT-linux-x86_64/config/=/etc/kibana/ /home/amphagory/github/source/kibana/build/default/kibana-8.2.3-SNAPSHOT-linux-x86_64/data/=/var/lib/kibana/ /home/amphagory/github/source/kibana/build/default/kibana-8.2.3-SNAPSHOT-linux-x86_64/logs/=/var/log/kibana/ /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/service_templates/systemd/=/ /home/amphagory/github/source/kibana/src/dev/build/tasks/os_packages/service_templates/env/kibana/=/etc/default/kibana
   │ERROR failure 0 sec
   │ERROR Error: Premature close
   │          at new NodeError (node:internal/errors:371:5)
   │          at Socket.onclose (node:internal/streams/end-of-stream:135:30)
   │          at Socket.emit (node:events:538:35)
   │          at Pipe.<anonymous> (node:net:687:12)

error Command failed with exit code 1.
info Visit for documentation about this command.

[quote="Amphagory, post:4, topic:306045"]
I've looked around in the Kibana folder and even did a search for all .deb files on the system, but can not find any matching files.

When the build is successful, the paths of all the files that are created/copied will be logged in the text that prints out as the build progresses. If you aren't able to see it, try copying all of the text from the terminal window into a text editor, and it will be easier to search through.

The fpm command will fail if you don't have fpm installed or it is not working on your system for some reason. Can you double-check you fulfilled the system dependency requirements from the instructions?

apt-get install ruby ruby-dev rpm dpkg build-essential
gem install fpm -v 1.5.0

1 Like

@tsullivan I'm almost there with all your help, thank you. I think my last question is how to produce a specific version?

I switch to branch 8.2 in the Kibana repo and when I do yarn build --deb --release it produces a file like kibana-8.2.3-[snapshot/archname].deb. Is there a way to specify the release version to say 8.2.2? I would like to match the version that my Elastic cloud service.

Thanks again~

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