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
- Quit Ollama completely from the top menu bar icon.
- Open Terminal and set the origin environment variable:
launchctl setenv OLLAMA_ORIGINS "*"- Restart the Ollama application.
2. Windows Setup
- Exit Ollama from the Windows Taskbar system tray.
- Open Settings → Search for “Edit the system environment variables”.
- Click Environment Variables….
- Under User variables, click New:
- Variable name:
OLLAMA_ORIGINS - Variable value:
*
- Variable name:
- Click OK, then launch Ollama again from your Start Menu.
3. Linux (systemd service)
- Open terminal and edit the systemd service override:
sudo systemctl edit ollama.service- In the editor, add under the
[Service]section:
[Service]
Environment="OLLAMA_ORIGINS=*"- Save, reload systemd, and restart Ollama:
sudo systemctl daemon-reload
sudo systemctl restart ollamaVerifying the Connection
- Verify that Ollama is running by opening
http://127.0.0.1:11434in your browser. You should see"Ollama is running". - Ensure you have pulled a model on your machine (e.g.
ollama run llama3.3orollama run mistral). - Open Eviory OS → Settings → AI Integrations → Select Local Ollama → Enter
http://127.0.0.1:11434and save.
[!TIP] For complete architectural details and custom model configurations, consult the Ollama Setup Guide in Docs.