Guide

How to Set Up Local AI Coding with Continue and Ollama (2025)

A step-by-step guide to running AI code completions and chat entirely on your machine using Continue and Ollama, with no cloud API costs.

By AI Coding Tools Directory2025-12-0810 min read
Last reviewed: 2025-12-08
ACTD
AI Coding Tools Directory

Editorial Team

The AI Coding Tools Directory editorial team researches and reviews AI-powered development tools to help developers find the best solutions for their workflows.

If you want AI-assisted coding without sending code to the cloud—for privacy, cost, or offline work—Continue with Ollama is one of the most straightforward setups. Continue is an open-source VS Code (and JetBrains) extension; Ollama runs local models on your machine. Together they give you completions and chat with no API keys and no data leaving your computer.

What you need

  • A Mac, Linux, or Windows machine with at least 8GB RAM (16GB recommended for larger models)
  • VS Code (or a JetBrains IDE)
  • About 10–15 minutes for setup

Step 1: Install Ollama

Ollama runs LLMs locally. Download it from ollama.com and install. On macOS, you can also use Homebrew:

brew install ollama

Start the Ollama service (it may start automatically after install):

ollama serve

In another terminal, pull a code-capable model. Good options in late 2025:

# Code-optimized, smaller (faster, less RAM)
ollama pull deepseek-coder-v2

# Or a general model that codes well
ollama pull codellama

# Larger, more capable (needs 16GB+ RAM)
ollama pull llama3.1

Test that Ollama is running:

ollama run deepseek-coder-v2 "Write a Python function to reverse a string"

You should see a response. If so, Ollama is ready.

Step 2: Install Continue

  1. Open VS Code.
  2. Go to the Extensions view (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows/Linux).
  3. Search for Continue.
  4. Install the Continue extension by Continue Dev.

After installation, the Continue sidebar should appear. If it doesn't, open it from the left sidebar or via the command palette (Cmd+Shift+P / Ctrl+Shift+P) and search for "Continue".

Step 3: Connect Continue to Ollama

  1. Open the Continue sidebar.
  2. Click the settings (gear) icon or use Continue: Open Config from the command palette.
  3. Your config is stored in ~/.continue/config.json (or the path shown in the UI).

Add an Ollama provider. Example config:

{
  "models": [
    {
      "title": "DeepSeek Coder (Local)",
      "provider": "ollama",
      "model": "deepseek-coder-v2"
    }
  ]
}

Continue will now use your local Ollama model for completions and chat. No API key required.

Step 4: Use Continue

  • Inline completions: As you type, Continue suggests code. Accept with Tab or the suggested keybinding.
  • Chat: Open the Continue sidebar and type a message. Ask for explanations, refactors, or new code.
  • Codebase context: Continue can use your open files and selected code as context. Select code and ask a question to get relevant answers.

Optional: Add a cloud model for hard tasks

You can mix local and cloud models. For example, use Ollama for fast completions and add an OpenAI or Anthropic key for harder reasoning tasks. In config.json:

{
  "models": [
    {
      "title": "DeepSeek Coder (Local)",
      "provider": "ollama",
      "model": "deepseek-coder-v2"
    },
    {
      "title": "GPT-4o (Cloud)",
      "provider": "openai",
      "model": "gpt-4o",
      "apiKey": "<your-key>"
    }
  ]
}

Use the model selector in the Continue chat to switch between them.

Troubleshooting

No completions appearing: Ensure Ollama is running (ollama serve) and the model is pulled (ollama pull deepseek-coder-v2). Check that Continue's config points to the correct model name.

Slow or no response: Smaller models (deepseek-coder-v2, codellama) are faster. If you have limited RAM, stick to 7B-class models.

Ollama not found: On some systems, you may need to add Ollama to your PATH or restart VS Code after installing Ollama.

Summary

  • Ollama runs models locally.
  • Continue connects your IDE to Ollama (and optionally cloud APIs).
  • Together they give you private, offline-friendly AI coding with no per-request costs.

For more on Continue, see our full review. For other local and privacy-focused options, check Tabnine (on-premise) and Aider (supports local models via Ollama).

Frequently Asked Questions

How do I get started with Local AI Coding with Continue and Ollama (2025)?
A step-by-step guide to running AI code completions and chat entirely on your machine using Continue and Ollama, with no cloud API costs.

Explore More AI Coding Tools

Browse our comprehensive directory of AI-powered development tools, IDEs, and coding assistants.

Browse All Tools