mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2025-12-20 23:36:44 +00:00
Compare commits
3 Commits
0e34e638b0
...
lite
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
389be8cea8 | ||
|
|
f6d7470ce8 | ||
|
|
9bc010cb57 |
19
.editorconfig
Normal file
19
.editorconfig
Normal file
@@ -0,0 +1,19 @@
|
||||
root=true
|
||||
|
||||
###############################
|
||||
# Core EditorConfig Options #
|
||||
###############################
|
||||
# All files
|
||||
[*]
|
||||
indent_style=tab
|
||||
indent_size=4
|
||||
trim_trailing_whitespace=true
|
||||
end_of_line=lf
|
||||
charset=utf-8
|
||||
|
||||
[*.{cs}]
|
||||
insert_final_newline=false
|
||||
|
||||
[*.{md,mkdn}]
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text eol=lf
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,3 +9,4 @@ src/bitBetter/.vs/*
|
||||
*.pfx
|
||||
*.cer
|
||||
*.vsidx
|
||||
.DS_Store
|
||||
|
||||
25
README.md
25
README.md
@@ -1,12 +1,14 @@
|
||||
# BitBetter
|
||||
# BitBetter lite
|
||||
|
||||
BitBetter is is a tool to modify Bitwarden's core dll to allow you to generate your own individual and organisation licenses.
|
||||
|
||||
Please see the FAQ below for details on why this software was created.
|
||||
|
||||
_Beware! BitBetter does some semi janky stuff to rewrite the bitwarden core dll and allow the installation of a self signed certificate. Use at your own risk!_
|
||||
Be aware that this branch is **only** for the lite (formerly unified) version of bitwarden. It has been rewritten and works in different ways than the master branch.
|
||||
|
||||
Credit to https://github.com/h44z/BitBetter and https://github.com/jakeswenson/BitBetter
|
||||
_Beware! BitBetter is a solution that generates a personal certificate and uses that to generate custom licences. This requires (automated) modifying of libraries. Use at your own risk!_
|
||||
|
||||
Credit to https://github.com/h44z/BitBetter and https://github.com/jakeswenson/BitBetter and https://github.com/GieltjE/BitBetter
|
||||
|
||||
# Table of Contents
|
||||
- [BitBetter](#bitbetter)
|
||||
@@ -30,7 +32,7 @@ The following instructions are for unix-based systems (Linux, BSD, macOS) and Wi
|
||||
## Dependencies
|
||||
Aside from docker, which you also need for Bitwarden, BitBetter requires the following:
|
||||
|
||||
* Bitwarden (tested with 1.47.1, might work on lower versions)
|
||||
* Bitwarden (tested with 2025.11.1 might work on lower versions), for safety always stay up to date
|
||||
* openssl (probably already installed on most Linux or WSL systems, any version should work, on Windows it will be auto installed using winget)
|
||||
|
||||
## Setting up BitBetter
|
||||
@@ -63,14 +65,14 @@ The scripts supports running and patching multi instances.
|
||||
Edit the .servers/serverlist.txt file and fill in the missing values, they can be replaced with existing installation values.
|
||||
This file may be empty, but there will be no containers will be spun up automatically.
|
||||
|
||||
Now it is time to **run the main build script** to generate a modified version of the `ghcr.io/bitwarden/self-host` docker image and the license generator.
|
||||
Now it is time to **run the main build script** to generate a modified version of the `ghcr.io/bitwarden/lite` docker image and the license generator.
|
||||
|
||||
From the BitBetter directory, simply run:
|
||||
```
|
||||
./build.[sh|ps1]
|
||||
```
|
||||
|
||||
This will create a new self-signed certificate in the `.keys` directory if one does not already exist and then create a modified version of the official `ghcr.io/bitwarden/self-host` image called `bitwarden-patched`.
|
||||
This will create a new self-signed certificate in the `.keys` directory if one does not already exist and then create a modified version of the official `ghcr.io/bitwarden/lite` image called `bitwarden-patched`.
|
||||
|
||||
Afterwards it will automatically generate the license generator and start all previously specified containers which are **now ready to accept self-issued licenses.**
|
||||
|
||||
@@ -100,7 +102,7 @@ If you ran the build script, you can **simply run the license gen in interactive
|
||||
|
||||
## Migrating from mssql to a real database
|
||||
|
||||
Prepare a new database and bwdata directory, download and prepare the new settings.env (https://raw.githubusercontent.com/bitwarden/self-host/refs/heads/main/docker-unified/settings.env)
|
||||
Prepare a new database and bwdata directory, download and prepare the new settings.env (https://raw.githubusercontent.com/bitwarden/self-host/refs/heads/main/bitwarden-lite/settings.env)
|
||||
|
||||
Make sure you can get the data from either the backup file or by connecting directly to the mssql database (navicat has a trial).
|
||||
|
||||
@@ -156,6 +158,15 @@ docker exec bitwarden ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
|
||||
|
||||
Require a recreation of the docker container, build.sh will suffice too.
|
||||
|
||||
## Migrating from the old unified branch
|
||||
|
||||
```
|
||||
git branch -m unified lite
|
||||
git fetch origin
|
||||
git branch -u origin/lite lite
|
||||
git remote set-head origin -a
|
||||
```
|
||||
|
||||
# Footnotes
|
||||
|
||||
<a name="#f1"><sup>1</sup></a>This tool builds on top of the `bitbetter/api` container image so make sure you've built that above using the root `./build.sh` script.
|
||||
|
||||
10
build.ps1
10
build.ps1
@@ -4,6 +4,10 @@ $PSNativeCommandUseErrorActionPreference = $true
|
||||
# detect buildx, ErrorActionPreference will ensure the script stops execution if not found
|
||||
docker buildx version
|
||||
|
||||
# Enable BuildKit for better build experience and to ensure platform args are populated
|
||||
$env:DOCKER_BUILDKIT=1
|
||||
$env:COMPOSE_DOCKER_CLI_BUILD=1
|
||||
|
||||
# define temporary directory
|
||||
$tempdirectory = "$pwd\temp"
|
||||
# define services to patch
|
||||
@@ -53,11 +57,11 @@ foreach ($instance in $oldinstances) {
|
||||
|
||||
# update bitwarden itself
|
||||
if ($args[0] -eq 'update') {
|
||||
docker pull ghcr.io/bitwarden/self-host:beta
|
||||
docker pull ghcr.io/bitwarden/lite:latest
|
||||
} else {
|
||||
$confirmation = Read-Host "Update (or get) bitwarden source container (y/n)"
|
||||
if ($confirmation -eq 'y') {
|
||||
docker pull ghcr.io/bitwarden/self-host:beta
|
||||
docker pull ghcr.io/bitwarden/lite:latest
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +84,7 @@ foreach ($instance in $oldinstances) {
|
||||
}
|
||||
|
||||
# start a new bitwarden instance so we can patch it
|
||||
$patchinstance = docker run -d --name bitwarden-extract ghcr.io/bitwarden/self-host:beta
|
||||
$patchinstance = docker run -d --name bitwarden-extract ghcr.io/bitwarden/lite:latest
|
||||
|
||||
# create our temporary directory
|
||||
New-item -ItemType Directory -Path $tempdirectory
|
||||
|
||||
10
build.sh
10
build.sh
@@ -4,6 +4,10 @@ set -e
|
||||
# detect buildx, set -e will ensure the script stops execution if not found
|
||||
docker buildx version
|
||||
|
||||
# Enable BuildKit for better build experience and to ensure platform args are populated
|
||||
export DOCKER_BUILDKIT=1
|
||||
export COMPOSE_DOCKER_CLI_BUILD=1
|
||||
|
||||
# define temporary directory
|
||||
TEMPDIRECTORY="$PWD/temp"
|
||||
|
||||
@@ -54,11 +58,11 @@ done
|
||||
|
||||
# update bitwarden itself
|
||||
if [ "$1" = "update" ]; then
|
||||
docker pull ghcr.io/bitwarden/self-host:beta
|
||||
docker pull ghcr.io/bitwarden/lite:latest
|
||||
else
|
||||
read -p "Update (or get) bitwarden source container (y/n): "
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
docker pull ghcr.io/bitwarden/self-host:beta
|
||||
docker pull ghcr.io/bitwarden/lite:latest
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -81,7 +85,7 @@ for INSTANCE in ${OLDINSTANCES[@]}; do
|
||||
done
|
||||
|
||||
# start a new bitwarden instance so we can patch it
|
||||
PATCHINSTANCE=$(docker run -d --name bitwarden-extract ghcr.io/bitwarden/self-host:beta)
|
||||
PATCHINSTANCE=$(docker run -d --name bitwarden-extract ghcr.io/bitwarden/lite:latest)
|
||||
|
||||
# create our temporary directory
|
||||
mkdir $TEMPDIRECTORY
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM ghcr.io/bitwarden/self-host:beta
|
||||
FROM ghcr.io/bitwarden/lite:latest
|
||||
|
||||
COPY ./temp/ /app/
|
||||
Reference in New Issue
Block a user