Free, open source, made for developers who want local models
Windows wizard Cloudflare Tunnel No domain option Bearer auth MIT

Connect Ollama to Cursor without fighting the setup

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.

No OpenAI token bill Works with Cursor BYOK English + Persian
# Friendly path on Windows
Installer: Cursor-Ollama-Setup.exe
$ npm i -g cursor-ollama
$ cursor-ollama wizard
$ cursor-ollama tray
$ cursor-ollama verify
$ cursor-ollama settings

# Cursor → Settings → Models
Base URL: https://your-host.example.com/v1
Cursor alias: gpt-4-turbo → Ollama model
No domain: https://random.trycloudflare.com/v1

Why this exists

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.

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.

With cursor-ollama

A guided setup, an authenticated proxy, model aliases, health checks, tray controls, settings page, and a clean uninstall path live in one small tool.

5-minute wizard

Graphical setup on Windows checks prerequisites, writes config, creates shortcuts, and launches tray.

🔒

Secure by default

Strategy C proxy validates Bearer tokens. cloudflared never exposes raw Ollama to the internet.

🏷️

Model name rewrite

Pick a Cursor-friendly name like gpt-4-turbo while Ollama runs qwen, gemma, or any local model.

🖥️

Tray + Start all

Start or stop proxy and tunnel from the system tray. Optional launch at Windows login.

Built-in verify

Health endpoints on proxy and tunnel plus cursor-ollama verify before you paste into Cursor.

🧹

Clean uninstall

Remove tray, shortcuts, and services with cursor-ollama uninstall or the Windows installer.

How your code reaches local Ollama

One HTTPS URL in Cursor. Everything else stays on your machine.

Cursor IDEcloud backend
Cloudflare TunnelHTTPS + DNS
Auth proxy:11435
Ollama:11434

Complete wizard guide — step by step

Follow every screen in cursor-ollama wizard. Estimated time: 5–15 minutes the first time (mostly Cloudflare login).

0

Welcome

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.

1

Prerequisites

Wizard checks Node.js, Ollama, and cloudflared. Install anything marked MISSING before continuing.

  • Node 18+ from nodejs.org
  • Ollama from ollama.com — run ollama serve
  • cloudflared from Cloudflare downloads
2

Cloudflare Tunnel

Choose your tunnel mode: Cloudflare domain or temporary trycloudflare link.

  • Set Ollama port (11434) and proxy port (11435) if needed.
  • Named mode: hostname + Check tunnel + DNS during install.
  • Quick mode: auto URL — copy/refresh from tray or Settings later.
cloudflared tunnel login   # named mode only
cloudflared tunnel create cursor-ollama
3

Models

Choose 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.

4

Windows options

  • Desktop shortcut — quick access to tray
  • Start with Windows — auto-launch tray at login
  • Launch tray after install — recommended
5

Install & finish

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.

Settings page & tray

After install, manage ports, tunnel mode, and public URLs without editing JSON by hand.

Open Settings

Tray → Settings… or cursor-ollama settings.

Copy tunnel URL

Tray → Copy tunnel URL for Cursor Base URL.

Refresh quick tunnel

New trycloudflare link — update Cursor after refresh.

Advanced: config file

Tray → Open config file; Stop all → Start all after port changes.

Connect Cursor IDE in 60 seconds

After verify passes, paste these values into Cursor Settings → Models (BYOK / OpenAI-compatible).

1. Open Cursor settings

Cursor → Settings → Models → OpenAI API key section. Enable Override OpenAI Base URL.

2. Paste your tunnel 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)

3. Test in chat

Open a new chat, select your mapped model, and send a message. Traffic stays on your hardware — no OpenAI billing.

4. Keep stack running

Use tray → Start all or cursor-ollama stack start. If tunnel shows off, run verify and check cloudflared credentials.

Before you start — checklist

Node.js 18+

Runs the CLI, wizard server, proxy, and tray.

Ollama

Local LLM server on port 11434 with at least one pulled model.

cloudflared

Cloudflare Tunnel connector. Required for both named tunnels and trycloudflare quick links.

Cloudflare domain

Optional — use wizard quick mode for a temporary trycloudflare URL instead.

Frequently asked questions

Is this really free?

Yes. cursor-ollama is MIT licensed. You may pay for your domain, electricity, and hardware — not OpenAI tokens.

Does Cursor send data to OpenAI?

With BYOK configured to your tunnel URL, chat goes to your proxy → Ollama. Model names like gpt-4-turbo are aliases only.

Tunnel health returns 530 / off in tray

Start proxy first, then tunnel. Run cursor-ollama stack start. Missing credentials are auto-repaired; restart tray after updating.

How do I uninstall?

Run cursor-ollama uninstall or use Windows Add/Remove Programs. Use --keep-config to preserve settings.

Can I use macOS or Linux?

Yes via CLI path. The graphical wizard and tray shortcuts are optimized for Windows; stack commands work everywhere.

No Cloudflare domain?

In the wizard choose temporary trycloudflare link. Copy/refresh the URL from tray or Settings.

Cursor model name variants (gpt-4o, dated names)?

The proxy rewrites exact names, dated variants, and falls back to your active mapping.

If this saves you time, help it grow

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.