# Super admin in Docker environment

**URL:** <https://forum.xwiki.org/t/super-admin-in-docker-environment/71>\
**Category:** Help / Discuss\
**Tags:** docker\
**Created:** [May 18, 2017, 3:12pm UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71 "2017-05-18T15:12:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.xwiki.org/u/Jonathan)\
**Post date:** [May 18, 2017, 3:12pm UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/1 "2017-05-18T15:12:43Z")

</div>

Hi we are trying to activate the Super admin, and do not know how to achieve this in a Docker Environment.

thanks in advance of your help

---

<div class="post-metadata">

**Author:** ![gdelhumeau](https://forum.xwiki.org/user_avatar/forum.xwiki.org/gdelhumeau/32/3974_2.png) [@gdelhumeau](https://forum.xwiki.org/u/gdelhumeau)\
**Post date:** [May 18, 2017, 3:53pm UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/2 "2017-05-18T15:53:48Z")

</div>

Hi,

I’m not a docker user but I suppose you should modify the file `/usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.cfg` (inside your container) and change the line:  
# xwiki.superadminpassword=system  
by  
xwiki.superadminpassword=myPassword

(don’t forget to uncomment the line).

I hope it helps,

Guillaume

EDIT: you need to restart XWiki after the operation to enable superadmin.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.xwiki.org/u/Jonathan)\
**Post date:** [May 18, 2017, 5:02pm UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/3 "2017-05-18T17:02:12Z")

</div>

Thanks a lot, in the documents on the website it says that we need to restart the servlet container after changing xwifi.cfg , how would this work/how would we restart in a docker environment?

---

<div class="post-metadata">

**Author:** ![gdelhumeau](https://forum.xwiki.org/user_avatar/forum.xwiki.org/gdelhumeau/32/3974_2.png) [@gdelhumeau](https://forum.xwiki.org/u/gdelhumeau)\
**Post date:** [May 18, 2017, 5:30pm UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/4 "2017-05-18T17:30:49Z")

</div>

This property is loaded when XWiki is started. So either your restart the servlet container (in your case it must be Tomcat), or the docker container. It should work in both cases.

Guillaume

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 18, 2017, 7:55pm UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/5 "2017-05-18T19:55:40Z")

</div>

See [Loading...](http://jira.xwiki.org/browse/XDOCKER-20) which has some comments explaining how to do this:

```
docker exec -ti <containerid> bash -l

```

You’ll need to stop/restart the container with:

```
docker restart <container id>

```

---

<div class="post-metadata">

**Author:** ![zwindler](https://forum.xwiki.org/user_avatar/forum.xwiki.org/zwindler/32/20_2.png) [@zwindler](https://forum.xwiki.org/u/zwindler)\
**Post date:** [May 19, 2017, 8:08am UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/6 "2017-05-19T08:08:28Z")

</div>

Vincent, this makes me thinking…

Shouldn’t the xwiki.cfg file be exported as a volume or a mapping on local docker node ? Modifications in docker container being ephemeral across reboots, changes in xwiki.cfg will be discarded.

In this particular case (superadmin), it shouldn’t be a problem as the superadmin is supposed to be a temporary account for troubleshooting and such but I can see examples where this could be a problem (such as LDAP configuration for example).

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [May 19, 2017, 8:46am UTC](https://forum.xwiki.org/t/super-admin-in-docker-environment/71/7 "2017-05-19T08:46:29Z")

</div>

I agree. See [Loading...](http://jira.xwiki.org/browse/XDOCKER-20) and my comments there.
