> For the complete documentation index, see [llms.txt](https://0xpthree.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xpthree.gitbook.io/notes/development/docker/vaultwarden.md).

# Vaultwarden

## Setup using Docker Compose

This is installed using docker compose version 2 see [this page](/notes/development/docker/docker-compose.md) on how to install it.

#### Files and variables

Create `ADMIN_TOKEN`:

```bash
» echo -n "<SOME-PASSWORD-HERE>" | argon2 "$(openssl rand -base64 32)" -e -id -k 65540 -t 3 -p 4 | sed 's#\$#\$\$#g'
$$argon2id$$v=19$$m=65540,t=3,p=4$$bEsrUWdpcEx5ZDNjVWhDWU5wZXRsYmJ1Sk9ucFFzdTJ5anpMZENNRTZVcz0$$ZzQrnAqa0MiJmKkMPPZMWng0koLZDIpaIDWdP7B1218
```

`.env` file:

```bash
ADMIN_TOKEN=$$argon2id$$v=19$$m=65540,t=3,p=4$$b0hObnBLeWQ4QmpaMjVkMTJBWnJYa2VVUDVsbDYraGczWjhnOUQrSE1zdz0$$1ZlUa9UR557IqxUZkTjGit0PTXJx3GObhFh9q+xFVL8
WEBSOCKET_ENABLED=true
SIGNUPS_ALLOWED=true
SMTP_ENABLED=false
YUBIKEY_ENABLED=false
DUO_ENABLED=false
EMAIL_2FA_ENABLED=false
DOMAIN=https://vault.mydomain.local
```

`docker-compose.yml` file:

```yaml
volumes:
  vault-data: { driver: local }
networks:
  proxy:
    name: proxy_network

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    ports:
     - 9445:80
    volumes:
     - vault-data:/data
    environment:
     - DOMAIN=${DOMAIN}
     - ADMIN_TOKEN=${ADMIN_TOKEN}
     - WEBSOCKET_ENABLED=${WEBSOCKET_ENABLED}
     - SIGNUPS_ALLOWED=${SIGNUPS_ALLOWED}
     - SMTP_ENABLED=${SMTP_ENABLED}
     - YUBYKEY_ENABLED=${YUBIKEY_ENABLED}
     - DUO_ENABLED=${DUO_ENABLED}
     - EMAIL_2FA_ENABLED=${EMAIL_2FA_ENABLED}
    networks:
      - proxy
```

#### Build container

```
docker compose up -d
```

Reach the service at `http://localhost:9445` and the admin interface at `/admin`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://0xpthree.gitbook.io/notes/development/docker/vaultwarden.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
