Skip to main content

Electron Forge Integration

electron-builder ships four Electron Forge maker packages that let you produce electron-builder targets from a Forge project without migrating your entire build pipeline.

Consider using electron-builder directly

Publishing, Auto Update, and Code Signing are only available when using electron-builder as your primary build tool. If you need any of those features, migrate fully to electron-builder rather than using these makers.

How it works

Each maker is a thin wrapper around buildForge() from app-builder-lib. When Electron Forge calls make, the maker delegates to electron-builder's full packaging pipeline for that target, then returns the paths to the produced artifacts. All electron-builder configuration options for the target are available via the maker's config key.

Available makers

PackageTargetPlatform
electron-forge-maker-nsisNSIS installer (.exe)Windows
electron-forge-maker-nsis-webWeb installer (.exe, downloads payload at install time)Windows
electron-forge-maker-appimageAppImage (.AppImage)Linux
electron-forge-maker-snapSnap package (.snap)Linux

NSIS installer

npm install --save-dev electron-forge-maker-nsis
forge.config.js
const { MakerNsis } = require("electron-forge-maker-nsis")

module.exports = {
makers: [
new MakerNsis({
// All NsisOptions are accepted here — see /docs/nsis for the full reference
oneClick: false,
perMachine: true,
}),
],
}

Full configuration reference: NSIS


NSIS web installer

npm install --save-dev electron-forge-maker-nsis-web
forge.config.js
const { MakerNsisWeb } = require("electron-forge-maker-nsis-web")

module.exports = {
makers: [
new MakerNsisWeb({
// NsisWebOptions — extends NsisOptions
}),
],
}

The web installer produces a small stub executable that detects the user's architecture and downloads the appropriate payload from your publish provider at install time. Full configuration reference: NSIS


AppImage

npm install --save-dev electron-forge-maker-appimage
forge.config.js
const { MakerAppImage } = require("electron-forge-maker-appimage")

module.exports = {
makers: [
new MakerAppImage({
// AppImageOptions — see /docs/appimage for the full reference
license: "LICENSE",
}),
],
}

Full configuration reference: AppImage


Snap

npm install --save-dev electron-forge-maker-snap
forge.config.js
const { MakerSnap } = require("electron-forge-maker-snap")

module.exports = {
makers: [
new MakerSnap({
// SnapOptions — see /docs/snap for the full reference
confinement: "strict",
grade: "stable",
}),
],
}

Full configuration reference: Snap


Limitations

These makers delegate to electron-builder's packaging only. The following electron-builder features are not available through Forge makers:

  • Publishing — use electron-builder --publish directly
  • Auto Update — requires electron-builder's full publish pipeline; see Auto Update
  • Code Signing — requires electron-builder's signing configuration; see Code Signing

For projects that need any of these, the recommended path is to use electron-builder as the primary build tool instead of Electron Forge.