Reset admin password in confluence self-hosted
Asked by Mechlin_Abhishek:

Hi, I forgot my Confluence (self-hosted) admin password and I tried to reset by following this link <https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html>

I followed there steps:

1. Stop Confluence Windows Service

2. Edit `<installation-directory>/bin/``setenv.bat` and add the following system property

<br />

set CATALINA_OPTS=-Datlassian.recovery.password=Temp_pass123 %CATALINA_OPTS%

3. Start Confluence Windows Service

4. Log in to Confluence with the username **recovery_admin** and the temporary password I specified in the system property.

But unable to login.

Error message:

* Sorry, your username and/or password are incorrect. Please try again.


Answers:
author: Jonathan Siberry
body: Hi

I had exactly the same issue and can report that setting the JAVA variables work

The <https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html> is confusing at it suggests that you need to run it using the start-confluence.bat yet however it then states if you are using windows services then you cannot do this which is not true

Steps to re-set password

1) Edit the setenv.bat file and add in a recovery password:

set CATALINA_OPTS=-Datlassian.recovery.password=admin

2) Set the JAVA_HOME and JRE_HOME variables

3) Restart PC

4) Ensure atlassan windows service is not running

5) Open command prompt as Administrator

6) navigate to and run the start-confluence.bat in the bin folder of the install directory

7) tomcat messages should appear, wait a few minutes for everything to load

8) If it wont start due to not being able to access a jarfile then manually run the jar file

9) login as recovery_admin and the password set in step 1


author: AnnWorley
body: Hi Abhishek,

Please make sure you are using Confluence 6.5 or above. If you are using an earlier version please follow the password recovery article that corresponds to your version. The docs only go back to Confluence 5.10. If you are using a version earlier than that, please use the SQL queries from the Confluence 5.10 document.

![Screen Shot 2018-05-22 at 12.32.37 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/22680i0DE9BBAE1035E5AD/image-dimensions/505x268?v=v2 "Screen Shot 2018-05-22 at 12.32.37 PM.png")

You mentioned nothing happened when you used start-confluence.bat to start Confluence, in an Explorer window using "run as administrator". The expected behavior is a command window will open with Tomcat start-up messages, then Confluence becomes available in a browser. If you close that command window, Confluence will shut down.

I look forward to your next update.

Thanks,  
Ann

comments: author: Mechlin_Abhishek
body: I just installed **latest version (6.9.0)** few days ago on **Windows 10** system and trying to recover admin password by [this documentation link](https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html?_ga=2.231184924.261242937.1526935936-1253155554.1525218036). Below is a screenshot of steps:

