> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperbeam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Custom Chrome Extension

## Overview

You can create a custom [Chrome extension](https://chrome.google.com/webstore/category/extensions) and install it on the virtual browser.

To load your extension in Hyperbeam, create an unpacked `zip` or `crx` file. Then, make a request and upload the file using a multipart form. For a full example, check out our [Chrome extension example](https://github.com/hyperbeam/examples/tree/master/load-custom-chrome-extension).

<CodeGroup>
  ```js JavaScript theme={null}
  function buildForm(extPath, vmConfig) {
    const formData = new FormData();
    formData.append("ex", fs.createReadStream(extPath));
    formData.append("body", JSON.stringify(vmConfig));
    return formData;
  }

  const zipPath = path.resolve(\_\_dirname, "./path/to/my/ext.zip");
  const formData = buildForm(zipPath, {
  extension: {
  field: "ex"
  }
  });

  const headers = formData.getHeaders();
  headers["Authorization"] = `Bearer ${process.env.HB_API_KEY}`;
  const resp = axios.post('https://engine.hyperbeam.com/v0/vm', formData, {headers});

  ```

  ```bash Bash theme={null}
  curl -X POST \
    -H 'Authorization: Bearer <your-api-key>' \
    -H 'Content-Type: multipart/form-data' \
    https://engine.hyperbeam.com/v0/vm \
    --form 'body={"extension":{"field":"ex"}}' \
    --form 'ex=@/tmp/ext.zip;type=application/zip'
    # If using crx rather than zip, make sure to change the MIME-type to x-chrome-extension
    # --form 'ex=@/tmp/ext.crx;type=application/x-chrome-extension'
  ```
</CodeGroup>

## References

For more information on creating `zip` Chrome extensions, refer to the [Publish your extension](https://developer.chrome.com/docs/webstore/publish/#create-your-items-zip-file) guide on the Chrome Developers website.

To learn more about the `crx` format, see [Installing extensions on Linux](https://developer.chrome.com/docs/extensions/mv3/linux_hosting/#packaging). We recommend creating building `crx` extensions with an [unofficial CLI on NPM](https://www.npmjs.com/package/crx#cli-api).

## Manifest V2

Hyperbeam supports both Manifest V2 and V3. Manifest V2 is deprecated, and we anticipate Chromium will no longer support V2 in 2025. You can learn more about the MV2 phase-out plan on the [Developer Chrome website](https://developer.chrome.com/docs/extensions/migrating/mv2-sunset/).

If backwards compatibility is a requirement for your project, please contact us at [founders@hyperbeam.com](mailto:founders@hyperbeam.com).

## Troubleshooting

<Warning>Do **not** put the `manifest.json` file in a subfolder</Warning>

If your extension is not loading in Hyperbeam, *please* double-check that:

* The `manifest.json` file is a well-formed JSON
* The `manifest.json` file is in the root directory

The contents of the `zip` file should look like this:

```
hello.html
hello_extensions.png
manifest.json
popup.js
```

The following file structure is invalid, **do not do this**:

```
extension/
├─ hello.html
├─ hello_extensions.png
├─ manifest.json
└─ popup.js
```
