Where Jenkins stores your login credentials

Jenkins does not send you a username and password by email when you first set it up. Instead, the person who installed Jenkins on your server creates the first admin account during setup, and that account holder is responsible for managing all other user credentials. If you installed Jenkins yourself, you created your own username and password at that time. If someone else set it up, you need to ask them for your credentials — or ask them to create a new account for you.

Jenkins stores user accounts in a configuration file on the server itself, not in a database you can access from outside. The file location depends on your operating system and how Jenkins was installed, but it is typically found in the Jenkins home directory under users/[username]/config.xml. You cannot read this file to recover a forgotten password; you can only reset it by accessing the server directly or by asking an administrator to do it for you.

Key Takeaways

  • Jenkins usernames and passwords are created by an administrator, not sent to you automatically, so your first step is to contact whoever manages Jenkins at your organization.
  • If you are the administrator and forgot your password, you must access the Jenkins server directly via SSH or the command line to reset it.
  • Resetting your password requires editing or deleting the user configuration file on the server and restarting Jenkins.
  • If Jenkins is running in a container or cloud environment, the reset process differs slightly depending on how it was deployed.

Asking your Jenkins administrator for credentials

If you do not have a username and password yet, or if you have forgotten yours, the fastest route is to contact the person who manages Jenkins at your organization. This is usually someone in your IT or DevOps team. Tell them your name and ask them to create an account for you or to reset your existing password. They can do this from the Jenkins web interface without touching the server files.

When you contact them, be ready to tell them what permissions you need — for example, whether you need to run builds, view logs, or just read job status. Jenkins administrators can assign different permission levels to different users, so knowing what you actually need to do helps them set up your account correctly.

Resetting your password if you are the administrator

If you are the Jenkins administrator and you have forgotten your password, you must access the Jenkins server directly. Log in to the server using SSH or remote desktop, depending on your operating system. You will need the server's hostname or IP address and your server login credentials — these are different from your Jenkins credentials.

Once you are logged into the server, navigate to the Jenkins home directory. On Linux and macOS, this is usually /var/lib/jenkins or ~/.jenkins, depending on how Jenkins was installed. On Windows, it is typically C:\Program Files\Jenkins or C:\Users\[YourUsername]\.jenkins. Inside this directory, look for a folder called users.

Editing the user configuration file

Inside the users folder, you will see a subfolder with your username. Open that folder and find the file called config.xml. Open this file in a text editor — do not use a word processor like Microsoft Word, as it will corrupt the file. Use Notepad on Windows, or nano or vi on Linux and macOS.

Look for a section that contains <passwordHash> or <password>. Delete the entire contents between the opening and closing tags, leaving the tags themselves in place. For example, if you see <passwordHash>abcd1234efgh5678</passwordHash>, change it to <passwordHash></passwordHash>. Save the file and close the text editor.

Restarting Jenkins and setting a new password

After you have edited the config.xml file, you must restart Jenkins for the change to take effect. On Linux, use the command sudo systemctl restart jenkins or sudo service jenkins restart, depending on your system. On Windows, open Services, find Jenkins, and click Restart. On macOS, use launchctl stop org.jenkins-ci followed by launchctl start org.jenkins-ci.

Once Jenkins has restarted, open the Jenkins web interface in your browser and go to the login page. You should now be able to log in with your username and no password — leave the password field blank. After you log in, go to your user profile (usually a gear icon or your username in the top right corner) and select "Configure". Look for the password field and set a new password. Save your changes.

Resetting credentials in containerized or cloud Jenkins

If Jenkins is running in Docker, Kubernetes, or a cloud service like AWS or Azure, the reset process is different. In Docker, you must either mount the Jenkins home directory as a volume so you can edit the files on your host machine, or you must use the docker exec command to run commands inside the container. In Kubernetes, you typically need to access the pod's filesystem using kubectl exec.

For cloud-hosted Jenkins services, check your provider's documentation — some allow password resets through a web dashboard, while others require you to contact support. If you are unsure whether your Jenkins is containerized or cloud-hosted, ask the person who set it up.

Preventing password loss in the future

Once you have regained access, consider setting up Jenkins to use an external authentication system like LDAP, Active Directory, or single sign-on (SSO). These systems let users log in with credentials they already use for other work tools, and they reduce the number of passwords Jenkins administrators have to manage. You can configure this in Jenkins under Manage Jenkins > Configure Global Security.

You should also document who has administrator access to Jenkins and make sure at least two people know how to reset credentials in an emergency. If only one person knows the password and they leave your organization, you could lose access to your entire Jenkins installation.

Frequently Asked Questions

What if I do not have SSH access to the Jenkins server?

Contact your infrastructure or IT team and ask them to reset your Jenkins password for you. They have the server access you need. If no one at your organization has server access, Jenkins may have been set up by an external vendor, and you should contact them for support.

Can I recover my password instead of resetting it?

No. Jenkins does not store passwords in a way that allows recovery. Passwords are hashed, which means they are converted into a one-way code that cannot be reversed. Resetting is the only option.

What if I delete the wrong line from the config.xml file?

Jenkins may fail to start or behave unexpectedly. If this happens, restore the file from a backup if you have one, or delete the entire config.xml file and restart Jenkins — it will regenerate a default version. You will then need to reconfigure your user account and permissions.

Do I need to restart Jenkins every time I change a password?

No. If you change your password through the Jenkins web interface (by logging in and going to your profile settings), the change takes effect when ready. You only need to restart Jenkins if you are editing the config.xml file directly on the server.

Can multiple people have administrator access to Jenkins?

Yes. Any administrator can create new user accounts and assign permissions. It is a good practice to have at least two administrators so that if one person forgets their password or leaves, someone else can still manage the system.