Only verified on Kibana 7.9.2 running in Debian 10
Hello,
For all users who, like me, need to customize the logos in Kibana, I share this guide that I have been creating myself as I have been able to solve each problem.
This is only a hack workaround. I hope that one day it will be available and be able to use the official solution in which the Kibana development team is working.
Thanks to all the Elastic Team Members and other users who supported and helped me.
If I find the way to do more custom changes to the UI, I will update the post.
So far:
- Favicon and text
- Loading logo and text
- Login Logo and text
- Navbar logo (top left logo)
*Note: After apply any of the following changes, always do:
- Restart Kibana
- Clean browser cache and local data (at least for your Kibana site)
- Reload the page
Favicons
-
Go to the folder where the favicons are to see the sizes of each favicon that Kibana serves.
/usr/share/kibana/src/core/server/core_app/assets/favicons/
-
Take your personal logo and create a version that matches the size of each of the files within the Kibana favicons folder.
-
Replace each file with the custom logo. Keep the original names of the files to be replaced.
Browser tab title
-
Open file
$ sudo nano /usr/share/kibana/src/core/server/rendering/views/template.js
-
Look for the code line that generates the title "
Elastic
" and change that to your custom text
/*#__PURE__*/_react.default.createElement("title", null, "Elastic"),
Result:
/*#__PURE__*/_react.default.createElement("title", null, "Custom_Text"),
Loading logo and text
-
Open file
$ sudo nano /usr/share/kibana/src/core/server/rendering/views/template.js
-
Look for code string:
const logo = _react.default.createElement("svg", {…
-
Replace this with a
base64
orSVG
version of your custom logo. I used abase64
image.Result:
const logo = _react.default.createElement("img", {src:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqkAAAK … 5CYII=',width:'100px'});
-
Locate code block and replace message
}, i18n('core.ui.welcomeMessage', {
defaultMessage: 'Loading Elastic'Result:
}, i18n('core.ui.welcomeMessage', {
defaultMessage: 'Loading custom_text'
Login logo and text
-
Open file
$ sudo nano /usr/share/kibana/x-pack/plugins/security/target/public/4.plugin.js
-
Search for the welcome text and replace it with your own
{id:"xpack.security.loginPage.welcomeTitle",defaultMessage:"Welcome to Elastic"}
Result:
{id:"xpack.security.loginPage.welcomeTitle",defaultMessage:"Welcome to custom_text"}
-
Search for the Login logo image and replace it with your own
className:"loginWelcome__logo"},
…{type:"logoElastic",size:"xxl"}
Optional: If you want to use a logo bigger than 40x40px Remove the elastic-frame object that encloses the
logoElastic
object from the code, so you can use a custom logo and set a custom size.
,external_kbnSharedDeps_React_default.a.createElement("span",{className:"loginWelcome__logo"},
And also remove the last parenthesis behind the
logoElastic
object
… {type:"logoElastic",size:"xxl"})),…
Result:
,external_kbnSharedDeps_React_default.a.createElement(external_kbnSharedDeps_ElasticEui_["EuiSpacer"],{size:"xxl"}),external_kbnSharedDeps_React_default.a.createElement(external_kbnSharedDeps_ElasticEui_["EuiIcon"],{type:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg … JevgsIAAAAASUVORK5CYII=",size:"original”}),
-
Save changes to JavaScript file and generate the compressed files. Then restart Kibana.
$ npx gzip-cli /usr/share/kibana/x-pack/plugins/security/target/public/4.plugin.js -e=gz -e=br
$ sudo systemctl restart kibana
Navbar logo (top left logo)
-
Open file
$ sudo nano /usr/share/kibana/src/core/target/public/core.entry.js
-
Locate string and replace with own
base64
orSVG
image
"EuiHeaderLogo"],{"data-test-subj":"logo”,iconType:"logoElastic"
Result:
EuiHeaderLogo"],{"data-test-subj":"logo”, iconType:"data:image/png;base64,iVBORw0
…SUVORK5CYII="
-
Save changes to JavaScript file and generate the compressed files. Then restart Kibana.
$ npx gzip-cli /usr/share/kibana/src/core/target/public/core.entry.js -e=gz -e=br
$ sudo systemctl restart kibana