Ollama In Your IDE

Connect editor tools like Continue.dev to a local Ollama server for private, free code completion.

TL;DR

  1. Point IDE extensions at the local 11434 port.
  2. Pick a coder model like qwen2.5-coder for autocomplete.
  3. Set apiBase to localhost:11434 in the extension config.

Prepare Ollama

    Pull A Coder

    Download a coding model for the editor.

    ollama pull qwen2.5-coder
    Keep It Loaded

    Pin the model so autocomplete stays fast.

    export OLLAMA_KEEP_ALIVE=-1
    Confirm It Runs

    Check the server responds on its port.

    curl http://localhost:11434

Continue.dev Config

    Model Entry

    Add a model block to ~/.continue/config.yaml.

    models:
      - name: Ollama Coder
        provider: ollama
        model: qwen2.5-coder
        apiBase: http://localhost:11434
    provider

    Tell Continue to use the Ollama provider.

    provider: ollama
    apiBase

    Point the block at the local server URL.

    apiBase: http://localhost:11434

Cursor And Others

    OpenAI Base URL

    Cursor needs an OpenAI-compatible endpoint.

    # Set base URL to the /v1 path in settings
    Public Tunnel

    Expose localhost, since Cursor calls from its cloud.

    # A tunnel maps a public URL to :11434
    Prefer Local Tools

    Continue.dev runs fully local, no tunnel.

    # No cloud round-trip with Continue.dev

Pick A Model

    Autocomplete

    A small coder model gives instant suggestions.

    ollama pull qwen2.5-coder:1.5b
    Chat And Edits

    A larger model handles refactors and Q&A.

    ollama pull qwen2.5-coder:7b
    General Coder

    codellama is a solid all-round choice.

    ollama pull codellama

Tips

  1. Use a fast small coder model like qwen2.5-coder:1.5b for tab autocomplete, and a larger one for chat and refactors.
  2. Keep ollama serve running and pin the model with OLLAMA_KEEP_ALIVE=-1, so suggestions stay instant while you type.

Warnings

  1. Continue.dev talks to Ollama over its HTTP API, not the Language Server Protocol; there is no LSP bridge to configure.
  2. Cursor proxies requests through its cloud, so a localhost Ollama needs a public tunnel or it cannot be reached.

In Practice

FAQ