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) - Initialization options passed as an object.
Options
- apiKey (
string, optional) - The API key used to connect the Pod to an 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. - 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
- Booting on an edge network deducts 10 tokens from your BrowserPod account balance (and fails if insufficient tokens are available). Booting on a fetch network is free and deducts no tokens.
- For how the Pod’s filesystem is structured and when its data persists, see Filesystem.