Electron Forge
  • Getting Started
  • Importing an Existing Project
  • CLI
  • Core Concepts
    • Why Electron Forge?
    • Build Lifecycle
  • Configuration
    • Configuration Overview
    • TypeScript Setup
    • Plugins
      • Webpack Plugin
      • Vite Plugin
      • Electronegativity Plugin
      • Auto Unpack Native Modules Plugin
      • Local Electron Plugin
      • Fuses Plugin
    • Makers
      • AppX
      • deb
      • DMG
      • Flatpak
      • pkg
      • RPM
      • Snapcraft
      • Squirrel.Windows
      • WiX MSI
      • ZIP
    • Publishers
      • Bitbucket
      • Electron Release Server
      • GitHub
      • Google Cloud Storage
      • Nucleus
      • S3
      • Snapcraft
    • Hooks
  • Built-in Templates
    • Webpack
    • Webpack + Typescript
    • Vite
    • Vite + TypeScript
  • Guides
    • Code Signing
      • Signing a Windows app
      • Signing a macOS app
    • Custom App Icons
    • Framework Integration
      • React
      • React with TypeScript
      • Vue 3
    • Developing with WSL
  • Advanced
    • Auto Update
    • Debugging
    • Extending Electron Forge
      • Writing Plugins
      • Writing Templates
      • Writing Makers
      • Writing Publishers
    • API Docs
Powered by GitBook
On this page
  • Requirements
  • Installation
  • Usage
  • Debugging

Was this helpful?

Edit on GitHub
  1. Configuration
  2. Makers

Snapcraft

Create a Snap package for your Electron app using Electron Forge.

PreviousRPMNextSquirrel.Windows

Last updated 28 days ago

Was this helpful?

The target builds .snap files, which is the packaging format created and sponsored by Canonical, the company behind Ubuntu. It is a sandboxed package format that lets users of various Linux distributions install your application in an isolated environment on their machine.

Requirements

You can only build the Snapcraft target on Linux systems with the package installed.

Installation

npm install --save-dev @electron-forge/maker-snap

Usage

To use @electron-forge/maker-snap, add it to the makers array in your :

forge.config.js
module.exports = {
  makers: [
    {
      name: '@electron-forge/maker-snap',
      config: {
        features: {
          audio: true,
          mpris: 'com.example.mpris',
          webgl: true
        },
        summary: 'Pretty Awesome'
      }
    }
  ]
};

Debugging

For advanced debug logging for this maker, add the DEBUG=electron-installer-snap* environment variable.

Configuration options are documented in .

Snapcraft
snapcraft
Forge configuration
MakerSnapConfig