Skip to main content

Installation

This guide walks you through cloning the Bitwarden Clients repository and installing all necessary dependencies.

Prerequisites

Before starting, ensure you have the required software installed:
  • Node.js: >= 22.12.0 (installation guide)
  • npm: ~10 (comes with Node.js)
  • Git: Any recent version
See the requirements page for detailed installation instructions.

Clone the repository

1

Choose your clone method

Clone via HTTPS or SSH based on your GitHub authentication preference:
2

Verify repository structure

Check that the repository cloned successfully:
You should see:

Install dependencies

The repository uses npm workspaces to manage dependencies across all applications and libraries.

Root installation

Always run npm install from the repository root, not from individual app directories.
This command:
  1. Installs all root dependencies from package.json
  2. Installs dependencies for all workspace packages (apps/*, libs/**/*)
  3. Creates a single node_modules at the root with hoisted dependencies
  4. Links workspace packages together
  5. Runs the prepare script (sets up Husky git hooks)

Installation output

The installation process will:
Downloads ~1.5 GB of dependencies:

Platform-specific post-install

Some applications require additional setup after npm install:
The desktop app requires rebuilding native modules for Electron:
This runs automatically when you npm install in the desktop directory, but you may need to run it manually after:
  • Updating Electron version
  • Switching Node.js versions
  • Installing new native dependencies
For macOS native modules:

Workspace structure

After installation, your workspace will have this structure:

Verify installation

Run these commands to ensure everything is set up correctly:

Using Node Version Manager (nvm)

If you use nvm, the repository includes an .nvmrc file:

Troubleshooting

Installation fails with permission errors

Never use sudo npm install. This can cause permission issues.
Solution: Configure npm to install global packages in your home directory:

Node version mismatch

Native module build failures

On Windows:
On macOS:
On Linux:

Husky hooks not working

If git hooks aren’t running:

Disk space issues

The full installation requires ~10 GB of disk space. If you’re low on space:

Package lock conflicts

If you encounter package-lock.json conflicts after pulling updates:
This should be a last resort. Usually npm install will automatically resolve lock file issues.

Next steps

Now that you’ve installed the repository:
1

Build an application

Follow the building guide to compile and run applications
2

Run tests

Verify your setup by running the test suite:
3

Start developing

Check out the contributing guide to learn the development workflow

Additional resources

Requirements

Review detailed system requirements

Building

Build and run applications

Architecture

Understand the monorepo structure

Contributing

Learn the development workflow