Learn how to configure kraft to your preferences. In this document, we outline where configuration is stored and what the options mean, including possible values and best practices.

When you install kraft, it will create a number of directories and files on your host that are used for configuration purposes and to store cache information.

Overview of configuration options#

The default location for user configuration for kraft is stored at: ~/.config/kraftkit/config.yaml. This file can be edited to your liking or to suite your needs. Below is an overview of each configuration option, how to set its value, their default value and purpose.

OptionEnvironmental VariableGlobal CLI flagDefault Value
Do not prompt for user interaction
Do not run internal tasks in parallel
Do not check for updates
System pager to pipe output to
Directory for placing runtime files (e.g. pidfiles)
Address of containerd daemon socket
Address of BuildKit daemon socket
Path to KraftKit config directory
Path to Unikraft manifest cache
Path to Unikraft component cache
Log level verbosity
Enable log timestamps
Log type (choice of fancy, basic and json)
Paths to mirrors of Unikraft component artifacts
Paths to package or component manifests

Additional influential environmental variables#

To increase compatibility across systems and to respect to pre-defined user environments, kraft recognizes the following additional environmental variables:

PAGERHow the output is rendered in some commands. Can be set to cat or less.
NO_COLORDo not use any ANSI or true color output in any log messaging.
XDG_CONFIG_HOMEPath to the general configuration directory. Affects the default value of paths.config.
XDG_STATE_HOMEPath to the generate state directory.
XDG_DATA_HOMEPath to the general data directory. Affects the default value of unikraft.manifests and others.

Best practice recommendations#

The following are a few additional recommendations for global configuration values given certain contexts, environments or scenarios:

  • In CI/CD contexts, it is best to switch the log type from its default option of fancy to either basic or json to allow for better readability. KraftKit should recognize pseudo TTY environments and dynamically adjust.
  • If you are experiencing a build error from Unikraft's build system, it is best to switch to basic log type and to set the log level to debug to get a better understanding of what's being run underneath by KraftKit.
Edit this page on GitHub

Connect with the community

Feel free to ask questions, report issues, and meet new people.

Join us on Discord!

Getting Started

What is a unikernel?Install CLI companion toolUnikraft InternalsRoadmap

© 2024  The Unikraft Authors. All rights reserved. Documentation distributed under CC BY-NC 4.0.