Windows Installation Paths and Model Storage Planning for Local AI Inference
Deploying a local inference runtime on Windows barely takes a few GB for the program itself — the real disk consumers are model weights, shard caches, download temp files, and logs. This guide walks through capacity planning, directory structure, choosing a data drive during installation, redirecting model data via environment variables, migrating existing models off the system drive, and a practical verification checklist to keep your C: drive clean.
When you deploy a local inference runtime on Windows, the program itself usually takes only a few gigabytes. What actually consumes disk space is model weights, shard caches, temporary download files, and logs. Meanwhile, the system drive still has to handle the page file, update caches, and user profiles. Once free space runs low, you’ll see interrupted installations, services that fail to start, or overall system sluggishness. You therefore need to handle two things at once: install the program on a data drive, and stop models and caches from writing to the system drive by default.
Start with Capacity and Directory Planning
Before making changes, open Disk Management and check the free space and file system of each volume. For the data drive, a good rule of thumb is to reserve “current model size × expected number of models + 20% for temporary space.” Weight files are mostly large files with sequential read/write patterns, so you don’t need the random-access performance of a system drive — but avoid network drives, synced folders, and permission-restricted read-only directories.
A fixed three-level directory structure helps prevent scattered paths when you migrate later:
- Program directory: holds executables and runtime dependencies, e.g., a dev-tools folder on the data drive.
- Model directory: stores only weights and manifests, which makes backup and cleanup easy.
- Cache and temp directory: keeps incomplete downloads separate; only move files into the model directory after confirming they are complete.
Use local absolute paths and avoid spaces, non-ASCII characters, and overly long paths. If a path must contain spaces, wrap it in quotes on the command line. Do not place directories under system-protected paths or locations that require elevated permissions to write — otherwise, launching as a regular user will silently fall back to the default user profile directory, producing the frustrating “I changed the path but it still writes to C:” situation.
Specify the Program Location at Install Time
Most Windows installers offer two entry points. In the GUI, choose a custom installation, change the directory page to a data-drive path, and verify the “destination folder” on the confirmation page — don’t just look at the shortcut name. For command-line installation, use the installer’s own directory parameter. A common pattern is to open a command prompt in the installer’s folder and run the install command with a directory argument, quoting the target path. Parameter names vary across packaging tools, so always rely on the installer’s help output or bundled documentation — never assume all installers accept the same switch.
During installation, you should see the target path replaced. If the interface still shows the default system-drive path, the parameter wasn’t recognized: check the executable name, the quotes, whether the drive letter exists, and whether the current user can create that directory. After installation completes, confirm the main program and uninstall entry both live on the data drive, then verify that “Apps & features” shows a matching install location. Moving only the shortcut does not change the real install location.
Even after the program is relocated, models may still be written to the user directory on the system drive. These are two separate configuration systems — one cannot replace the other.
Point Model Data to the Data Drive
Runtimes typically use a “data directory variable” to decide where weights are stored. There are two ways to set it, and both should produce the same result: either browse to and select the model directory in the runtime’s own settings UI, or create an environment variable with the same name whose value is the absolute path to that directory. User variables affect only the current account; system variables affect all accounts on the machine. For a personal dev machine, a user variable is enough. Use a system variable only when multiple accounts share the same model set, and make sure the directory is writable by those accounts.
The setup steps: open the Advanced page of System Properties, go to Environment Variables, create the variable, and save all windows. Command prompts, File Explorer windows, and inference services that are already running will not automatically re-read the environment block — you must fully quit tray or background processes and then open a new command prompt to verify. In the new prompt, print the variable; the output should exactly match the path you set. If it’s empty, you either edited a different variable set, didn’t restart the window, or introduced a space or case mismatch in the name.
Don’t stop at checking the variable’s echo. Trigger a small model pull or load, then check whether new files appear in the target directory while confirming that no new large folder with the same name appears under the system-drive user directory. If both the UI setting and the environment variable exist but point to different paths, follow the priority defined in that runtime’s documentation to prevent the two configurations from overriding each other.
Migrating Models Already on the System Drive
If models were already downloaded to the system drive, don’t cut and paste halfway and then change the variable. A safer sequence: quit the runtime and related processes, create an empty directory on the data drive, perform a full copy (copy first, delete later, so you can roll back on failure), confirm that file sizes and counts match, then point the variable to the new directory, restart, and complete one successful load before deleting the old directory. Keep at least one complete copy during the migration until the new path has been validated by a successful load.
If you can’t change the configuration right away, you can use a directory junction to point the default data path at the data drive: create a junction at the empty default location that targets the real directory on the data drive. The program still accesses the original path, but the data physically lands on the data drive. Junctions require the original location to be empty or nonexistent, and you should never create a junction on a directory that is being written to. This is a transitional measure — long term, configure the program to recognize the data directory directly to reduce path confusion during troubleshooting.
When cleaning up, delete only old caches confirmed to be free of process locks. Temporary download files and corrupted partial downloads can be removed; do not force-delete weight files currently held open by a service.
Common Mistakes and a Checklist
- Only the install directory was changed while the model variable still points to the user home directory — the system drive keeps growing.
- The environment variable was changed but old processes weren’t restarted, so verification still reads the old value.
- The target drive is an optical drive, a synced drive, or a volume with an exhausted quota; the write fails and the program falls back to the default path.
- The path contains an unquoted space, so the installer truncates the argument and installs to the wrong location.
- Insufficient permissions: the service runs under another account and can’t read the current user’s variable. In this case, use a system variable instead, or grant the service account modify permission on the data directory.
- Antivirus or Controlled Folder Access blocks writes to the data drive — the logs show a permission error rather than a full-disk error.
After every change, run four checks: the program files are on the data drive; the environment variable prints correctly in a new session; a real load creates or reads files in the target directory; and the corresponding user data directory on the system drive has stopped growing. Record the paths and variable names at the time so they can be reused when switching machines or reinstalling.
Boundaries When Working with the Cloud
Local disk planning answers “where do the weights live” — it doesn’t change model licensing or whether your hardware can run the model. If a team needs centralized model distribution, shared read-only replicas, or long-term archiving, stable, validated weights can be backed up to object storage while compute nodes keep using local or near-end data drives as their runtime directories. Avoid having inference read remote objects directly at random. Logs and monitoring should only capture paths, capacity levels, and load success/failure — there’s no need to write model content into logs. Set capacity alert thresholds at roughly 15–20% free space on the data drive so you can clean caches or expand capacity proactively instead of waiting for the system drive to fill up.
By separating the program directory, model directory, and cache directory — and verifying that both the installation path and the environment variable take effect — you can keep large data reliably on the data drive and leave only the OS and a small amount of configuration on the system drive.