![confluence-steps.png](https://community.atlassian.com/t5/image/serverpage/image-id/22687i7A7CF3D1387A081A/image-size/large?v=v2&px=999 "confluence-steps.png")

I don't no why start-confluence.bat not executing when I run it just blink a console windows nothing else.

Thank you!


author: Fadoua
body: Windows {#toc-hId-1816419614}
-----------------------------

[Collapse](https://confluence.atlassian.com/conf510/start-and-stop-confluence-838415844.html#)

**++If you installed Confluence as a service++,** you can **Start Confluence Server** and **Stop Confluence Server** from the Windows Start menu.

You can't start or stop Confluence manually using the `start-confluence.bat` and `stop-confluence.bat` file.

[Collapse](https://confluence.atlassian.com/conf510/start-and-stop-confluence-838415844.html#)

**If you didn't install Confluence as a service** you'll need to start and stop Confluence manually.

* To start Confluence run `<installation-directory>\bin\start-confluence.bat`
* To stop Confluence run `<installation-directory>\bin\stop-confluence.bat`

We recommend running Confluence with a dedicated user account. To do this, use use the `runas` command to execute `start-confluence.bat`.


author: Fadoua
body: How did you install your Confluence?


author: Fadoua
body: [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183)another info:

It is possible to start Confluence Server with user installed add-ons temporarily disabled. This is useful if you need to troubleshoot problems with your site, particularly if an add-on may be preventing Confluence from starting up successfully.

To start Confluence with all user installed add-ons temporarily disabled:

    > cd <installation-directory>/bin> start-confluence.bat /disablealladdons

To start Confluence with a particular add-on temporarily disabled:

    > cd <installation-directory>/bin> start-confluence.bat /disableaddon=com.atlassian.test.plugin

where `com.atlassian.test.plugin` is the add-on key. To disable multiple add-ons, use a colon separated list. Regex/wildcards are not permitted, the full key of the plugin must be provided.

These parameters are applied at startup only, they do not persist. If you want to permanently disable an add-on, go to


author: Mechlin_Abhishek
body: I install Confluence by downloading the .exe for Confluence Self-Hosted Server

atlassian-confluence-6.9.0-x64.exe


author: Fadoua
body: [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183)Did you install it as a server administrator? or after creating a service account?


author: Mechlin_Abhishek
body: I got this **error**
>
> ```
> C:\Program Files\Atlassian\Confluence\bin>start-confluence.bat /disablealladdons
> Disabling all user installed addons
>
> To run Confluence in the foreground, start the server with start-confluence.bat /fg
> '\rem' is not recognized as an internal or external command,
> operable program or batch file.
> 2018.05.23_ 2.02.43
> 2018.05.23_02.02.43
> Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
> At least one of these environment variable is needed to run this program
> Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
> At least one of these environment variable is needed to run this program
> C:\Program Files\Atlassian\Confluence\bin>start-confluence.bat
> ```


author: Fadoua
body: ```
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
```

it is very important to define.

I really apologize I am more a Linux person than Windows, however I will assist in the best way I can


author: Fadoua
body: <https://www.jamf.com/jamf-nation/articles/348/configuring-the-java_home-and-jre_home-environment-variables-on-a-windows-server>


author: Fadoua
body: [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183)any luck?


author: AnnWorley
body: [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183) [Setting the JAVA_HOME Variable in Windows](https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html) is another doc like Fadoua linked. Have you been able to set it?

The SQL queries in the [older version of the document](https://confluence.atlassian.com/conf64/restore-passwords-to-recover-admin-user-rights-936511358.html) are another option if starting from the batch file proves too problematic.


author: Fadoua
body: Trying to help as [@Thomas Schlegel](/t5/user/viewprofilepage/user-id/781483) is off today.

comments: author: Fadoua
body: Are you using the Confluence Internal Directory or an external Directory?


author: Mechlin_Abhishek
body: I just installed latest version few days ago on Windows 10 system. I am not sure about Confluence Internal Directory or an external Directory.


author: Fadoua
body: [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183)How do you add users so that they can log in to Confluence? AD? Crowd? JIRA Internal Directory?


author: Mechlin_Abhishek
body: On Confluence setup time, it prompted me to manage user by JIRA or by Confluence itself, than I prefer Confluence to manage the users not by JIRA.


author: Fadoua
body: I will need your patience here [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183) in order to assist you in the best way we can. Are you using any other Atlassian tool? How familiar are you with Confluence Administration? The reason I am asking so that we can share links that will help you more.


author: Mechlin_Abhishek
body: I am familiar with JIRA and Bitbucket.

First time I buy a licence for Atlassian Confluence. I am not much familiar with Confluence but familiar with some same kind of tools.


author: Fadoua
body: Thank you for all the details [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183)


author: Thomas Schlegel
body: Hi [@Mechlin_Abhishek](/t5/user/viewprofilepage/user-id/1414183),

the documentation says:

**(don't start Confluence as a service)**

comments: author: Mechlin_Abhishek
body: Thanks [@Thomas Schlegel](/t5/user/viewprofilepage/user-id/781483) for your comment.  

I installed Confluence as a service. When I stop the service than website not reachable http://localhost:8090. Please advice how can I start Confluence without starting windows service.


author: Mechlin_Abhishek
body: Nothing happened when I start Confluence **manually** using `<installation-directory>/bin/``start-confluence.bat also tried run by administration.`


author: Thomas Schlegel
body: Are you using some kind of wrapper software to start Confluence?


author: Mechlin_Abhishek
body: No nothing


author: Mechlin_Abhishek
body: What should I need to use?


author: Fadoua
body: stopping and starting Confluence Service itself shouldn't affect your windows server at all(it shouldn't stop your server)