LinuxmacOSWindows

Where Is the k6 Config File?

k6 load testing JSON config with cloud token and legacy path.

Last updated

k6 keeps one JSON config per OS root. Cloud login writes the token there. A config flag points at any file for one-offs.

Legacy loadimpact paths belong to retired builds. Current roots follow per-OS conventions. Keep the token file out of shared dotfile repos.

Where k6 stores this, by platform

Linux
~/.config/k6/config.json

JSON config holding the cloud token from login. Legacy loadimpact path retired. Per-OS roots with config flag for one-offs.

macOS
~/Library/Application Support/k6/config.json

Same JSON semantics under Application Support.

Windows
%AppData%\k6\config.json

Same JSON semantics under Roaming AppData.

Frequently asked questions

How do I back up k6?

Copy config.json with no test running. The cloud token from login travels inside it. Restoring means putting the file back before the next run. Guard the token like a password.

Where is the old config path?

Pre-Grafana builds used a loadimpact folder path. Current builds use the k6 name in per-OS roots. Old guides with the legacy path describe retired layouts.

Notice an outdated path? Let us know.