How to sign an Electron app on Windows
Install the hook with npm install --save-dev github:bamboodeploy/electron-builder-bamboo-sign and set win.signtoolOptions.sign to electron-builder-bamboo-sign/sign (electron-builder 26). electron-builder then signs the app exe and the installer during the build, and the hashes in latest.yml match the signed files. If you only need the installers signed, the afterAllArtifactBuild hook is simpler.
1. Install the hook and set your API key
npm install --save-dev github:bamboodeploy/electron-builder-bamboo-sign
Create a key in the dashboard under API Keys. It starts with bd_live_. Save it for your Windows user, then open a new terminal so it sees the new variable:
setx BAMBOO_API_KEY bd_live_...
A .bamboorc file in your user folder with the line BAMBOO_API_KEY=bd_live_... works too.
2. Sign during the build
{ "build": { "win": { "signtoolOptions": { "sign": "electron-builder-bamboo-sign/sign" } } } }
That is the electron-builder 26 form; version 26 rejects win.sign. On electron-builder 25 or older use:
{ "build": { "win": { "sign": "electron-builder-bamboo-sign/sign" } } }
electron-builder calls the hook for each file it signs, the app exe and the installer included, before it writes latest.yml. The update hashes then describe the signed files, which is what electron-updater checks.
3. Or sign only the finished installers
{
"build": {
"afterAllArtifactBuild": "electron-builder-bamboo-sign",
"win": { "target": ["nsis"] }
}
}
Every .exe and .msi artifact is signed in place after the build. The app exe inside the installer stays unsigned, and with electron-updater the installer changes after latest.yml is written, so use the hook from step 2 in that case.
Set BAMBOO_SKIP=1 to build on your own machine without signing.
Electron Forge
Sign the Squirrel output after electron-forge make, in a postMake hook or a script:
npx -y github:bamboodeploy/cli#v1.2.0 sign "out/make/squirrel.windows/x64/*.exe"
Background reading: why Electron apps trip Windows Defender and SmartScreen.
Smart App Control
On Windows 11 with Smart App Control on, a blocked program has no Run anyway button. Smart App Control lets a file with a valid signature run, and it checks every exe and DLL as it loads, not only the file the user downloaded. The hook in step 2 signs the app exe as well as the installer; afterAllArtifactBuild signs only the installer.
Common errors
- electron-builder 26 stops with a configuration error about
win.sign: move it underwin.signtoolOptions. - Updates fail with a sha512 mismatch: the installer was signed after
latest.ymlwas written. Use the hook from step 2.
Otherwise the build fails with one of the CLI's exit codes:
| Exit code | Meaning | What to do |
|---|---|---|
| 1 | Bad or missing API key, file not found, or signing denied or failed | Read the printed message. Check BAMBOO_API_KEY and the file path. |
| 2 | Signing needs a Premium plan | Upgrade in the dashboard. |
| 3 | Fewer than two verified connections | Verify your email plus a domain, GitHub or similar under Connections in the dashboard. |
| 4 | Timed out waiting for the signature | The build may be waiting for review. Run the same command again once it is approved. |
FAQ
Does it handle installers over 100 MB?
Yes. A stock Electron installer is around 100 MB, and the tool switches to a direct upload for files over 95 MB, up to 650 MB.
Can I keep signing off for local builds?
Yes. Set BAMBOO_SKIP=1 and the hook skips signing, so local builds need no key.
Whose name does Windows show as the publisher?
Ours. We sign your build with our EV code signing certificate, so Windows shows our verified publisher name instead of Unknown publisher. You need no certificate, company registration or USB token of your own.
Does signing remove the SmartScreen warning at once?
Not on its own. A valid signature replaces Unknown publisher with a verified publisher, and Smart App Control lets a signed file run. SmartScreen also weighs reputation, which builds as people download and run your files, and no certificate grants it instantly, EV included. See EV certificates no longer skip SmartScreen.
What do I need before I can sign?
A Bamboo Deploy account, an API key from the dashboard, a Premium plan and two verified connections: your email plus a domain, GitHub or similar. Uploading and scanning are free.
Bamboo Deploy scans every build and signs it with our EV certificate, so you need no certificate, no company registration and no USB token of your own. Get started, or read the docs.