[GH-ISSUE #9502] Command to list set env vars #6190

Closed
opened 2026-04-12 17:33:35 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @dentroai on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9502

When I serve ollama via ollama serve it's possible to see the currently set environment variables:

$ ollama serve
2025/03/04 16:04:37 routes.go:1205: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:true OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/myuser/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
time=2025-03-04T16:04:37.924-03:00 level=INFO source=images.go:432 msg="total blobs: 0"
time=2025-03-04T16:04:37.924-03:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
time=2025-03-04T16:04:37.924-03:00 level=INFO source=routes.go:1256 msg="Listening on 127.0.0.1:11434 (version 0.5.12)"
time=2025-03-04T16:04:37.924-03:00 level=INFO source=gpu.go:217 msg="looking for compatible GPUs"
time=2025-03-04T16:04:38.218-03:00 level=INFO source=types.go:130 msg="inference compute" id=GPU-6931d121-7a6b-58b9-294d-4b8364203c73 library=cuda variant=v12 compute=8.9 driver=12.6 name="NVIDIA GeForce RTX 4060 Laptop GPU" total="7.7 GiB" available="6.8 GiB"

However, when running ollama in the background using curl -fsSL https://ollama.com/install.sh | sh I can't find any way to see which environment variables are used in the running ollama instance.

This would be great, as to ensure that the env vars are set correctly.

Originally created by @dentroai on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9502 When I serve ollama via `ollama serve` it's possible to see the currently set environment variables: ``` $ ollama serve 2025/03/04 16:04:37 routes.go:1205: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:true OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/myuser/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" time=2025-03-04T16:04:37.924-03:00 level=INFO source=images.go:432 msg="total blobs: 0" time=2025-03-04T16:04:37.924-03:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0" time=2025-03-04T16:04:37.924-03:00 level=INFO source=routes.go:1256 msg="Listening on 127.0.0.1:11434 (version 0.5.12)" time=2025-03-04T16:04:37.924-03:00 level=INFO source=gpu.go:217 msg="looking for compatible GPUs" time=2025-03-04T16:04:38.218-03:00 level=INFO source=types.go:130 msg="inference compute" id=GPU-6931d121-7a6b-58b9-294d-4b8364203c73 library=cuda variant=v12 compute=8.9 driver=12.6 name="NVIDIA GeForce RTX 4060 Laptop GPU" total="7.7 GiB" available="6.8 GiB" ``` However, when running ollama in the background using `curl -fsSL https://ollama.com/install.sh | sh` I can't find any way to see which environment variables are used in the running ollama instance. This would be great, as to ensure that the env vars are set correctly.
GiteaMirror added the feature request label 2026-04-12 17:33:35 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 4, 2025):

journalctl -u ollama --no-pager 
<!-- gh-comment-id:2698657566 --> @rick-github commented on GitHub (Mar 4, 2025): ``` journalctl -u ollama --no-pager ```
Author
Owner

@dentroai commented on GitHub (Mar 4, 2025):

yeah thanks!

<!-- gh-comment-id:2698662782 --> @dentroai commented on GitHub (Mar 4, 2025): yeah thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6190