> For the complete documentation index, see [llms.txt](https://docs.kivy.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kivy.fun/programming-guide/config.md).

# Configure Kivy

The configuration file for kivy is named config.ini, and adheres to the [standard INI](http://en.wikipedia.org/wiki/INI_file) format.

## Locating the configuration file

The location of the configuration file is controlled by the environment variable \`KIVY\_HOME\`:

```
<KIVY_HOME>/config.ini
```

On desktop, this defaults to:

```
<HOME_DIRECTORY>/.kivy/config.ini
```

Therefore, if your user is named "tito", the file will be here:

* Windows: `C:\Users\tito\.kivy\config.ini`
* OS X: `/Users/tito/.kivy/config.ini`
* Linux: `/home/tito/.kivy/config.ini`

On Android, this defaults to:

```
<ANDROID_APP_PATH>/.kivy/config.ini
```

If your app is named "org.kivy.launcher", the file will be here:

```
/data/data/org.kivy.launcher/files/.kivy/config.ini
```

On iOS, this defaults to:

```
<HOME_DIRECTORY>/Documents/.kivy/config.ini
```

## Local configuration

Sometimes it's desired to change configuration only for certain applications or during testing of a separate part of Kivy for example input providers. To create a separate configuration file you can simply use these commands:

```
from kivy.config import Config

Config.read(<file>)
# set config
Config.write()
```

When a local configuration of single `.ini` file isn't enough, e.g. when you want to have separate environment for garden, kivy logs and other things, you'll need to change the the `KIVY_HOME` environment variable in your application to get desired result:

```
import os
os.environ['KIVY_HOME'] = <folder>
```

or before each run of the application change it manually in the console:

1. Windows:

   ```
   set KIVY_HOME=<folder>
   ```
2. Linux & OSX:

   ```
   export KIVY_HOME=<folder>
   ```

After the change of `KIVY_HOME`, the folder will behave exactly the same as the default `.kivy/` folder mentioned above.

## Understanding config tokens

All the configuration tokens are explained in the `kivy.config` module.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kivy.fun/programming-guide/config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
