Introduction

Grafana plugins extend functionality with new data sources, panels, and apps. When grafana-cli plugins install fails, the error can range from network connectivity issues to permission problems or version incompatibilities. Understanding the specific error message helps identify the root cause quickly.

Symptoms

  • grafana-cli plugins install command fails with network timeout
  • Error: "Permission denied" or "write error" during plugin extraction
  • Plugin installs but does not appear in the plugins list
  • Error: "plugin version not found" or "incompatible with your version of Grafana"
  • Grafana logs show: "failed to load plugin" or "plugin signature verification failed"
  • Air-gapped environments cannot install plugins from the catalog

Common Causes

  • No internet access or proxy blocking grafana.com and github.com
  • Insufficient filesystem permissions on the plugins directory
  • Grafana version is too old for the requested plugin version
  • Plugin requires unsigned installation but Grafana is in production mode
  • Plugin directory is on a read-only filesystem or full disk
  • DNS resolution fails for plugin repository URLs

Step-by-Step Fix

Network and Connectivity Issues

  1. 1.Test connectivity to Grafana plugin repository:
  2. 2.```bash
  3. 3.curl -v https://grafana.com/api/plugins
  4. 4.curl -v https://github.com
  5. 5.`
  6. 6.For proxy environments, configure Grafana to use the proxy:
  7. 7.```ini
  8. 8.# In grafana.ini
  9. 9.[plugin.grafana-image-renderer]
  10. 10.provisioning = yes

[plugins] plugin_admin_enabled = true

[server] # For Grafana CLI ```

bash export HTTP_PROXY=http://proxy.example.com:8080 export HTTPS_PROXY=http://proxy.example.com:8080 grafana-cli plugins install grafana-clock-panel

Permission Issues

  1. 1.Check and fix plugin directory permissions:
  2. 2.```bash
  3. 3.# Check current permissions
  4. 4.ls -la /var/lib/grafana/plugins

# Fix ownership chown -R grafana:grafana /var/lib/grafana/plugins

# Fix permissions chmod -R 755 /var/lib/grafana/plugins ```

  1. 1.For Docker installations, ensure proper volume mounting:
  2. 2.```yaml
  3. 3.services:
  4. 4.grafana:
  5. 5.image: grafana/grafana:latest
  6. 6.volumes:
  7. 7.- grafana-storage:/var/lib/grafana
  8. 8.volumes:
  9. 9.grafana-storage:
  10. 10.`

Version Compatibility Issues

  1. 1.Check your Grafana version and find compatible plugins:
  2. 2.```bash
  3. 3.grafana-cli --version
  4. 4.grafana-cli plugins list-versions grafana-clock-panel
  5. 5.`
  6. 6.Install a specific plugin version compatible with your Grafana:
  7. 7.```bash
  8. 8.grafana-cli plugins install grafana-clock-panel 2.0.0
  9. 9.`

Unsigned Plugin Issues

  1. 1.For unsigned plugins (development or custom plugins), allow unsigned loading:
  2. 2.```ini
  3. 3.# In grafana.ini - ONLY for development/testing
  4. 4.[plugins]
  5. 5.allow_loading_unsigned_plugins = your-plugin-id

# Or for specific plugins allow_loading_unsigned_plugins = grafana-simple-json-datasource,my-custom-panel ```

  1. 1.Restart Grafana after configuration changes:
  2. 2.```bash
  3. 3.systemctl restart grafana-server
  4. 4.# Or for Docker:
  5. 5.docker restart grafana
  6. 6.`

Manual Plugin Installation

  1. 1.For air-gapped environments, download and install manually:
  2. 2.```bash
  3. 3.# On a connected machine, download the plugin
  4. 4.grafana-cli --pluginUrl https://grafana.com/api/plugins/grafana-clock-panel/versions/latest/download plugins install

# Or download directly from GitHub releases wget https://github.com/grafana/clock-panel/releases/download/v2.0.0/grafana-clock-panel-2.0.0.zip

# Copy to air-gapped server and extract unzip grafana-clock-panel-2.0.0.zip -d /var/lib/grafana/plugins/

# Restart Grafana systemctl restart grafana-server ```

Verification

  1. 1.Verify plugin installation:
  2. 2.```bash
  3. 3.grafana-cli plugins ls
  4. 4.`
  5. 5.Check Grafana logs for plugin loading:
  6. 6.```bash
  7. 7.journalctl -u grafana-server -f | grep -i plugin
  8. 8.`
  9. 9.In the Grafana UI, navigate to Configuration > Plugins to confirm the plugin appears and is enabled.