> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How can I define the local location for `wandb` files?

You can control where `wandb` stores its files locally by setting the following environment variables or, where noted, by passing equivalent arguments to the SDK. Each variable controls a distinct location and has its own default.

* `WANDB_DIR=<path>` or `wandb.init(dir=<path>)`: Sets the location of the `wandb` folder created for your training script. Defaults to `./wandb`. This folder stores run data and logs.
* `WANDB_ARTIFACT_DIR=<path>` or `wandb.Artifact().download(root="<path>")`: Sets the location where `wandb` downloads artifacts. Defaults to `./artifacts`.
* `WANDB_CACHE_DIR=<path>`: Sets the location where `wandb` creates and stores artifacts when you call `wandb.Artifact`. Defaults to `~/.cache/wandb`.
* `WANDB_CONFIG_DIR=<path>`: Sets the location where `wandb` stores configuration files. Defaults to `~/.config/wandb`.
* `WANDB_DATA_DIR=<path>`: Sets the location used for staging artifacts during upload. Defaults to `~/.cache/wandb-data/`.

***

<Badge stroke shape="pill" color="orange" size="md">[Environment Variables](/support/models/tags/environment-variables)</Badge><Badge stroke shape="pill" color="orange" size="md">[Experiments](/support/models/tags/experiments)</Badge>
