How to Customize Grafana interface

I want to change the logo, background color, page title, favicon… in Grafana, but I don’t know how to do it. I have changed one of the .scss files and then ran npm run command, but I did not see any change in Grafana.
I also see that [How to Customize Your Grafana Theme | www.neteye-blog.com] recommends editing the _variables.dark.scss file, however I cannot see where this is located, as it is not in the public/sass directory as the post suggests.
Finally, I also see that _variables.dark.generated.scss tells you to Edit grafana-ui/src/themes/_variables.dark.scss.tmpl.ts to update template , however I cannot find that file either.
please help me

2 Likes

Hi @zahrazare313 welcome to the community forum.

I think the easy and more better way to customize the dashboard color, css etc is via using Boom plugin.

This is a community plugin which means you can also check their github page for more info

Hope this answer your question ! :slight_smile:

1 Like

hi @usman.ahmad Thank you for your reply, You are right, but I want to change the login page as well, the boom theme panel is only for making changes on the dashboard

To customize the login page such as changing logo, favicon, background etc. is possible via configuration but only supported and provided for the Grafana Enterprise or Cloud version.

For the Grafana OSS there is no official guide as users are themselves responsible to change it by any method they like as it may get break in the next update release.

You can have a look at this post where other users asked same question and provided good instructions and links as how it can be done.

I hope it helps.

1 Like

@usmanahmad if I build Grafana from source, I can customize it. After reading several articles, I found the following link, but this web page not found.
[https://grafana.com/docs/grafana/latest/project/building_from_source]

2 Likes

Can you please tell a bit in more detail as how you found this link i.e. the parent page where this link was written so that I can follow you as well to see why the link is broken.

Thanks

1 Like

@usman.ahmad Yes sure, I found the link from this web page : [How to Customize Your Grafana Theme | www.neteye-blog.com]

Thanks,

It seems that the link is not from our official website. Here is the official link for developers;

Also, on the same page there is a link to our official Developers guide where it explains as how to build grafana from source.

1 Like

grafana/developer-guide.md at main · grafana/grafana (github.com)

1 Like

Hi @usman.ahmad Thank you very much for the very useful tips, of course now I have a problem in the step of building the backend in Windows…

If you use or can use Docker, I would recommend building your own Docker container based on the latest Grafana release with updating logo, favicon, page title, etc., instead of building Grafana from source code.

Here is the example of how we did it for 9.0.2: volkovlabs-balena-app/Dockerfile at main · VolkovLabs/volkovlabs-balena-app · GitHub

2 Likes

Hi @mikhailvolkov, Thank you very much, I have been looking for a solution for several days… I want to ask you a question, after login to Grafana, there is another “welcome to Grafana”, how can I change it?also, how can I change the background color in Grafana’s dark and light theme?

1 Like

@zahrazare313 Glad it worked! I can take a look at it and let you know.

1 Like

@mikhailvolkov Thank you very much, I mean the home page! Actually I want to change the “Welcome to Grafana” and also the background color on the home page.

@zahrazare313 Home page can be changed

  1. Inside Docker or using Environment Variables:
# Home Dashboard
ENV GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/var/lib/grafana/plugins/volkovlabs-balena-app/dashboards/supervisor.json
  1. Can be Starred and then updated in the Organization Settings.

Background color defined in UI Theme, I don’t think it’s possible to modify it in UI. Most probably, should be replaced in the css files, I will take a look later.

1 Like

Hi @mikhailvolkov Thank you very much for your helpful tips, but I am very new to Docker and Grafana… I saw your demo server and I think this supervisor.json file is for the home page of this plugin, I don’t understand this file… I just want to remove “Welcome to Grafana” on the home page, can you guide me how exactly to do this?

@zahrazare313

I believe you are talking about “Welcome to Grafana” in the Home dashboard. In our projects, we set the Home dashboard to our own dashboard, which is the supervisor.json file.

If you want to keep the default Home dashboard and modify it, you can find it in the folder /usr/share/grafana/public/dashboards and modify similar to other files.

1 Like

@zahrazare313 To change the background color in Grafana’s log in screen:

### Replace Login Background
COPY img/g8_login_dark.svg /usr/share/grafana/public/img/g8_login_dark.svg
COPY img/g8_login_light.svg /usr/share/grafana/public/img/g8_login_light.svg
2 Likes

Hi @mikhailvolkov Thank you very much, your advice really helped me

1 Like

Everything we discussed in this topic you can learn in a 90-second video on how to customize Grafana interface: How to customize Grafana interface | Change titles, icons, footer, default dashboard | Grafana 9 - YouTube.

1 Like