Prerequisites
Before you begin, ensure you have:- A working electron-builder configuration
- Your application built at least once
- Basic familiarity with command-line tools
Step 1: Download and Install Minio
Minio is a locally runnable server that implements the S3 protocol. Download both the server and client from min.io/download. Place both executables in a directory (we’ll refer to this asminio-home). Your directory should look like this:
Step 2: Create and Configure a Bucket
Create the Data Directory and Bucket
Run the following commands inminio-home:
Start the Minio Server
Start the server with the default credentials:Access the Web Client
Open your browser and navigate to http://127.0.0.1:9000. Log in with the default credentials.Set Bucket Permissions
Add a read policy on the bucket:- Access the web client
- Go to the bucket settings
- Add a
*Read Onlypolicy
Step 3: Publish the Updates
Initial Build
First, build the application once so you don’t have to wait for a build every time:Set Environment Variables
Ensure yourAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables are set:
Configure Publish Command
Modify your publish command to point to the local Minio server. For example, if you have a command namedpublish:prod:
package.json
Update Version Number
Go into yourpackage.json file and update the version number to something higher than the current version:
package.json
Updating the version number is important for a new update to be detected.
Publish to Minio
Run your publish command:Verify Upload
Go to the web client at http://127.0.0.1:9000. You should see:- The executable file
- Corresponding blockmap file
- A
latest.ymlfile
Step 4: Install and Test
Install the Application
Install the built application from your output directory (default isdist):
- Locate the installer in your
distdirectory - Run the installer
- Complete the installation process
Start and Monitor
Start the application and check the log output to monitor the update process.Log Locations
- How far the update process has progressed
- At what step the update fails (if it does)
Successful Update
If your update flow is correct, you should see an update notification as normal.Debugging Tips
Enable Logging
Ensure you have logging enabled in your application:Force Dev Update Config
During development, you may need to create adev-app-update.yml file in the root of your project:
dev-app-update.yml
Common Issues
AppImage Environment Variable
If you see this error in logs:Alternative: Using Amazon S3
While Minio is great for local testing, you can also use actual Amazon S3 for testing:- Create an S3 bucket
- Configure bucket permissions for public read access
- Set your AWS credentials
- Use the S3 bucket URL in your publish configuration
Best Practices
Test the complete flow - Always test the full update cycle from check → download → install
Test on actual hardware - Test on the actual platforms you’re targeting
Test version upgrades - Test both minor and major version upgrades
Monitor logs - Always check the logs to understand what’s happening
Test rollbacks - If using channels, test downgrading between channels
Example Update Flow
Here’s a typical test scenario:- Build and install version 1.0.0 locally
- Update
package.jsonto version 1.0.1 - Build and publish to Minio
- Launch the installed 1.0.0 application
- Verify the update is detected
- Verify the update downloads
- Verify the update installs correctly
- Verify the application launches with the new version
Next Steps
Release Channels
Learn how to set up beta and alpha release channels
Auto-Update Setup
Review the complete auto-update setup guide