| name | ollama-service-persistence |
| description | Create, update, and validate a persistent Windows service for Ollama (auto-start on boot), including setting OLLAMA_MODELS and managing the service lifecycle. Use when Ollama must be always-on or models must live in a custom directory. |
Ollama Service Persistence (Windows)
Use this skill to install or update a Windows Service that runs ollama serve with a fixed OLLAMA_MODELS path.
Quick start (admin PowerShell)
- Install/update persistence (try Task Scheduler first; Startup fallback if tasks are blocked) and point models to the repo store:
.\skills\operations\ollama-service-persistence\scripts\ollama_service_manager.ps1 -Action Install -Mode Task -TaskScope Auto -ModelsDir "C:\Users\usuario\Business\CLI_A1_GHR\CLI-main\models" -OllamaHost "127.0.0.1:11435"
Startup fallback (no Task Scheduler needed):
.\skills\operations\ollama-service-persistence\scripts\ollama_service_manager.ps1 -Action Install -Mode Startup -ModelsDir "C:\Users\usuario\Business\CLI_A1_GHR\CLI-main\models" -OllamaHost "127.0.0.1:11435"
- Check status:
.\skills\operations\ollama-service-persistence\scripts\ollama_service_manager.ps1 -Action Status -Mode Task
Startup status:
.\skills\operations\ollama-service-persistence\scripts\ollama_service_manager.ps1 -Action Status -Mode Startup
- Verify models:
ollama list
Notes
- Requires admin privileges (service create/config + system env var).
- The script writes/updates
scripts\ollama_service.ps1in the repo root and uses it as the service runner. - If
sc.exereturns 1053, use-Mode Task(Task Scheduler).ollama.exeis not a native Windows service. -TaskScope Autotries SYSTEM at boot, then falls back to USER at logon if SYSTEM is denied.- If Task Scheduler is blocked, use
-Mode Startupto drop a user logon launcher in the Startup folder. - If
sc.exereturns “Access denied,” run the command in an elevated PowerShell session. - Manual fallback:
ollama serveis non-persistent and must be started after reboot.
Removal
.\skills\operations\ollama-service-persistence\scripts\ollama_service_manager.ps1 -Action Remove