DEV Community

Jovan Chan
Jovan Chan

Posted on • Originally published at runaihome.com

[Bug]: 500 Internal Server Error in v0.30.4 due to non-ASCII Fix 2026

This article was originally published on runaihome.com

500 Internal Server Error in Ollama v0.30.4 with Non-ASCII Windows Username Paths

Ollama v0.30.4 crashes with a 500 Internal Server Error when running on Windows systems where the user profile path contains non-ASCII characters. This occurs because the llama-server process fails to properly handle paths containing Unicode characters in the C:\Users\<username> directory structure. The model loading process terminates prematurely, leaving the server unable to initialize models stored in the default path.

Fix 1: Redirect Models Directory via Environment Variable

Set a custom models path that avoids the user profile directory entirely:

PowerShell (temporary):

$env:OLLAMA_MODELS = "C:\ollama-models"
ollama run llama2
Enter fullscreen mode Exit fullscreen mode

PowerShell (persistent):

[System.Environment]::SetEnvironmentVariable("OLLAMA_MODELS", "C:\ollama-models", "User")
Enter fullscreen mode Exit fullscreen mode

Create the directory and move existing models:

New-Item -ItemType Directory -Path "C:\ollama-models"
Copy-Item -Path "$env:LOCALAPPDATA\Ollama\models\*" -Destination "C:\ollama-models" -Recurse
Enter fullscreen mode Exit fullscreen mode

Fix 2: Create NTFS Junction Point

Preserve the default Ollama behavior while redirecting the physical storage location:

# Stop Ollama service first
Stop-Service Ollama

# Remove existing models directory
Remove-Item "$env:LOCALAPPDATA\Ollama\models" -Recurse

# Create junction point from user profile to ASCII-only path
cmd /c 'mklink /J "%LOCALAPPDATA%\Ollama\models" C:\ollama-models'

# Start Ollama service
Start-Service Ollama
Enter fullscreen mode Exit fullscreen mode

Fix 3: Update to Ollama v0.1.23 or Later

Later versions (v0.1.23+) addressed Unicode path handling in Windows builds. Verify your version:

ollama --version
Enter fullscreen mode Exit fullscreen mode

If below v0.1.23, download the latest release from https://ollama.com/download and reinstall. The update process preserves existing models in %LOCALAPPDATA%\Ollama\models.

Which Fix to Use

Use Fix 1 for immediate temporary testing

Top comments (0)