# Enable Admin after docker installation

**URL:** <https://vaultwarden.discourse.group/t/enable-admin-after-docker-installation/1272>\
**Category:** Help\
**Created:** [November 21, 2021, 10:16pm UTC](https://vaultwarden.discourse.group/t/enable-admin-after-docker-installation/1272 "2021-11-21T22:16:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jochenmehlich](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jochenmehlich](https://vaultwarden.discourse.group/u/jochenmehlich)\
**Post date:** [November 21, 2021, 10:16pm UTC](https://vaultwarden.discourse.group/t/enable-admin-after-docker-installation/1272/1 "2021-11-21T22:16:21Z")

</div>

Already installed docker, but didnt enabled admin, any chance to enable without losing all data?

---

<div class="post-metadata">

**Author:** ![cksapp](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@cksapp](https://vaultwarden.discourse.group/u/cksapp)\
**Post date:** [November 22, 2021, 2:59am UTC](https://vaultwarden.discourse.group/t/enable-admin-after-docker-installation/1272/2 "2021-11-22T02:59:50Z")

</div>

If you have a volume mounted with `-v ./vw-data/:/data/` then you should have a shared directory from the host file system that the docker container uses to store the data in.

As long as you already have the volume mount, those files will be persistent on the host file system, and you can stop, change, delete and recreate, and start the docker container without issue as the same volume option `-v ./vw-data/:/data/` will map into the container and your previously stored data will be available to the new container.

The [admin page](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page) can then be enabled and the new container recreated with the extra options needed and restarted.  
I would also familiarize yourself with the [data structure](https://github.com/dani-garcia/vaultwarden/wiki/Backing-up-your-vault) Vaultwarden uses as all these files will be available in your ./vw-data/ directory or whatever other file system path and directory you chose to set.  
Also provides good info on which items would need to be backed up.

> **[Starting a Container · dani-garcia/vaultwarden Wiki](https://github.com/dani-garcia/vaultwarden/wiki/Starting-a-Container#creating-the-container)**
>
> Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden\_rs - Starting a Container · dani-garcia/vaultwarden Wiki

---

<div class="post-metadata">

**Author:** ![jochenmehlich](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jochenmehlich](https://vaultwarden.discourse.group/u/jochenmehlich)\
**Post date:** [November 22, 2021, 9:21am UTC](https://vaultwarden.discourse.group/t/enable-admin-after-docker-installation/1272/3 "2021-11-22T09:21:21Z")

</div>

okay thanks,

is there any way to edit the config (enable email 2fa) without the admin interface, directly in the files?

---

<div class="post-metadata">

**Author:** ![cksapp](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@cksapp](https://vaultwarden.discourse.group/u/cksapp)\
**Post date:** [November 22, 2021, 8:08pm UTC](https://vaultwarden.discourse.group/t/enable-admin-after-docker-installation/1272/4 "2021-11-22T20:08:14Z")

</div>

All of Vaultwarden’s configurable environment variables should be listed in the [.env.template](https://github.com/dani-garcia/vaultwarden/blob/main/.env.template) of the main codebase.  
Other docker variables can also be passed in your configuration such as variables for things like [Rocket](https://rocket.rs/v0.4/guide/configuration/#environment-variables), or other containers such as external database, or reverse proxy with something like Caddy.

The config.json file in the vw-data folder, or simply /data/ directory inside the container also can be used with the following parameters

```auto
{

  "_enable_email_2fa": true,
  "email_token_size": 6,
  "email_expiration_time": 600,
  "email_attempts_limit": 3
}

```
