> ## 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 do I run W&B offline?

To train on a machine without internet access and upload your results to W\&B later, follow these steps:

1. Set the environment variable `WANDB_MODE=offline` to save metrics locally without an internet connection.
2. When you're ready to upload, run `wandb init` in your directory to set the project name.
3. Run `wandb sync [RUN-DIRECTORY]` to transfer your metrics to W\&B and view your results in the web app. Replace `[RUN-DIRECTORY]` with the path to your local run directory.

To confirm a run is offline, check `run.settings._offline` or `run.settings.mode` after you call `wandb.init()`.

***

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