docs/sources/administration/plugin-management/plugin-frontend-sandbox.md
{{< admonition type="caution" >}} Plugin Frontend Sandbox is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available. {{< /admonition >}}
The Plugin Frontend Sandbox is a security feature that isolates plugin frontend code from the main Grafana application. When enabled, plugins run in a separate JavaScript context, which provides several security benefits:
Plugins running inside the Frontend Sandbox should continue to work normally without any noticeable changes in their intended functionality.
We strongly recommend enabling the Frontend Sandbox for plugins that allow users to write custom JavaScript code for data visualization or manipulation, since they can potentially execute arbitrary JavaScript code in your Grafana instance. The sandbox provides an additional layer of security by restricting what this code can access and modify.
These are examples of plugins where the sandbox is particularly useful:
The following applies:
For self-hosted Grafana installations, add the plugin IDs you want to sandbox in the security section using the enable_frontend_sandbox_for_plugins configuration option.
For Grafana Cloud users, you can simply use the toggle switch in the plugin catalog page to enable or disable the sandbox for each plugin. By default, the sandbox is disabled for all plugins.
{{< admonition type="note" >}} Enabling the Frontend Sandbox might impact the performance of certain plugins. Only disable the sandbox if you fully trust the plugin and understand the security implications. {{< /admonition >}}
If a plugin isn't functioning correctly with the Frontend Sandbox enabled: