Skip to main content

Debian/Ubuntu Installation

This guide covers installing Grafana on Debian or Ubuntu Linux systems using the APT repository or standalone DEB packages.

Installation Methods

You can install Grafana on Debian/Ubuntu using:
  • APT repository (recommended): Automatic updates via apt-get update
  • DEB package: Manual installation from downloaded package
  • Standalone binary: Manual installation from tarball

Install from APT Repository

Installing from the APT repository enables automatic updates when you run apt-get update.

Available Repositories

Grafana Enterprise is the recommended edition. It’s free and includes all OSS features, with the option to upgrade to the full Enterprise feature set.

Install from DEB Package

Manual installation using DEB packages requires you to manually update Grafana for each new version.

Install as Standalone Binary

For manual installation with full control over file locations:

Start Grafana Server

Using systemd

Start the Grafana server:
Enable Grafana to start at boot:
Check service status:

Using init.d

Start Grafana:
Enable at boot:

Configuration

After installation, Grafana uses these default paths:

Environment Variables File

The systemd service reads environment variables from /etc/default/grafana-server:

Systemd Service Configuration

The Grafana systemd service includes security hardening:
  • Runs as non-root grafana user (UID 472)
  • Capability restrictions with CapabilityBoundingSet=
  • Protected system directories
  • Restricted system calls
  • File open limit: 10,000
  • Stop timeout: 20 seconds

Access Grafana

After starting the server, access Grafana:
  1. Open your browser to http://localhost:3000
  2. Sign in with default credentials:
    • Username: admin
    • Password: admin
  3. Change the password when prompted

Uninstall Grafana

Troubleshooting

View logs

Or check log files:

Check service status

Verify installation

Port already in use

If port 3000 is already in use, edit /etc/grafana/grafana.ini:
Restart Grafana:

Next Steps

  • Configure data sources
  • Set up authentication (LDAP, OAuth, SAML)
  • Configure SMTP for email notifications
  • Set up provisioning for dashboards and data sources
  • Configure an external database (MySQL or PostgreSQL)