Quickstart Guide
This guide will walk you through installing Grafana, configuring a data source, and creating your first dashboard in just a few minutes.What You’ll Build
By the end of this quickstart, you’ll have:- A running Grafana instance
- A configured data source (TestData DB)
- A functional dashboard with time-series visualizations
- An understanding of basic Grafana workflows
Prerequisites
- Node.js 22.x or later (for development builds)
- Go 1.25.7 or later (for backend)
- GCC (required for CGo/SQLite compilation)
- A modern web browser
For production deployments, pre-built binaries and Docker images are available that don’t require development dependencies.
Installation
Install Dependencies
Install frontend dependencies using Yarn:
Grafana uses Yarn 4.11.0 via Corepack. Run
corepack enable if the yarn command is not found.Start the Backend
Build and start the Grafana backend with hot-reload:This starts the backend on
localhost:3000 using the embedded SQLite database. The first build takes approximately 3 minutes.Start the Frontend (Optional)
In a separate terminal, start the webpack dev server for frontend development:The backend automatically proxies to the frontend dev server. First compilation takes about 45 seconds.
Configuration
Grafana uses a configuration file system with defaults and overrides:- Default configuration:
conf/defaults.ini - Custom overrides:
conf/custom.ini
Key Configuration Options
Adding Your First Data Source
Navigate to Data Sources
From the Grafana home page:
- Click the menu icon (☰) in the top-left
- Go to Connections → Data sources
- Click Add data source
Select TestData DB
For this quickstart, we’ll use the built-in TestData data source:
- Search for “TestData DB” in the data source list
- Click on it to open the configuration page
TestData DB generates random time-series data, perfect for testing and learning Grafana without setting up external databases.
Data Source API Example
Under the hood, Grafana creates a data source record via the API:Creating Your First Dashboard
Configure the Query
In the query editor at the bottom:
- Data source: Select “TestData” (the one you just created)
- Scenario: Choose “Random Walk” from the dropdown
- Alias: Enter “Series 1”
Customize the Panel
On the right side, customize your panel:Panel options:
- Title: “My First Panel”
- Description: “A random walk time series”
- Line width: 2
- Fill opacity: 10
- Point size: 5
Add Field Configuration
Configure how data is displayed:
- Scroll down to Field section
- Set Unit to “short” (for readable numbers)
- Set Decimals to 2
- Under Thresholds, add warning (50) and error (80) thresholds
Understanding the Dashboard Model
Dashboards in Grafana are stored as JSON with a structured schema:Next Steps
Explore Core Concepts
Learn about dashboards, panels, queries, variables, and alerting in depth.
Add Real Data Sources
Connect Grafana to Prometheus, Loki, PostgreSQL, MySQL, InfluxDB, and more.
Create Variables
Make your dashboards dynamic with template variables for filtering and navigation.
Set Up Alerting
Define alert rules and configure notification channels for your metrics.
Common Issues
Backend Fails to Start
Port 3000 Already in Use
Editconf/custom.ini and change the port:
Frontend Not Updating
If runningyarn start, ensure the webpack dev server is running and check for compilation errors in the terminal.
Resources
- Configuration Reference: See
conf/defaults.inifor all available options - API Documentation: Swagger docs available at
/swaggerwhen running in development mode - Plugin Development: Check
packages/for reusable packages like@grafana/data,@grafana/ui, and@grafana/runtime
Congratulations! You’ve successfully set up Grafana and created your first dashboard. Continue to Core Concepts to deepen your understanding.