Comsos
October 8, 2021, 4:33pm
1
Hey !
All is in the title. Can i install VaultWarden without Docker ? In a LXC container.
cksapp
October 8, 2021, 6:09pm
2
If wanting to install without running in docker you could try either using the pre-built binaries or compiling your own. This should work in an LXC container but I have not personal tried this.
1 Like
Currently I am running Debian 11 LXC with Vaultwarden.
I have used the following Gist as a basis (Thanks to Tavinus):
deb10bitwardenInstall.md
# Bitwarden RS Debian 10 Install
This is how I installed the [Rust implementation of bitwarden](https://github.com/dani-garcia/bitwarden_rs) into a Proxmox Debian 10 LXC Container. It should work on any Debian 10 install (virtual or metal). I dislike running docker inside LXC containers for obvious reasons, so this is how I did it.
## References
- https://www.reddit.com/r/Bitwarden/comments/dg78bi/building_selfhosted_bitwarden_via_bitwarden_rs/
- https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary
## Prepare Base System
```bash
$ sudo apt update
This file has been truncated. show original
I have forked the Gist with my previous Debian 10 LXC installation.
Currently replaced this with Debian 11 LXC and used the building commands for Rust and Node from Vaultwarden Wiki (Vaultwarden and Web).
Only for Web the build fails (both Debian 10 or 11) with the latest Web version. I also noticed this issue with docker builds?
Comsos
October 11, 2021, 10:36am
4
The solution of cksapp has answer my question but thanks anyway.
After that, maybe that’s a question you’re asking?
Cool that the question is answered.
Just for your information:
With the latest Web build I had issues with building the web part, similar as with the following two issues:
opened 07:28PM - 30 Sep 21 UTC
Attempting to build from latest Dockerfile:
$ docker build -t bw_vault .
S… ending build context to Docker daemon 580.6kB
Step 1/22 : FROM node:14-buster as build
---> a7e633305d89
Step 2/22 : RUN npm -g install npm@7
---> Using cache
---> e86ef39a2a17
Step 3/22 : RUN mkdir /vault
---> Using cache
---> fa61b7d8728b
Step 4/22 : RUN chown node:node /vault
---> Using cache
---> f46ed9c7b784
Step 5/22 : USER node
---> Using cache
---> c5bddec0ae90
Step 6/22 : ARG VAULT_VERSION=cfa3d81cf87ed59c471021608b9b922023c825f1
---> Using cache
---> 37f4e1b73dc0
Step 7/22 : RUN git clone https://github.com/bitwarden/web.git /vault
---> Using cache
---> 36ee9217445d
Step 8/22 : WORKDIR /vault
---> Using cache
---> ff911c5bf6f1
Step 9/22 : RUN git checkout "$VAULT_VERSION" && git submodule update --recursive --init
---> Using cache
---> a5430c6f312b
Step 10/22 : COPY --chown=node:node patches /patches
---> 6ca610ae163e
Step 11/22 : COPY --chown=node:node apply_patches.sh /apply_patches.sh
---> 3b015d86dc25
Step 12/22 : RUN bash /apply_patches.sh
---> Running in 3205e3cb2835
Patch file not found, using latest
Using patch: v2.23.0.patch
Patching successful!
Removing intermediate container 3205e3cb2835
---> f1bdf90e33fc
Step 13/22 : RUN npm ci
---> Running in a747aac0f50d
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
> bitwarden-web@2.23.0 preinstall
> npm run sub:init
> bitwarden-web@2.23.0 sub:init
> git submodule update --init --recursive
added 1265 packages, and audited 1268 packages in 39s
78 packages are looking for funding
run `npm fund` for details
15 vulnerabilities (3 low, 11 moderate, 1 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Removing intermediate container a747aac0f50d
---> bc8b334eb087
Step 14/22 : RUN npm audit fix || true
---> Running in 1c214e2573d8
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @ngtools/webpack@11.2.13
npm ERR! Found: webpack@4.46.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^4.46.0" from the root project
npm ERR! peer webpack@"^4.0.0" from @ngtools/webpack@11.2.13
npm ERR! node_modules/@ngtools/webpack
npm ERR! dev @ngtools/webpack@"^11.2.10" from the root project
npm ERR! 16 more (@webpack-cli/configtest, clean-webpack-plugin, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.0.0" from @ngtools/webpack@11.2.13
npm ERR! node_modules/@ngtools/webpack
npm ERR! dev @ngtools/webpack@"^11.2.10" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@4.43.0
npm ERR! node_modules/webpack
npm ERR! peer webpack@"^4.0.0" from @ngtools/webpack@11.2.13
npm ERR! node_modules/@ngtools/webpack
npm ERR! dev @ngtools/webpack@"^11.2.10" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/node/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2021-09-30T19_21_29_128Z-debug.log
Removing intermediate container 1c214e2573d8
---> a5f8e3d49bfb
Step 15/22 : RUN npm run dist
---> Running in fe95a93783c9
> bitwarden-web@2.23.0 dist
> npm run build:cloud && gulp postdist
> bitwarden-web@2.23.0 build:cloud
> cross-env NODE_ENV=production ENV=cloud npm run build
> bitwarden-web@2.23.0 build
> gulp prebuild && webpack -c bitwarden_license/webpack.config.js
[19:21:37] Using gulpfile /vault/gulpfile.js
[19:21:37] Starting 'prebuild'...
[19:21:37] Starting 'clean'...
[19:21:37] Finished 'clean' after 9.9 ms
[19:21:37] Starting 'webfonts'...
[19:21:37] 'webfonts' errored after 243 ms
[19:21:37] TypeError: Cannot read property 'match' of undefined
at formatData (/vault/node_modules/gulp-google-webfonts/index.js:251:20)
at extractData (/vault/node_modules/gulp-google-webfonts/index.js:246:23)
at parseCss (/vault/node_modules/gulp-google-webfonts/index.js:228:19)
at fn (/vault/node_modules/gulp-google-webfonts/node_modules/async/lib/async.js:638:34)
at Immediate.<anonymous> (/vault/node_modules/gulp-google-webfonts/node_modules/async/lib/async.js:554:34)
at processImmediate (internal/timers.js:464:21)
at process.topLevelDomainCallback (domain.js:152:15)
at process.callbackTrampoline (internal/async_hooks.js:128:24)
[19:21:37] 'prebuild' errored after 255 ms
The command '/bin/sh -c npm run dist' returned a non-zero code: 1
Previous version build just fine. Thanks!
opened 02:47PM - 01 Oct 21 UTC
Building the webvault in Docker fails with:
```
> bitwarden-web@2.23.0 build
… > gulp prebuild && webpack -c bitwarden_license/webpack.config.js
[14:40:12] Using gulpfile /vault/gulpfile.js
[14:40:12] Starting 'prebuild'...
[14:40:12] Starting 'clean'...
[14:40:12] Finished 'clean' after 4.94 ms
[14:40:12] Starting 'webfonts'...
[14:40:13] 'webfonts' errored after 99 ms
[14:40:13] TypeError: Cannot read property 'match' of undefined
at formatData (/vault/node_modules/gulp-google-webfonts/index.js:251:20)
at extractData (/vault/node_modules/gulp-google-webfonts/index.js:246:23)
at parseCss (/vault/node_modules/gulp-google-webfonts/index.js:228:19)
at fn (/vault/node_modules/gulp-google-webfonts/node_modules/async/lib/async.js:638:34)
at Immediate.<anonymous> (/vault/node_modules/gulp-google-webfonts/node_modules/async/lib/async.js:554:34)
at processImmediate (internal/timers.js:464:21)
at process.topLevelDomainCallback (domain.js:152:15)
at process.callbackTrampoline (internal/async_hooks.js:128:24)
[14:40:13] 'prebuild' errored after 105 ms
```
As a workaround I just grabbed the compiled version of the web vault which works ok.
There seems to be an api change at google regarding the fonts it embeds/downloads.
It is fixed in the master release of bitwarden/web, but not new version yet.
I think we should wait a bit
1 Like