The manual way
You wire a tunnel by hand, worry about exposing Ollama, rename models until Cursor accepts them, and then forget which command fixed it last time.
cursor-ollama is a small open-source tool I built to make local AI in Cursor feel simple: run a wizard, get a secure HTTPS URL, paste it into Cursor, and keep using your own Ollama models.
Cursor cannot simply call your localhost Ollama from its cloud flow. The hard parts are routing, authentication, model names, and keeping it easy enough to use again tomorrow.
You wire a tunnel by hand, worry about exposing Ollama, rename models until Cursor accepts them, and then forget which command fixed it last time.
A guided setup, an authenticated proxy, model aliases, health checks, tray controls, settings page, and a clean uninstall path live in one small tool.
Graphical setup on Windows checks prerequisites, writes config, creates shortcuts, and launches tray.
Strategy C proxy validates Bearer tokens. cloudflared never exposes raw Ollama to the internet.
Pick a Cursor-friendly name like gpt-4-turbo while Ollama runs qwen, gemma, or any local model.
Start or stop proxy and tunnel from the system tray. Optional launch at Windows login.
Health endpoints on proxy and tunnel plus cursor-ollama verify before you paste into Cursor.
Remove tray, shortcuts, and services with cursor-ollama uninstall or the Windows installer.
One HTTPS URL in Cursor. Everything else stays on your machine.
Follow every screen in cursor-ollama wizard. Estimated time: 5–15 minutes the first time (mostly Cloudflare login).
On Windows, download Cursor-Ollama-Setup.exe from GitHub Releases and run the installer, or install globally with npm and run cursor-ollama wizard. Toggle فارسی in the top-right if you prefer Persian.
Wizard checks Node.js, Ollama, and cloudflared. Install anything marked MISSING before continuing.
Choose your tunnel mode: Cloudflare domain or temporary trycloudflare link.
cloudflared tunnel login # named mode only
cloudflared tunnel create cursor-ollamaChoose your local Ollama model and the name Cursor should see (allowlisted alias). Example: gpt-4-turbo → qwen3.6:35b-a3b.
Enable Skip pull if the model is already installed locally.
Wizard saves ~/.cursor-ollama/config.json, writes models.map.json, configures tunnel YAML, creates shortcuts, and shows a Cursor settings block to copy.
Click Close wizard when done. You can close the browser tab — the server stops automatically.
npm install -g cursor-ollama
cursor-ollama doctorcursor-ollama init
cloudflared tunnel login
cloudflared tunnel create cursor-ollama
cursor-ollama setupcursor-ollama stack start
cursor-ollama verify
cursor-ollama cursor-configcursor-ollama tray # background tray
cursor-ollama settings # ports + tunnel mode + quick link
cursor-ollama stack statusAfter install, manage ports, tunnel mode, and public URLs without editing JSON by hand.
Tray → Settings… or cursor-ollama settings.
Tray → Copy tunnel URL for Cursor Base URL.
New trycloudflare link — update Cursor after refresh.
Tray → Open config file; Stop all → Start all after port changes.
After verify passes, paste these values into Cursor Settings → Models (BYOK / OpenAI-compatible).
Cursor → Settings → Models → OpenAI API key section. Enable Override OpenAI Base URL.
Base URL must end with /v1. Use the Bearer key from cursor-ollama cursor-config or config.json.
Base URL: https://YOUR-TUNNEL-HOST/v1
API Key: (from cursor-ollama cursor-config)
Model: gpt-4-turbo (your chosen alias)
Open a new chat, select your mapped model, and send a message. Traffic stays on your hardware — no OpenAI billing.
Use tray → Start all or cursor-ollama stack start. If tunnel shows off, run verify and check cloudflared credentials.
Runs the CLI, wizard server, proxy, and tray.
Local LLM server on port 11434 with at least one pulled model.
Cloudflare Tunnel connector. Required for both named tunnels and trycloudflare quick links.
Optional — use wizard quick mode for a temporary trycloudflare URL instead.
Yes. cursor-ollama is MIT licensed. You may pay for your domain, electricity, and hardware — not OpenAI tokens.
With BYOK configured to your tunnel URL, chat goes to your proxy → Ollama. Model names like gpt-4-turbo are aliases only.
Start proxy first, then tunnel. Run cursor-ollama stack start. Missing credentials are auto-repaired; restart tray after updating.
Run cursor-ollama uninstall or use Windows Add/Remove Programs. Use --keep-config to preserve settings.
Yes via CLI path. The graphical wizard and tray shortcuts are optimized for Windows; stack commands work everywhere.
In the wizard choose temporary trycloudflare link. Copy/refresh the URL from tray or Settings.
The proxy rewrites exact names, dated variants, and falls back to your active mapping.
Star the repo, open issues, improve docs, send pull requests, or share it with a developer who wants local models in Cursor. Small contributions keep open-source tools alive.