On Windows, Ollama inherits user and system environment variables when its process starts. Changing a variable in Settings does not rewrite the environment of an already-running application. If a documented setting appears ignored, quit Ollama fully, save the variable in the intended account context, and start the app again using the documented Windows procedure.
Find the process that is actually serving requests
First determine whether you use the Windows desktop app, a manually launched server, a service wrapper or a container. Those launch paths can inherit configuration differently. A setting changed for your interactive account may not apply to a process started under another account or a container configuration.
Also check whether an older instance is still running. Starting another shell and setting a variable there does not necessarily replace the background app answering requests. Use supported application controls to quit and restart the intended process rather than killing unrelated processes indiscriminately.
Distinguish variable scope from variable spelling
Check the exact documented variable name and accepted value for your installed version. Then inspect where you set it. In PowerShell, the process environment is visible through the Env provider; user and machine values can also be inspected explicitly. Do not confuse a correctly spelled value in one scope with proof that another process inherited it.
These commands inspect values, not the complete running server state. Do not publish private hostnames in their output. If you use another variable containing sensitive data, avoid printing it at all; verify behaviour through a safe supported diagnostic instead.
$env:OLLAMA_HOST
[Environment]::GetEnvironmentVariable('OLLAMA_HOST', 'User')
[Environment]::GetEnvironmentVariable('OLLAMA_HOST', 'Machine')Configuration is inherited at process start
A simplified Windows process model; service and container launchers may have their own configuration paths.
Before restart
- Saved variable
A new user or system value exists for future processes.
- Existing process
Can retain the environment it inherited earlier.
After restart
- Intended launcher
Starts Ollama in the intended user context.
- Observed behaviour
Verify the setting through a supported diagnostic or harmless request.
A saved value and a running process using that value are two different observations.
Follow the Windows restart sequence
Ollama's FAQ describes quitting the app, editing the account's environment variables through Windows settings, saving the changes and starting Ollama again from the Start menu. Use that sequence for the ordinary desktop setup. If you intentionally use a service or container, follow that launcher's configuration instructions instead.
A browser refresh is not a server restart. Nor does closing a terminal necessarily stop an independently running desktop application. The process that receives the request must be the one started after the new configuration became available.
Scroll the table horizontally to see all columns.
| Observation | What it proves | What remains to check |
|---|---|---|
| Variable visible in current shell | That shell has the value | Background app inherited it |
| Value saved at user scope | Future relevant processes can inherit it | Correct user and launch path |
| App restarted | A new process should exist | It is the process serving the request |
| Behaviour changed in a test | Tested path uses the expected setting | Other clients or instances behave the same |
Verify with a harmless request
Choose a supported check tied to the setting you changed. For a model directory change, inspect the documented storage behaviour and installed model availability. For a connection setting, confirm the intended local endpoint and client path. Do not expose the service on every network interface merely to prove that a configuration was read.
Record the installed version, setting name, launch method and observed result. Keep secret values out of the record. If the value is accepted but the behaviour still differs, inspect whether another configuration source, instance or client route explains the discrepancy.
Avoid turning a scope problem into a networking problem
A common wrong turn is broadening OLLAMA_HOST or allowing every browser origin because a client cannot connect. Those changes affect exposure and browser access, not simply environment inheritance. First verify which process is running and which address the client is using.
Similarly, increasing queue or context settings without confirming the active process can create confusion: the new value may not be in effect, or it may take effect later after an unrelated restart. Make one deliberate change and verify it before adjusting capacity controls.
Keep a small working configuration record
The general lesson applies to many developer tools: configuration is data consumed by a process at a particular time and scope. Checking that consumption is more useful than repeatedly typing the same value into different windows.
- Record the app version and launch path.
- Record variable names and intended scopes without secret values.
- Quit the intended process before testing a restart-dependent change.
- Verify the actual request route after restart.
- Remove obsolete settings only after understanding why they were present.
Frequently asked questions
Why did editing an Ollama environment variable have no effect? An already-running process can retain its previous environment. Confirm the correct user context, quit Ollama fully and restart it using the documented Windows procedure.
Does setting a variable in PowerShell update every running app? No. A process-scoped setting affects that shell and processes it launches. It does not rewrite the environment of an existing Ollama desktop process or a separate service.
Should I post all environment variables in a bug report? No. Inspect only the relevant non-sensitive variable and sanitise the output. A full environment dump can contain credentials and unrelated private configuration.
Sources
Technical references checked .



