> For the complete documentation index, see [llms.txt](https://docs.heisenware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heisenware.com/app-builder/build-backend/functions/extensions/custom-extensions.md).

# Custom Extensions

Custom Extensions let you extend the Heisenware platform to your specific needs. We provide a project setup into which you add your custom functionality in a completely non-intrusive fashion. Built on our [VRPC](/advanced/vrpc.md) library, you write plain Node.js code (no APIs to learn) and make it ready for visual programming in minutes.

{% hint style="info" %}
We are actively working on the same idea for C++ and Python.
{% endhint %}

The best starting point is our [docker-extension-starter-js](https://github.com/heisenware/heisenware-docker-extension-starter-js). We recommend [downloading this project](https://github.com/heisenware/heisenware-docker-extension-starter-js/archive/refs/heads/master.zip) as a scaffold, changing it to your needs, and placing it under your version control.

You end up creating a Docker image whose containers integrate into the platform in one of two ways.

## Running inside the platform

Once your Docker image is built, pushed, and publicly accessible ([contact us](mailto:support@heisenware.com) for private registry support), load it as a Custom Extension.

<div align="left"><figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2Fgit-blob-263deaf2cdc1e2c9e44f50e5fe30bcb3ad047cd5%2Fimage%20(46).png?alt=media" alt=""><figcaption></figcaption></figure></div>

Once installed, and given your code is syntactically correct, it immediately appears in the [Function Explorer](/app-builder/build-backend/functions/function-explorer.md). To apply a new version, install it again (works even with the same label).

{% hint style="info" %}
Any instances you create are automatically persisted and restarted. You find them in the [File Explorer](/app-builder/build-backend/file-explorer.md) under `extensions/my-extension/...`
{% endhint %}

## Running outside the platform

This lets you run your custom code on-premises while we bridge it automatically, seamlessly, and securely into the cloud. Start a container of your image locally and configure it with the correct credentials using environment variables:

```bash
docker run -it \
-e HW_DOMAIN=<account>.<workspace> \
-e HW_BROKER=mqtts://<account>.heisenware.cloud \
-e HW_USERNAME=<username> \
-e HW_PASSWORD=<password> \
myusername/myimage:1.0.0
```

To retrieve a valid username and password, add a VRPC integration under [Integrations (inbound)](/app-manager/inbound-integrations.md) in the App Manager.

Example: For an account named `my-company`, an integration with username `agentRunner`, and a password `secret`, the call would be:

```bash
docker run -it \
-e HW_DOMAIN=my-company.default \
-e HW_BROKER=mqtts://my-company.heisenware.cloud \
-e HW_USERNAME=agentRunner \
-e HW_PASSWORD=secret \
myusername/myimage:1.0.0
```

When everything is set up correctly, you should see something like this on your console:

<figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2Fgit-blob-d6a6d40983a23d0a502760655cd386acb64aba1e%2Fimage%20(48).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.heisenware.com/app-builder/build-backend/functions/extensions/custom-extensions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
