This guide covers how to build each Bitwarden client application, including development builds, production builds, and watch mode for active development.
Before building, ensure you’ve completed the installation steps and have all dependencies installed.
For active development, use watch mode to automatically rebuild on file changes:
cd apps/browser# Watch mode for Chromenpm run build:watch:chrome# Watch mode for Firefoxnpm run build:watch:firefox# Watch mode for Safarinpm run build:watch:safari
After the extension rebuilds, you’ll need to reload it in your browser (click the reload button in the extensions page).
cd apps/browser# Production build for Chromenpm run build:prod:chrome# Production build for Firefoxnpm run build:prod:firefox# Production build for Safarinpm run build:prod:safari
cd apps/browser# Create .zip for Chrome Web Storenpm run dist:chrome# Output: apps/browser/dist/dist-chrome.zip# Create .zip for Firefox Add-onsnpm run dist:firefox# Output: apps/browser/dist/dist-firefox.zip# Package Safari extensionnpm run dist:safari
For active development, run watch mode in separate terminals:
# Terminal 1: Watch main processcd apps/desktopnpm run build:main:watch# Terminal 2: Watch renderer processnpm run build:renderer:watch# Terminal 3: Watch preload scriptsnpm run build:preload:watch# Terminal 4: Run Electron with auto-reloadnpm run electron
The desktop app uses electron-reload to automatically restart when files change.
cd apps/desktop# Build installer and portablenpm run dist:win# Output:# - apps/desktop/dist/Bitwarden-Setup-{version}.exe# - apps/desktop/dist/Bitwarden-Portable-{version}.exe
Creates installers for x64, x86, and ARM64.
cd apps/desktop# Build universal .dmgnpm run dist:mac# Output:# - apps/desktop/dist/Bitwarden-{version}-universal.dmg# With macOS extension (autofill)npm run pack:mac:with-extension# For Mac App Storenpm run dist:mac:mas
Creates universal binaries (x64 + ARM64).
cd apps/desktop# Build AppImage, .deb, snapnpm run dist:lin# Output:# - apps/desktop/dist/Bitwarden-{version}-x64.AppImage# - apps/desktop/dist/bitwarden_{version}_amd64.deb# - apps/desktop/dist/bitwarden_{version}_amd64.snap# ARM64 buildnpm run dist:lin:arm64
Create standalone binaries with no Node.js requirement:
Windows
macOS
Linux
cd apps/clinpm run dist:oss:win# Output: apps/cli/dist/oss/windows/bw.exe
Creates a standalone .exe (x64).
cd apps/cli# x64 buildnpm run dist:oss:mac# Output: apps/cli/dist/oss/macos/bw# ARM64 buildnpm run dist:oss:mac-arm64# Output: apps/cli/dist/oss/macos-arm64/bw
cd apps/cli# x64 buildnpm run dist:oss:lin# Output: apps/cli/dist/oss/linux/bw# ARM64 buildnpm run dist:oss:lin-arm64# Output: apps/cli/dist/oss/linux-arm64/bw
Native executables are created using @yao-pkg/pkg.