# Recover COUCHDB\_ADMIN\_PASSWORD

**URL:** <https://forum.communityhealthtoolkit.org/t/recover-couchdb-admin-password/1809>\
**Category:** Development\
**Created:** [March 31, 2022, 5:05pm UTC](https://forum.communityhealthtoolkit.org/t/recover-couchdb-admin-password/1809 "2022-03-31T17:05:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mrjones](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/mrjones/32/681_2.png) [@mrjones](https://forum.communityhealthtoolkit.org/u/mrjones)\
**Post date:** [March 31, 2022, 6:20pm UTC](https://forum.communityhealthtoolkit.org/t/recover-couchdb-admin-password/1809/2 "2022-03-31T18:20:29Z")

</div>

@Babacar_Gueye - welcome to to forum! I see this is your first post. Thanks so much for asking your question. Every time the community engages here, the more we we’re able to solve your problem as well as help those who follow with the same problem later.

I assume you’re in a [self hosted](https://docs.communityhealthtoolkit.org/apps/guides/hosting/self-hosting/) or [local set](https://docs.communityhealthtoolkit.org/apps/tutorials/local-setup/) up situation, and you don’t know the password to be able to log in to the CHT web GUI as an admin. Please let me know if this isn’t correct!

If you haven’t done any customizations, then the password may simply be `password`, which is the default in our [docker-compose file](https://github.com/medic/cht-core/blob/master/docker-compose.yml#L22).

Alternately, you can check the `COUCH_URL` environment variable with an `echo` call:

```shell
echo $COUCH_URL                                                     
http://admin:password@localhost:5984/medic

```

In this case, it is simply `password` for me in my development setup.

Finally, if you’re really stuck, there’s a more involved process to forcefully reset the password. Use this method with caution as any other services that are dependent on the old password will need to be updated as well.

Let’s update the `medic` user’s password to `changeme`.

1. List your containers to find the right one:

```shell
docker ps --format="{{.Names}}"|grep medic
medic-os
helper_test_medic-os_1

```

2. In this case we want the default `medic-os` container, so let’s get shell on it:

```shell
docker exec -it medic-os bash

```

3. Edit the CouchDB `local.ini` file. I like `vim`:

```bash
vim /srv/settings/medic-core/couchdb/local.ini

```

4. Remove the pbkdf2 hash for the `medic` user and replace it with the plaintext password. When CouchDB reboots, it will re-hash this for you. Change this:

```shell
medic = -pbkdf2-8333fed3be2f6d733724bd7e16b50018d31b26f5,54b5a496afb8cc950ea4d5e9d49532ae,10

```

To this:

```auto
medic = changeme

```

5. Finally, restart CouchDB:

```bash
/boot/svc-restart medic-core couchdb

```

Please let us know if I made the wrong assumption, if you’re still stuck or if this solved your problem!

---

_[View the full topic](https://forum.communityhealthtoolkit.org/t/recover-couchdb-admin-password/1809)._
