Where Jenkins stores your login information

Jenkins stores usernames and passwords in different places depending on how your system was set up. If you installed Jenkins yourself on your own computer or server, you created the initial admin account during setup — that username and password are yours to remember or reset. If someone else set up Jenkins for your organization, you may need to contact them or your IT department, because they control who has access and how.

The most common scenario is that you have forgotten the password but remember the username. Jenkins does not send passwords in email and does not have a "forgot password" link on the login screen. Instead, you recover access by editing a configuration file on the machine where Jenkins actually runs.

Key Takeaways

  • Jenkins stores user data in a folder called secrets on the server where it runs, not in a database you can access from the login page.
  • If you remember your username but forgot the password, you can reset it by editing a single configuration file and restarting Jenkins.
  • If you do not have access to the server itself, you will need to contact whoever installed Jenkins or manages your system.
  • The initial admin account created during Jenkins installation is the only account that exists until you create others through the Jenkins web interface.
  • Jenkins can also be set up to use external authentication like LDAP or Active Directory, in which case your username and password come from your organization's directory, not from Jenkins itself.

Resetting a password when you know the username

You need direct access to the server or computer running Jenkins. Open a terminal or command prompt and navigate to the Jenkins home directory. On Linux and Mac, this is usually /var/lib/jenkins or ~/.jenkins. On Windows, it is usually C:\Program Files\Jenkins or C:\Users\[YourUsername]\.jenkins.

Inside the Jenkins home directory, look for a folder called secrets. Open the file named users (no file extension). This is a folder, not a file — open it and you will see files named after each Jenkins user. Find the file matching the username you are trying to reset.

Inside that user file, look for a line containing passwordHash. Delete the entire hash value (the long string of characters after the equals sign), leaving just passwordHash= with nothing after it. Save the file. Restart Jenkins. When you log in, Jenkins will prompt you to set a new password on your first attempt.

Finding the username if you only know the password

This is much harder because you would need to know the password hash format Jenkins uses and compare it against every user file. The practical solution is to reset the admin account instead. If you have access to the server, you can always regain control through the admin account, then create a new user or reset other accounts from the Jenkins web interface.

If you do not remember any username and do not have server access, contact whoever manages Jenkins for your organization. They can reset your account or create a new one for you.

When Jenkins uses your organization's directory

Some organizations set up Jenkins to use LDAP, Active Directory, or SAML for login instead of storing usernames and passwords in Jenkins itself. In this case, your Jenkins username is the same as your work username, and your password is the same as your work password. You cannot reset it through Jenkins — you reset it through your organization's directory or password manager.

You can tell this is how your Jenkins is set up if the login page says something like "Log in with your company credentials" or if you are redirected to a different login page when you try to log in. Ask your IT department or the person who manages Jenkins whether your system uses external authentication.

Locating the initial admin password after a fresh installation

When you first install Jenkins, it generates a temporary admin password and displays it on the setup screen. If you did not save it, Jenkins writes it to a file. On Linux and Mac, check /var/lib/jenkins/secrets/initialAdminPassword. On Windows, check C:\Program Files\Jenkins\secrets\initialAdminPassword or C:\Users\[YourUsername]\.jenkins\secrets\initialAdminPassword.

Open that file in a text editor and copy the password. Use it to log in as admin, then create a permanent password when ready. The initial password expires after the first login, so you cannot use it again.

What to do if you cannot access the server

If Jenkins is running on a server you do not have direct access to, you cannot reset the password yourself. You will need to contact the person or team that manages the server. Provide them with your username and ask them to reset your password or create a new account. They can do this in minutes by accessing the server directly.

If you do not know who manages Jenkins, check with your IT department or the person who gave you the Jenkins address in the first place. They can point you to the right person or reset it for you.

Frequently Asked Questions

Can I recover my password without restarting Jenkins?

No. Jenkins reads user data when it starts up. After you edit the password hash file, you must restart Jenkins for the change to take effect. Restarting usually takes less than a minute.

What if I delete the wrong user file by mistake?

That user account is deleted. If it was the only admin account, you will need to reset the admin account using the same process, or restore the Jenkins home directory from a backup if you have one. This is why it is good practice to create at least two admin accounts.

Does Jenkins ever email me my password?

No. Jenkins does not send passwords by email under any circumstances. If you receive an email claiming to be from Jenkins with a password, it is not from Jenkins. Anyone offering to send you a Jenkins password is not legitimate.

Can I change someone else's password if I am an admin?

Yes. Log in as an admin, go to Manage Jenkins, then Manage Users, click the user's name, and select Configure. You can set a new password for them without knowing the old one.

What if Jenkins is running in Docker or a container?

You still access the same files, but you need to enter the container first. Use docker exec -it [container-name] bash to open a terminal inside the container, then follow the same steps to find and edit the user configuration files.