How to Install Grafana and ClickHouse Plugins

Basic instructions on installing Grafana with support for ClickHouse

Grafana server supports multiple operating systems including:

  • Linux (DEB and RPM based distributions)
  • Microsoft Windows
  • Mac OS
  • Docker

The following instructions are based on installing Grafana for Ubuntu, or using the Docker image to provide services. For full details on installing Grafana, see the Grafana Labs Install Grafana site.

Install Grafana on Ubuntu


Installing Grafana on Ubuntu has the following prerequisites:

  • 255 MB or more storage space
  • A database to store information. By default, Grafana installs and uses SQLite as its default database. For production systems, MySQL or PostgreSQL are recommended.

Grafana Install

Grafana comes in both an Enterprise and an OSS (Open Source Software) versions. The instructions below are for the OSS version of Grafana.

The following steps require an administrative account. To install Grafana on Ubuntu 20.04 or similar Linux distributions:

  1. From a terminal, install Grafana through apt-get. This will install Grafana from the current stable repository that’s available for all Ubuntu 20.04 users:

    sudo apt-get clean  
    sudo apt-get update
    sudo apt-get install grafana
  2. Start Grafana, and set it to start at system boot:

    sudo systemctl daemon-reload
    sudo systemctl start grafana-server
    sudo systemctl enable grafana-server.service
    sudo systemctl status grafana-server
    ● grafana-server.service - Grafana instance
        Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendo>
        Active: active (running) since Wed 2021-06-30 10:26:41 MDT; 11min ago

ClickHouse Plugin Install

Once Grafana has been installed, the plugins to access ClickHouse can be installed through the following process. For more information on the ClickHouse plugin for Grafana, see the ClickHouse datasource for Grafana page.

  1. From a terminal, use an administrative account to install the ClickHouse plugins for Grafana with the following command:

    sudo grafana-cli plugins install vertamedia-clickhouse-datasource
  2. Restart Grafana:

    sudo systemctl restart grafana-server

Deploy Grafana via Docker

For organizations that prefer to use Docker based services, the following process will set up a Grafana server with plugins for ClickHouse already installed.

To run the most recent version of Grafana with the ClickHouse plugins through Docker:

  1. Start Docker and specify the ports, the container name, and the plugins to install with the following:

    docker run -d \
        -p 3000:3000 \
        --name=grafana \
        -e "GF_INSTALL_PLUGINS=vertamedia-clickhouse-datasource" \
  2. After running the first time, it can be restarted with:

    docker start grafana

Configure Grafana

Once Grafana has been installed from either of the directions listed above, verify it is running by launching a browser and pointing it at the host name or IP address port 3000. For example: http://localhost:3000. The default username is admin and the default password is admin. Once logged in you will be prompted to create a new password.

First Grafana login