Setup¶
Install a release archive to start using Docbank without a build toolchain. Docbank is pre-1.0 and runs on Linux, macOS, and 64-bit Windows, on amd64 and arm64 processors.
Requirements¶
- Linux, macOS, or 64-bit Windows on amd64 or arm64.
Installing a release archive needs no build toolchain. Building from source also requires:
- Go 1.27 or newer with CGO enabled (the store uses mattn/go-sqlite3)
- A C compiler (Xcode command-line tools on macOS,
gcc/clangon Linux, or a MinGW-compatible compiler on Windows) - Node.js 24 or newer and npm (source builds compile the embedded web application before the Go binary)
Install a release¶
Published releases include Linux, macOS, and Windows archives for amd64 and
arm64 with SHA-256 checksums. The shell and PowerShell installers select the
native archive and verify it against SHA256SUMS before installing. They stop
with an error instead of installing an incompatible or unverified archive.
On Linux or macOS, the installer puts docbank in ~/.local/bin by default:
Set DOCBANK_INSTALL_DIR to choose another destination. Set
DOCBANK_VERSION=vX.Y.Z to install a specific release rather than the latest.
On Windows, run the PowerShell installer:
It installs to %LOCALAPPDATA%\Programs\docbank\bin and adds that directory
to the user PATH. DOCBANK_INSTALL_DIR and DOCBANK_VERSION provide the
same overrides as on Unix. Set DOCBANK_NO_MODIFY_PATH=1 to leave PATH
unchanged.
The repository maintains both installers as scripts/install.sh and
scripts/install.ps1, and docbank.ai serves the same files. To fetch the
shell installer directly from GitHub instead, run:
Neither installer extracts or installs an archive unless SHA256SUMS is
available, has exactly one matching entry, and the checksum matches. Each
installer also rejects archives containing anything other than the expected
top-level executable.
Manual installation¶
- Download your platform's archive and
SHA256SUMSfrom GitHub Releases. - Verify the archive against its entry in
SHA256SUMS. - Extract the archive.
- Place
docbankon yourPATH, for example in~/.local/bin.
Release archives are named:
docbank_<version>_<goos>_<goarch>.tar.gz # Linux and macOS
docbank_<version>_windows_<goarch>.zip # Windows
Releases publish all six archives. An installer fails instead of substituting another platform. Never install an archive for a different OS or architecture.
Build and install from source¶
git clone https://github.com/kenn-io/docbank.git
cd docbank
make build # builds ./bin/docbank
make install # installs to ~/.local/bin
On Windows, use a PowerShell prompt with Go and the C compiler available:
Push-Location frontend
npm ci
npm run build
Pop-Location
Get-ChildItem internal/web/dist -Force |
Where-Object Name -ne '.keep' |
Remove-Item -Recurse -Force
Copy-Item -Recurse -Force frontend/dist/* internal/web/dist/
go build -tags fts5 -o bin/docbank.exe ./cmd/docbank
go test -tags fts5 ./...
The SQLite full-text index requires the fts5 build tag. The Makefile
targets set it for you and build the frontend first. If you invoke go
directly on Unix, prepare the embedded frontend and pass the tag yourself:
(cd frontend && npm ci && npm run build)
find internal/web/dist -mindepth 1 ! -name .keep -exec rm -rf {} +
cp -R frontend/dist/. internal/web/dist/
go build -tags fts5 -o bin/ ./cmd/docbank
go test -tags fts5 ./...
First run¶
There is no init step. The first command you run creates the vault layout
under ~/.docbank/ (database, blob directory, lock file):
Set DOCBANK_HOME to keep the vault somewhere else. See
Configuration.
Before importing irreplaceable material, choose a backup location and plan a restore test. Vault lifecycle explains the operating routine, and Backup and restore gives the commands.
Verifying the toolchain¶
Both must pass on a supported platform. If go test fails with
undefined: ...fts5... errors, the fts5 tag is missing.