# How to use zitiLogin inside Ziti Edge Controller Docker container

**URL:** <https://openziti.discourse.group/t/how-to-use-zitilogin-inside-ziti-edge-controller-docker-container/1207>\
**Category:** General Questions\
**Created:** [April 16, 2023, 2:12pm UTC](https://openziti.discourse.group/t/how-to-use-zitilogin-inside-ziti-edge-controller-docker-container/1207 "2023-04-16T14:12:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 16, 2023, 8:17pm UTC](https://openziti.discourse.group/t/how-to-use-zitilogin-inside-ziti-edge-controller-docker-container/1207/3 "2023-04-16T20:17:18Z")

</div>

Assuming it’s what I’m guessing this is, this is the same bug that keeps hitting people, if you stop the docker container for the controller, when it comes back online it has the **very** unfortunate bug of overwriting the `ziti.env` file. That’s 99% fine, except for the fact that the `ZITI_PWD` is overwritten at that time, which leads to subsequent `zitiLogin` functions failing because the password that’s sourced, is not the correct password… ☹ I’m going to try to get this bug fixed since it keeps hitting people … [docker env password is renewed at each `docker-compose up` · Issue #1013 · openziti/ziti · GitHub](https://github.com/openziti/ziti/issues/1013)

The best thing to do is to either archive that password after the _very first_ time you bring the compose environment up, or change the password to something you can remember until we fix this…

You can use `zitiLogin` as long as you set `ZITI_PWD` since `zitiLogin` is just a short alias:

```auto
alias zitiLogin='ziti edge login "${ZITI_EDGE_CTRL_ADVERTISED}" -u "${ZITI_USER-}" -p "${ZITI_PWD}" -c "${ZITI_PKI}/${ZITI_EDGE_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_EDGE_CONTROLLER_INTERMEDIATE_NAME}.cert"'

```

You don’t need that `-c` part, and fwiw, that’ll be changing very soon with this pr [Add ziti edge login support for certs/ext-jwt-signer (via file) by dovholuknf · Pull Request #1079 · openziti/ziti · GitHub](https://github.com/openziti/ziti/pull/1079)

---

_[View the full topic](https://openziti.discourse.group/t/how-to-use-zitilogin-inside-ziti-edge-controller-docker-container/1207)._
