Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Windows Build Setup

Install Prereqs



  • git for windows

    • Select "Use Git and optional Unix tools from the Command Prompt" (so scripts with rm will work)
    • Checkout as-is, conmmit Unix style line endings
    • Use Windows' default console window (especially on Windows 10)
  • Open a command console and make a directory for cloning the repo, e.g.:

git clone c:\work\src\\keybase\client
git clone c:\work\src\\keybase\go-updater

Build Service, Etc

  • set GOPATH, e.g. set GOPATH=c:\work
  • cd %GOPATH%\src\\keybase\client\go\keybase
  • go build



> nvm install latest
> nvm use [version]


npm should be in your path from the previous step. Then:

> npm i -g yarn


  • GCC via Mingw-64 (for building kbfsdokan)
    • Be sure and choose architecture x86-64, NOT i686
    • Also recommend not installing in program files
      • Try C:\mingw-w64\.... instead


GCC via Mingw-64 (for building kbfsdokan)

  • Be sure and choose architecture x86-64, NOT i686
  • Also recommend not installing in program files, e.g. C:\mingw-w64\... instead of C:\Program Files (x86)\mingw-w64\...


set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
set CC=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gcc
set CPATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\include

Building Installers

  • Visual Studio 2015 Professional (may require account)

  • Environment:

    • call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
    • .net 3.5.1 (needed for WIX)
    • WIX tools 3.11.1 (needed to build the installer)
    • Codesigning: see /keybase/team/

Building a debug installer without codesigning

  • Environment:

  • Invoke the scripts to build the executables:

doinstaller_wix.cmd debug
  • OR, there's a little script that combines the above:

    • .\build_debug_installer.cmd
  • Make sure you restart CMD.exe after doing the above installs; otherwise, these scripts won't be able to find WIX.

Production CMD Scripts

  • build_prerelease.cmd builds most of the client executables
  • buildui.cmd builds the ui
  • doinstaller_wix.cmd does codesigning on all the executabls and builds the installer (requires signing certificate)
  • dorelease.cmd calls the above scripts and copies to s3. Invoked by the build bot.

Upgrading Dokan

Download DokanSetup_redist.exe from Upload to S3 at[VERSION]/DokanSetup_redist.exe Get the sha1 hash of DokanSetup_redist.exe: powershell Get-FileHash -Algorithm sha1 DokanSetup_redist.exe Set the hash and version numbers in the installer project file: Change the version the service considers new enough: Optional: change the minimum version KBFS will work with:

Windows VMs

  • available here
  • full isos here, which might need product keys

Might be Useful...

  • Chocolatey (helpful for yarn)
    • then: choco install yarn

Installed Product Layout and Functionality

The installer places/updates all the files and adds:

  • startup shortcut for
  • start menu shortcut
  • background tile color

The service is invoked by the GUI with this command: [INSTALLFOLDER]\keybaserq.exe keybase.exe --log-format=file --log-prefix="[INSTALLFOLDER]watchdog." ctl watchdog2 This starts a copy of keybase.exe in watchdog mode, which in turn runs the service and kbfs processes, restarting them if they die or are killed. If the service is closed with keybase ctl stop, which the GUI does when the widtget menu is used, the watchdog will see a different exit code and not restart the processes.

keybaserq.exe has 2 main jobs: de-elevating permissions to run as current user, and running Keybase invisibly, without the CMD window appearing, since it is a console program.

Notable executables DokanSetup_redist.exe - Dokan driver package, invoked from files tab in GUI git-remote-keybase.exe - GIT helper kbfsdokan.exe - kbfs kbnm.exe - browser extension keybase.exe - service keybase.rq.exe - quiet launcher and de-elevator prompter.exe - updater GUI upd.exe - updater Gui\Keybase.exe - GUI

You can’t perform that action at this time.