Guides / Load Testing

How to Install & Set Up k6

Install Grafana k6 — developer-centric load testing scripted in JavaScript — and run your first performance test.

Updated 20262-step setupDownload k6 →

Prerequisites

  • ✓A Linux/macOS/Windows host

Install k6

Ubuntu / Debian
sudo gpg -k
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
sudo apt-get update
sudo apt-get install k6
RHEL / CentOS Stream / Fedora
sudo dnf install https://dl.k6.io/rpm/repo.rpm -y
sudo dnf install -y k6
macOS (Homebrew)
brew install k6

Write and run your first test

script.js
import http from 'k6/http';
import { sleep } from 'k6';

export const options = { vus: 10, duration: '30s' };

export default function () {
  http.get('https://test.k6.io');
  sleep(1);
}
run it
k6 run script.js

Documentation & Knowledge Base

Official Documentationk6 Documentation →Knowledge Base & CommunityGrafana k6 Community →
Download k6— all versions & official links→

Related Guides

Apache JMeterInstall guide →LocustInstall guide →GrafanaInstall guide →

Need k6 deployed and managed for you?

We're OpenStack Dev — we design, deploy, and operate production DevOps infrastructure.

Get in TouchAll Install Guides