mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-08-03 13:33:44 +03:00
Remove legacy vault building method
@@ -61,8 +61,6 @@ A compiled version of the web vault can be downloaded from [dani-garcia/bw_web_b
|
|||||||
|
|
||||||
If you prefer to compile it manually, follow these steps:
|
If you prefer to compile it manually, follow these steps:
|
||||||
|
|
||||||
#### New (easy way):
|
|
||||||
|
|
||||||
- Clone the git repository at [dani-garcia/bw_web_builds](https://github.com/dani-garcia/bw_web_builds):
|
- Clone the git repository at [dani-garcia/bw_web_builds](https://github.com/dani-garcia/bw_web_builds):
|
||||||
```sh
|
```sh
|
||||||
# clone the repository
|
# clone the repository
|
||||||
@@ -80,50 +78,6 @@ make full
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
The script requires you to enter [a tag](https://github.com/vaultwarden/vw_web_builds/tags) or [a branch of a web-vault](https://github.com/vaultwarden/vw_web_builds/branches) to build. The `main` branch is an out-of-date mirror of the [bitwarden/clients repository](https://github.com/bitwarden/clients/) that has not been patched, so it won't be compatible with Vaultwarden.
|
The script requires you to enter [a tag](https://github.com/vaultwarden/vw_web_builds/tags) or [a branch of a web-vault](https://github.com/vaultwarden/vw_web_builds/branches) to build. The `main` branch is an out-of-date mirror of the [bitwarden/clients repository](https://github.com/bitwarden/clients/) that has not been patched, so it won't be compatible with Vaultwarden.
|
||||||
|
|
||||||
#### Old (very manual way):
|
|
||||||
|
|
||||||
- Clone the git repository at [bitwarden/clients](https://github.com/bitwarden/clients) and checkout the latest release tag (e.g. v2022.6.0):
|
|
||||||
```sh
|
|
||||||
# clone the repository
|
|
||||||
git clone https://github.com/bitwarden/clients.git web-vault
|
|
||||||
cd web-vault
|
|
||||||
# switch to the latest tag
|
|
||||||
git -c advice.detachedHead=false checkout web-v2022.6.0
|
|
||||||
# Or use the commit hash for that version
|
|
||||||
git -c advice.detachedHead=false checkout bb5f9311a776b94a33bcf0a7bff44cd87a2fcc92
|
|
||||||
```
|
|
||||||
|
|
||||||
- Patch all the images from [resources](https://github.com/dani-garcia/bw_web_builds/tree/master/resources) according to the instructions in the [apply_patches script](https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/apply_patches.sh)
|
|
||||||
|
|
||||||
- Download the patch file from [dani-garcia/bw_web_builds](https://github.com/dani-garcia/bw_web_builds/tree/master/patches) and copy it to the `web-vault` folder.
|
|
||||||
To choose the version to use, assuming the web vault is version `vXXXX.Y.Z`:
|
|
||||||
- If there is a patch with version `vXXXX.Y.Z`, use that one
|
|
||||||
- Otherwise, pick the one with the largest version that is still smaller than `vXXXX.Y.Z`
|
|
||||||
- Apply the patch
|
|
||||||
```sh
|
|
||||||
# In the 'web-vault' directory
|
|
||||||
git apply vXXXX.Y.Z.patch
|
|
||||||
```
|
|
||||||
|
|
||||||
- Then, build the Vault:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm ci
|
|
||||||
# Read the note below (we do use this for our docker builds).
|
|
||||||
# npm audit fix
|
|
||||||
|
|
||||||
# Change to the web-vault directory
|
|
||||||
cd apps/web
|
|
||||||
# Build the web-vault
|
|
||||||
npm run dist:oss:selfhost
|
|
||||||
```
|
|
||||||
|
|
||||||
*Note: You might be asked to run ```npm audit fix``` to fix vulnerability. This will automatically try to upgrade packages to newer version, which might not be compatible and break web-vault functionality``` Use it at your own risk, if you know what you are doing. We do use this on our own releases btw!*
|
|
||||||
|
|
||||||
Finally copy the contents of the `build` folder into the destination folder:
|
|
||||||
- If you run with `cargo run --release`, it's `vaultwarden/web-vault`.
|
|
||||||
- If you run the compiled binary directly, it's next to the binary, in `vaultwarden/target/release/web-vault`.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
The available configuration options are documented in the default `.env.template` file, and they can be modified by uncommenting the desired options in that file or by setting their respective environment variables. See the Configuration section of this wiki for the main configuration options available.
|
The available configuration options are documented in the default `.env.template` file, and they can be modified by uncommenting the desired options in that file or by setting their respective environment variables. See the Configuration section of this wiki for the main configuration options available.
|
||||||
If you want to use this file you need to copy it, and name it `.env` and adjust the settings in that specific file.
|
If you want to use this file you need to copy it, and name it `.env` and adjust the settings in that specific file.
|
||||||
|
|||||||
Reference in New Issue
Block a user