This page is primarily for those interested in vaultwarden development, or who have a specific reason for wanting to build their own binary. Typical users should either [[deploy via Docker|Which-container-image-to-use]], [[extract the pre-built binaries|Pre-built binaries]] from the Alpine-based Docker images, or look for a [[third-party package|Third-party-packages]]. ## Dependencies - `Rust nightly` (strongly recommended to use [rustup](https://rustup.rs/)) - On a Debian based distro some general packages to make sure building should go fine install the following: `build-essential`, `git` - `OpenSSL` (should be available in path, see [openssl crate docs](https://docs.rs/openssl/0.10.16/openssl/#automatic)) On a Debian based distro, you need to install `pkg-config` and `libssl-dev` - For the SQlite3 backend on a Debian based distro you need to install `libsqlite3-dev` - For the MySQL backend on a Debian based distro you need to install `libmariadb-dev-compat` and `libmariadb-dev` - For the PostgreSQL on a Debian based distro you need to install `libpq-dev` and `pkg-config` - `NodeJS` (only when compiling the web-vault, install through your system's package manager, use the [prebuilt binaries](https://nodejs.org/en/download/)) or [nodesource binary distribution](https://github.com/nodesource/distributions) *Note: web-vault currently uses a package base (e.g. node-sass ``` Modify the *.sql files, making sure that any changes are reverted in the down.sql file. Apply the migrations and save the generated schemas as follows: ```sh diesel migration redo # This step should be done automatically when using diesel-cli > 1.3.0 # diesel print-schema > src/db/sqlite/schema.rs ``` ## How to migrate from SQLite backend to MySQL backend (for developers) Refer to [using the MySQL backend](https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MySQL-Backend) if you want to migrate from SQLite. ## How to migrate from SQLite backend to PostgreSQL backend (for developers) Refer to [using the PostgreSQL backend](https://github.com/dani-garcia/vaultwarden/wiki/Using-the-PostgreSQL-Backend) if you want to migrate from SQLite.