dani-garcia / vaultwarden

dani-garcia / vaultwarden

An alternative server implementation of the Bitwarden Client API, written in Rust and compatible with official Bitwarden clients [disclaimer], perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. 这是 Bitwarden 客户端 API 的一个替代服务器实现,使用 Rust 编写,并兼容官方 Bitwarden 客户端 [免责声明]。它非常适合那些运行官方资源密集型服务不太理想的自托管部署场景。

Important: When using this server, please report any bugs or suggestions directly to us (see Get in touch), regardless of whatever clients you are using (mobile, desktop, browser…). DO NOT use the official Bitwarden support channels. 重要提示:使用此服务器时,无论您使用何种客户端(移动端、桌面端、浏览器端等),请直接向我们报告任何错误或建议(请参阅“联系我们”部分)。请勿使用官方 Bitwarden 支持渠道。

Features

功能特性

A nearly complete implementation of the Bitwarden Client API is provided, including: 提供了近乎完整的 Bitwarden 客户端 API 实现,包括:

  • Personal Vault, Send, Attachments, Website icons, Personal API Key
  • 个人保险库、发送(Send)、附件、网站图标、个人 API 密钥
  • Organizations: Collections, Password Sharing, Member Roles, Groups, Event Logs, Admin Password Reset, Directory Connector, Policies
  • 组织:集合、密码共享、成员角色、组、事件日志、管理员密码重置、目录连接器、策略
  • Multi/Two Factor Authentication: Authenticator, Email, FIDO2 WebAuthn, YubiKey, Duo
  • 多重/双重身份验证:身份验证器、电子邮件、FIDO2 WebAuthn、YubiKey、Duo
  • Emergency Access
  • 紧急访问
  • Vaultwarden Admin Backend
  • Vaultwarden 管理后台
  • Modified Web Vault client (Bundled within our containers)
  • 修改后的 Web Vault 客户端(已打包在我们的容器中)

Usage

使用方法

Important: The web-vault requires the use of HTTPS and a secure context for the Web Crypto API. That means it will only work if you enable HTTPS. We also suggest to use a reverse proxy. 重要提示:Web Vault 需要使用 HTTPS 和 Web Crypto API 的安全上下文。这意味着只有在启用 HTTPS 时它才能正常工作。我们还建议使用反向代理。

The recommended way to install and use Vaultwarden is via our container images which are published to ghcr.io, docker.io and quay.io. See which container image to use for an explanation of the provided tags. 安装和使用 Vaultwarden 的推荐方式是通过我们发布在 ghcr.io、docker.io 和 quay.io 上的容器镜像。请参阅“使用哪个容器镜像”以获取有关所提供标签的说明。

There are also community driven packages which can be used, but those might be lagging behind the latest version or might deviate in the way Vaultwarden is configured, as described in our Wiki. Alternatively, you can also build Vaultwarden yourself. While Vaultwarden is based upon the Rocket web framework which has built-in support for TLS our recommendation would be that you setup a reverse proxy (see proxy examples). 此外,也可以使用社区驱动的软件包,但它们可能滞后于最新版本,或者在配置方式上可能与我们的 Wiki 中描述的有所不同。或者,您也可以自行构建 Vaultwarden。虽然 Vaultwarden 基于内置 TLS 支持的 Rocket Web 框架,但我们仍建议您设置反向代理(请参阅代理示例)。

Tip: For more detailed examples on how to install, use and configure Vaultwarden you can check our Wiki. 提示:有关如何安装、使用和配置 Vaultwarden 的更详细示例,请查看我们的 Wiki。

Docker/Podman CLI

Docker/Podman 命令行

Pull the container image and mount a volume from the host for persistent storage. You can replace docker with podman if you prefer to use podman. 拉取容器镜像并挂载主机卷以实现持久化存储。如果您更喜欢使用 podman,可以将 docker 替换为 podman。

docker pull vaultwarden/server:latest
docker run --detach --name vaultwarden \
  --env DOMAIN="https://vw.domain.tld" \
  --volume /vw-data/:/data/ \
  --restart unless-stopped \
  --publish 127.0.0.1:8000:80 \
  vaultwarden/server:latest

This will preserve any persistent data under /vw-data/, you can adapt the path to whatever suits you. 这将把所有持久化数据保存在 /vw-data/ 下,您可以根据需要调整路径。

Docker Compose

Docker Compose

To use Docker compose you need to create a compose.yaml which will hold the configuration to run the Vaultwarden container. 要使用 Docker Compose,您需要创建一个 compose.yaml 文件,其中包含运行 Vaultwarden 容器的配置。

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    environment:
      DOMAIN: "https://vw.domain.tld"
    volumes:
      - ./vw-data/:/data/
    ports:
      - 127.0.0.1:8000:80

Get in touch

联系我们

Have a question, suggestion or need help? Join our community on Matrix, GitHub Discussions or Discourse Forums. 有疑问、建议或需要帮助?请加入我们的 Matrix、GitHub Discussions 或 Discourse 论坛社区。

Encountered a bug or crash? Please search our issue tracker and discussions to see if it’s already been reported. If not, please start a new discussion or create a new issue. Ensure you’re using the latest version of Vaultwarden and there aren’t any similar issues open or closed! 遇到错误或崩溃?请搜索我们的问题追踪器和讨论区,查看是否已有相关报告。如果没有,请发起新的讨论或创建新的 Issue。请确保您使用的是最新版本的 Vaultwarden,并且没有类似的问题处于开启或关闭状态!

Contributors

贡献者

Thanks for your contribution to the project! 感谢您对本项目的贡献!

Disclaimer

免责声明

This project is not associated with Bitwarden or Bitwarden, Inc. However, one of the active maintainers for Vaultwarden is employed by Bitwarden and is allowed to contribute to the project on their own time. These contributions are independent of Bitwarden and are reviewed by other maintainers. The maintainers work together to set the direction for the project, focusing on serving the self-hosting community, including individuals, families, and small organizations, while ensuring the project’s sustainability. 本项目与 Bitwarden 或 Bitwarden, Inc. 无关。不过,Vaultwarden 的一位活跃维护者受雇于 Bitwarden,并被允许在业余时间为本项目做出贡献。这些贡献独立于 Bitwarden,并由其他维护者进行审核。维护者们共同协作确定项目方向,专注于服务自托管社区(包括个人、家庭和小型组织),同时确保项目的可持续性。

Please note: We cannot be held liable for any data loss that may occur while using Vaultwarden. This includes passwords, attachments, and other information handled by the application. We highly recommend performing regular backups of your files and database. However, should you experience data loss, we encourage you to contact us immediately. 请注意:对于使用 Vaultwarden 时可能发生的任何数据丢失,我们概不负责。这包括密码、附件以及应用程序处理的其他信息。我们强烈建议您定期备份文件和数据库。尽管如此,如果您确实遇到了数据丢失,我们鼓励您立即联系我们。

Bitwarden_RS

Bitwarden_RS

This project was known as Bitwarden_RS and has been renamed to separate itself from the official Bitwarden server in the hopes of avoiding confusion and trademark/branding issues. Please see #1642 - v1.21.0 release and project rename to Vaultwarden for more explanation. 本项目曾名为 Bitwarden_RS,现已更名,旨在与官方 Bitwarden 服务器区分开来,以避免混淆及商标/品牌问题。更多解释请参阅 #1642 - v1.21.0 版本发布及项目更名为 Vaultwarden。