Customize Jenkins favicon & dashboard logo

Nadav Svirsky
3 min readApr 1, 2021

--

Without changing the theme or the login screen logo

Using the proper plugin, Jenkins allows you to customize the favicon & dashboard (upper left side menu) logo. This article doesn’t elaborate on how to change the login screen logo.

Steps:

  1. Download your favorite image from Jenkins Artwork.
  2. Convert the downloaded image from the previous step according to it’s ratio. In my case the ratio was 940 x 1299px, meaning a ration of 1:1.38. I’ve shrunk the file to 40 x 55px using this website.
  3. In Jenkins > Manage Jenkins > Manage Plugins look for Simple Theme Plugin. Install it.
  4. Assuming your deployment is Linux based, SSH to the machine and create a folder named ‘userContent’ under JENKINS_HOME (usually /var/lib/jenkins), i.e.:
/var/lib/jenkins/userContent/

5. Under the newely created folder, create a subfolder named layout, i.e.:

/var/lib/jenkins/userContent/layout

6. Copy the shrunk file to the ‘layout’ folder. If your using a Windows machine you can use WinSCP to copy the file to the Jenkins server.

7. Using nano, vim or alike create a style.css file with the following

/* Custom style for Jenkins */
.logo img {
content:url(http://10.10.10.1:8080/userContent/layout/new-logo.png);
/*change the path to your logo path*/
}
#jenkins-name-icon {
display: none;
}
.logo:after {
content: ‘Production IT Automations’;
font-weight: bold;
font-size: 40px;
font-family:”Brush Script MT”, cursive;
margin-left: 200px;
margin-right: 12px;
color: Aqua;
line-height: 40px;
}
  • replace ‘10.10.10.1’ with your instance IP
  • replace ‘new-logo.png’ with the file name you’ve uploaded in the item 6

8. Verify both files are avilable from your web browser:

http://10.10.10.1:8080/userContent/layout/style.css
http://10.10.10.1:8080/userContent/layout/new-logo.png

9. In Jenkins > Manage Jenkins > Configure System look for ‘Theme’. Click on Add > CSS URL.

Paste the CSS URL you’ve verified in the previos section as follows:

/userContent/layout/style.css

10. In the same page, click on Extra CSS

And paste the content of your alreday confgirued and uploaded CSS file.

11. Click on Save in the bottom of the page.

Check the upper left side, you’ll see that the logo has now changed to the thumbnail of your choise.

12. You can also change the favicon by clicking on Add > Favicon URL

pointing it to it’s location within the server:

http://10.10.10.1:8080/userContent/layout/new-logo.png

--

--

No responses yet