k6 community forum

Specify location of 'config' file

Hi, is it possible to feed in the location of the config file? (i.e. is there a switch for the ‘run’ command to tell k6 where the config file is?). Or can you only ever have one ‘config’ file and it must be in a certain location?

Yes, it’s aptly named --config :wink: or -c for short :slight_smile: so k6 --config /path/to/my/config.json run script.js would load you custom config instead of the one at the default location ~/.config/loadimpact/k6/config.json.

2 Likes

Ah - silly me, I should’ve just run ‘k6 --help’. Thanks for the quick response!