Eviory LogoEviory

Fixing Local AI (Ollama) CORS & Connection Errors

August 17, 2026 (1w ago)

When connecting Eviory OS to a local Ollama instance, web browsers enforce Cross-Origin Resource Sharing (CORS) security policies. If Ollama is not explicitly instructed to allow web browser origins, requests will fail with a Network Error or Failed to fetch.

Symptom

  • Eviory AI displays: “Failed to connect to local Ollama server at http://127.0.0.1:11434
  • Browser Developer Console displays: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource.

How to Fix

1. macOS Setup

  1. Quit Ollama completely from the top menu bar icon.
  2. Open Terminal and set the origin environment variable:
launchctl setenv OLLAMA_ORIGINS "*"
  1. Restart the Ollama application.

2. Windows Setup

  1. Exit Ollama from the Windows Taskbar system tray.
  2. Open Settings → Search for “Edit the system environment variables”.
  3. Click Environment Variables….
  4. Under User variables, click New:
    • Variable name: OLLAMA_ORIGINS
    • Variable value: *
  5. Click OK, then launch Ollama again from your Start Menu.

3. Linux (systemd service)

  1. Open terminal and edit the systemd service override:
sudo systemctl edit ollama.service
  1. In the editor, add under the [Service] section:
[Service]
Environment="OLLAMA_ORIGINS=*"
  1. Save, reload systemd, and restart Ollama:
sudo systemctl daemon-reload
sudo systemctl restart ollama

Verifying the Connection

  1. Verify that Ollama is running by opening http://127.0.0.1:11434 in your browser. You should see "Ollama is running".
  2. Ensure you have pulled a model on your machine (e.g. ollama run llama3.3 or ollama run mistral).
  3. Open Eviory OS → SettingsAI Integrations → Select Local Ollama → Enter http://127.0.0.1:11434 and save.

[!TIP] For complete architectural details and custom model configurations, consult the Ollama Setup Guide in Docs.