BLOG ON
PUBLISHED ON - 17th October, 2026 · 6 min read
PUBLISHED BY
Product Specialist
Building an Electron app is only half the job. To ship it to real users, you need to package your application, create installers for Windows and macOS, sign your releases, and deliver updates safely.
For most Electron projects, Electron Forge or electron-builder can automate much of this process. The right setup depends on whether you want a simple downloadable installer, automatic updates, or distribution through an app store.
This guide covers the complete release workflow, including Windows .exe installers, macOS .dmg files, code signing, notarization, CI/CD, and common packaging errors.
Electron does not include a complete installer and distribution workflow in its core runtime. You need an additional tool to turn your application into distributable files. Electron's packaging guide explains the available approach.
| Tool | Best for | Key advantage |
|---|---|---|
| Electron Forge | New Electron projects | Integrated packaging and distribution workflow |
| electron-builder | Custom release pipelines | Flexible installer targets, signing, and publishing |
| Electron Packager | Custom packaging workflows | Direct control over application packaging |
Which should you choose?
For this tutorial, we'll use electron-builder to demonstrate a practical Windows and macOS release pipeline.
Before packaging, make sure your application starts correctly in development and that its production files are ready.
electron-desktop-app/
src/
main.js
│ ├── preload.js
│ └── renderer/
├── build/
│ ├── icon.ico
│ └── icon.icns
├── package.json
└── package-lock.json
Your exact structure may differ if you use React, Next.js, Vite, or another frontend framework.
npm install --save-dev electron-builderEnsure your package.json contains the application entry point, a valid application name, and a version.
{
"name": "electron-desktop-app",
"version": "1.0.0",
"main": "src/main.js"
}Keep your renderer build separate from your Electron main process where appropriate, and ensure production asset paths work after packaging.
Warning
Do not package development-only servers, test credentials, private API keys, or local environment files containing secrets. Anything shipped to a desktop client should be treated as potentially inspectable.
Add a build configuration and release scripts to your package.json. The following is a starter configuration for electron-builder v26-style settings.
{
"name": "electron-desktop-app",
"version": "1.0.0",
"main": "src/main.js",
"scripts": {
"start": "electron .",
"dist:win": "electron-builder --win",
"dist:mac": "electron-builder --mac",
"dist:all": "electron-builder --win --mac"
},
"devDependencies": {
"electron": "^YOUR_INSTALLED_ELECTRON_VERSION",
"electron-builder": "^26.0.0"
},
"build": {
"appId": "com.example.desktopapp",
"productName": "Desktop App",
"directories": {
"output": "release"
},
"files": [
"src/**/*",
"package.json"
],
"win": {
"target": ["nsis"],
"icon": "build/icon.ico"
},
"mac": {
"target": ["dmg", "zip"],
"icon": "build/icon.icns"
}
}
}Replace the Electron version placeholder with the version already installed in your project. Adjust files to include all production assets, dependencies, and built renderer files your app requires.
The appId should be a stable, reverse-domain identifier for your product. The productName controls the display name used in the packaged application.
Refer to the electron-builder Windows documentation and macOS documentation for additional target and configuration options.
npm run dist:winrelease/
└── Desktop App Setup 1.0.0.exeThe exact filename depends on your configuration.
For most desktop applications distributed directly from a website, NSIS is a useful default. It supports a familiar installation experience, including choosing an installation location and creating shortcuts.
Before releasing the installer, test it on a clean Windows machine or virtual machine.
An installer is generally preferable for production applications because it can create shortcuts and manage installation and uninstallation. A portable build may be useful for users who do not want a traditional installation, but it can require additional decisions about updates and data storage.
npm run dist:macrelease/
├── Desktop App-1.0.0.dmg
└── Desktop App-1.0.0-mac.zipA .dmg file is a common format for direct macOS distribution. Users open the disk image and typically drag the app into their Applications folder.
A .zip archive is useful for direct downloads and certain update workflows.
Important: Creating a DMG does not automatically make your app trusted by macOS. For a public release outside the Mac App Store, you should code-sign the application and complete Apple's notarization process. These steps are covered in the next section.
Code signing establishes the publisher's identity and helps operating systems verify that an application has not been tampered with. Apple's notarization service performs additional automated security checks on software distributed outside its store. Electron's code-signing guide explains the distinction.
| Requirement | Windows | macOS direct distribution |
|---|---|---|
| Code signing | Strongly recommended | Expected for a smooth installation experience |
| Notarization | Not applicable | Required for normal distribution to modern macOS users |
| Typical credentials | Windows signing certificate | Apple Developer ID Application certificate |
| Main purpose | Identify the publisher and verify integrity | Establish trust and pass Gatekeeper checks |
Obtain a suitable Windows code-signing certificate and configure electron-builder to use it. Keep the certificate and password in your CI/CD secret store rather than committing them to source control.
WIN_CSC_LINK=/secure/path/windows-certificate.pfx
WIN_CSC_KEY_PASSWORD=your-certificate-passwordThese are example environment variable names, not values to publish. Use your actual secret-management configuration and follow the signing method supported by your electron-builder version.
For direct distribution, you'll generally need an Apple Developer Program membership, a Developer ID Application certificate, and credentials for notarization.
CSC_LINK=/secure/path/mac-certificate.p12
CSC_KEY_PASSWORD=your-certificate-password
APPLE_ID=developer@example.com
APPLE_APP_SPECIFIC_PASSWORD=your-app-specific-password
APPLE_TEAM_ID=YOUR_TEAM_IDFor automated releases, an App Store Connect API key is another supported notarization authentication method. Configure the appropriate credentials and signing settings for your build tool.
Never commit certificates, passwords, API keys, or private signing material to your repository. Store them as protected CI/CD secrets and restrict access.
See Apple's notarization documentation for the official requirements.
Important
An unsigned build can be useful for internal testing, but it is not the ideal production release. Signing and notarization should be planned before distributing your app to customers.
Building both platforms manually for every release becomes repetitive and error-prone. A CI/CD pipeline can install dependencies, run tests, package the application, sign the release, and upload the resulting files.
For reliable releases, use Windows and macOS runners where appropriate. Cross-platform packaging can be possible in some configurations, but native runners make platform-specific signing, testing, and troubleshooting more predictable.
Store release artifacts in a controlled location, such as your download server or a release repository. Publish only after validation succeeds.
For teams that need to distribute updates after launch, see Electron's distribution overview and application updating guide.
A successful build only confirms that the packaging process completed. It does not prove that the application works correctly on a customer's computer.
Test on the architectures you intend to support, such as Windows x64 and macOS Apple Silicon. If you also support Intel Macs, build and test that target explicitly.
| Problem | Likely cause | What to check |
|---|---|---|
| App opens in development but fails after packaging | Incorrect asset paths or missing files | Production paths and the files configuration |
| macOS reports an unidentified developer | Missing or unsuitable signing | Developer ID signing and notarization |
| Windows shows an unknown publisher | Installer is unsigned or lacks established reputation | Certificate configuration and signature |
| Native module fails at runtime | Module was built for an incompatible Electron ABI or architecture | Rebuild the native dependency for the target Electron version |
| Installer works locally but not on another machine | Missing dependency, permissions issue, or environment assumption | Clean-machine testing and runtime logs |
| Update fails | Incorrect update feed, version metadata, or signing setup | Update configuration and published artifacts |
How do I create an EXE file from an Electron app?
Configure electron-builder or Electron Forge with a Windows target, then run the appropriate packaging command. With the example above, use npm run dist:win to generate a Windows installer.
How do I package an Electron app for macOS?
Build the macOS target and generate a .dmg or .zip distributable. For public distribution outside the Mac App Store, configure code signing and notarization.
Can I build Windows and macOS installers on one computer?
Some cross-platform build combinations are supported, but signing and native dependencies can complicate the process. Separate Windows and macOS CI runners are a dependable choice for production releases.
Is Electron Forge better than electron-builder?
Neither is universally better. Forge provides an integrated workflow aligned with Electron's official documentation, while electron-builder offers a flexible configuration system for installers and release distribution. Choose based on your build targets and release requirements.
How do Electron apps receive automatic updates?
You need an update mechanism, a suitable publishing location, and correctly versioned release artifacts. Electron's update options depend on your operating systems and distribution format. Plan signing and update verification as part of the release architecture.
Does packaging an Electron app protect its source code?
Packaging bundles application files, and ASAR archives can organize those files, but neither is a reliable way to hide secrets or make client-side code impossible to inspect. Keep sensitive business logic and credentials on trusted backend services.
How much does it cost to distribute an Electron app?
Packaging tools can be free, but production distribution may involve code-signing certificates, Apple Developer Program membership, CI runners, hosting, update infrastructure, and ongoing maintenance. Actual costs depend on your distribution model and security requirements.
Packaging is only one part of shipping a reliable desktop application. A production-ready release also needs secure architecture, platform-specific testing, signing, update handling, and a maintainable delivery pipeline.
At Software Studio Pro, we help businesses build custom web, desktop, and mobile software with a focus on production readiness, performance, and long-term maintainability.
Explore our custom software development services to discuss your desktop application or release pipeline.
Ready to bring your business idea to life? Contact us today and let's build something amazing together!
Contact Us
Electron vs Tauri: Which Is Better for Desktop App Development in 2026?
Published on - 17th October, 2026
POS Development Cost in India: A Practical Pricing Guide for 2026
Published on - 10th October, 2026
LMS Development Cost in India: A Practical Pricing Guide for 2026
Published on - 9th October, 2026
Custom LMS vs Moodle: Which Is Better for Your Business?
Published on - 9th October, 2026
Custom CRM vs Zoho CRM: Which Is Better for Your Business?
Published on - 8th October, 2026