2016-10-21 04:01:34 -05:00
+++
title = "Installing Plugins"
type = "docs"
[menu.docs]
parent = "plugins"
weight = 1
+++
# Grafana Plugins
From Grafana 3.0+ not only are datasource plugins supported but also panel plugins and apps.
Having panels as plugins make it easy to create and add any kind of panel, to show your data
or improve your favorite dashboards. Apps is something new in Grafana that enables
bundling of datasources, panels, dashboards and Grafana pages into a cohesive experience.
Grafana already have a strong community of contributors and plugin developers.
By making it easier to develop and install plugins we hope that the community
can grow even stronger and develop new plugins that we would never think about.
2017-03-20 04:20:32 -05:00
To discover plugins checkout the official [Plugin Repository ](https://grafana.com/plugins ).
2016-02-29 09:53:47 -06:00
2017-04-10 08:01:40 -05:00
# Installing Plugins
2016-02-29 09:53:47 -06:00
2016-03-16 05:56:19 -05:00
The easiest way to install plugins is by using the CLI tool grafana-cli which is bundled with grafana. Before any modification take place after modifying plugins, grafana-server needs to be restarted.
2016-02-29 09:53:47 -06:00
2017-04-10 08:01:40 -05:00
### Grafana Plugin Directory
2016-10-21 04:01:34 -05:00
2016-08-11 00:39:34 -05:00
On Linux systems the grafana-cli will assume that the grafana plugin directory is `/var/lib/grafana/plugins` . It's possible to override the directory which grafana-cli will operate on by specifying the --pluginsDir flag. On Windows systems this parameter have to be specified for every call.
2016-03-01 03:42:49 -06:00
2017-04-10 08:01:40 -05:00
### Grafana-cli Commands
2016-03-02 01:38:56 -06:00
List available plugins
2017-10-05 12:01:03 -05:00
```bash
2016-03-21 04:01:07 -05:00
grafana-cli plugins list-remote
2016-02-29 09:53:47 -06:00
```
2016-11-01 12:35:15 -05:00
Install the latest version of a plugin
2017-10-05 12:01:03 -05:00
```bash
2016-03-21 04:01:07 -05:00
grafana-cli plugins install < plugin-id >
2016-02-29 09:53:47 -06:00
```
2016-11-01 12:35:15 -05:00
Install a specific version of a plugin
2017-10-05 12:01:03 -05:00
```bash
2016-11-01 12:35:15 -05:00
grafana-cli plugins install < plugin-id > < version >
```
2016-03-02 01:38:56 -06:00
List installed plugins
2017-10-05 12:01:03 -05:00
```bash
2016-03-21 04:01:07 -05:00
grafana-cli plugins ls
2016-02-29 09:53:47 -06:00
```
2016-04-11 17:05:28 -05:00
Update all installed plugins
2017-10-05 12:01:03 -05:00
```bash
2016-04-11 17:05:28 -05:00
grafana-cli plugins update-all
2016-02-29 09:53:47 -06:00
```
2016-03-01 03:42:49 -06:00
2016-04-11 17:05:28 -05:00
Update one plugin
2017-10-05 12:01:03 -05:00
```bash
2016-04-11 17:05:28 -05:00
grafana-cli plugins update < plugin-id >
2016-03-01 03:42:49 -06:00
```
2016-03-02 01:38:56 -06:00
Remove one plugin
2017-10-05 12:01:03 -05:00
```bash
2016-03-21 04:01:07 -05:00
grafana-cli plugins remove < plugin-id >
2016-03-01 03:42:49 -06:00
```
2017-04-10 08:01:40 -05:00
### Installing Plugins Manually
If your Grafana Server does not have access to the Internet, then the plugin will have to downloaded and manually copied to your Grafana Server.
The Download URL from Grafana.com API is in this form:
`https://grafana.com/api/plugins/<plugin id>/versions/<version number>/download`
2017-09-15 13:34:08 -05:00
You can specify a local URL by using the `--pluginUrl` option.
2017-10-05 12:01:03 -05:00
```bash
2017-09-15 13:34:08 -05:00
grafana-cli --pluginUrl https://nexus.company.com/grafana/plugins/< plugin-id > -< plugin-version > .zip plugins install < plugin-id >
```
2017-04-10 08:01:40 -05:00
To manually install a Plugin via the Grafana.com API:
1. Find the plugin you want to download, the plugin id can be found on the Installation Tab on the plugin's page on Grafana.com. In this example, the plugin id is `jdbranham-diagram-panel` :
{{< imgbox img = "/img/docs/installation-tab.png" caption = "Installation Tab" > }}
2. Use the Grafana API to find the plugin using this url `https://grafana.com/api/plugins/<plugin id from step 1>` . For example: https://grafana.com/api/plugins/jdbranham-diagram-panel should return:
2017-10-05 12:01:03 -05:00
```bash
2017-04-10 08:01:40 -05:00
{
"id": 145,
"typeId": 3,
"typeName": "Panel",
"typeCode": "panel",
"slug": "jdbranham-diagram-panel",
"name": "Diagram",
"description": "Diagram panel for grafana",
...
```
3. Find the download link:
2017-10-05 12:01:03 -05:00
```bash
2017-04-10 08:01:40 -05:00
{
"rel": "download",
"href": "/plugins/jdbranham-diagram-panel/versions/1.4.0/download"
}
```
2017-05-21 03:03:57 -05:00
4. Download the plugin with `https://grafana.com/api/plugins/<plugin id from step 1>/versions/<current version>/download` (for example: https://grafana.com/api/plugins/jdbranham-diagram-panel/versions/1.4.0/download). Unzip the downloaded file into the Grafana Server's `plugins` directory.
2017-04-10 08:01:40 -05:00
5. Restart the Grafana Server.