Interface: RemoteBuildOptions
Configuration for a remote snap build on Launchpad. Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.
A single remote build can target one or more architectures. Set buildFor to a string for one
arch, or to an array (e.g. ["amd64", "arm64"]) to build several architectures in a single
snapcraft remote-build job on Launchpad that emits a separate snap artifact per arch.
Alternatively, the top-level arch option (e.g. arch: ["x64", "arm64"]) spawns a separate
remote-build job per architecture — do not combine that with a buildFor array (mutually exclusive).
Authentication is resolved in this order:
cscLinkconfig field — base64-encoded credentials or a file pathSNAP_CSC_LINKenvironment variable — same format ascscLink(CI-recommended; follows the same pattern asWIN_CSC_LINKfor Windows code signing)SNAPCRAFT_STORE_CREDENTIALSenvironment variable (read directly by snapcraft)- An active interactive
snapcraft loginsession
CI setup (set once as a CI secret):
export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)
The resolved credentials are injected only into the spawned snapcraft subprocess
environment and never exposed through process.env.
Properties
acceptPublicUpload?
optionalacceptPublicUpload?:boolean
Suppress the Launchpad public-upload consent prompt by automatically accepting it.
Your source code will be uploaded to a public Launchpad repository.
Set to true in CI once you understand the implications.
buildFor?
optionalbuildFor?:string|string[]
Target architecture (or architectures) for the remote build.
- Single string (e.g.
"amd64"): one Launchpad job, one output snap. - Array (e.g.
["amd64", "arm64"]): one Launchpad job that builds all listed architectures and downloads each resulting snap. All produced snaps are emitted as separate build artifacts.
Using an array here is mutually exclusive with setting arch: ["x64", "arm64"] at the
electron-builder top level — the top-level arch option spawns a separate remote-build
job per architecture, which would duplicate work.
Examples
"amd64"
["amd64", "arm64"]
enabled
enabled:
boolean
Whether to enable remote build on Launchpad. Must be set explicitly to true to opt in.
launchpadUsername?
optionallaunchpadUsername?:string
Your Launchpad username. Used to select the correct Launchpad account when more than one set of credentials is available.
privateProject?
optionalprivateProject?:string
Launchpad project name to use for a private source upload. The project must already exist and you must have write access.
recover?
optionalrecover?:boolean
Resume a previously interrupted remote build rather than starting a new one.
strategy?
optionalstrategy?:"disable-fallback"|"force-fallback"
Controls whether snapcraft may fall back to a different remote build strategy.
"disable-fallback"— always use the primary strategy, fail if unavailable."force-fallback"— always use the fallback strategy.
timeout?
optionaltimeout?:number
Maximum time in seconds to wait for the remote build to complete before aborting.
Passed to snapcraft remote-build as --timeout <seconds>.
Example
1800 // 30 minutes