boot
Boot a BrowserPod Pod to start an isolated, in-browser Linux runtime, optionally persisting its filesystem with a storageKey.
class BrowserPod { static async boot(opts?: { apiKey?: string; network?: PodNetwork; nodeVersion?: string; storageKey?: string; userImage?: string; }): Promise<BrowserPod>;}Parameters
- opts (object, optional) - Initialization options passed as an object.
Options
- apiKey (
string, optional) - The API key used to connect the Pod to the Edge network.- Omitted → The Pod boots on a free fetch network, routing requests directly through the browser.
- network (
PodNetwork, optional) - A preconfigured network instance created withcreateEdgeNetworkorcreateFetchNetwork. Cannot be combined withapiKey; pass the key tocreateEdgeNetworkinstead. Create a new network for each Pod: booting a second Pod with the same network throws. - nodeVersion (
string, optional) - The version of Node.js to use. Currently only “22” is allowed. - storageKey (
string, optional) - Identifies the Pod’s persistent storage.- Omitted → ephemeral: fresh disk each boot, nothing is saved between sessions.
- Provided → persistent: the same key resumes the same disk, a different key starts a separate one.
- userImage (
string, optional) - A URL pointing to a custom ext2 filesystem image that will be mounted directly on the/homedirectory of the Pod’s filesystem. If you change the image, also change thestorageKeyif provided.
Returns
boot returns a Promise which is resolved when the Pod is ready to be used. It returns the newly created Pod.
Notes
- The Edge network is charged in one-hour blocks of 10 tokens ($0.01), deducted from your BrowserPod account balance: one block at boot, and another for each further hour, or part of an hour, that the Pod stays connected. Booting fails if not enough tokens are available. Booting on a fetch network is free and deducts no tokens.
- An empty or invalid
apiKey, or too few tokens, makesboothang instead of failing. See Debugging BrowserPod. - For how the Pod’s filesystem is structured and when its data persists, see Filesystem.