# How do I set up Aider with my Ollama model?

**URL:** https://aiuniversecity.uk/t/how-do-i-set-up-aider-with-my-ollama-model/105
**Category:** General
**Tags:** asked-guide
**Created:** [September 20, 2026, 10:28pm UTC](https://aiuniversecity.uk/t/how-do-i-set-up-aider-with-my-ollama-model/105 "2026-09-20T22:28:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dean](https://aiuniversecity.uk/letter_avatar_proxy/v4/letter/d/3be4f8/32.png) [@dean](https://aiuniversecity.uk/u/dean)
#### Post date: [September 20, 2026, 10:28pm UTC](https://aiuniversecity.uk/t/how-do-i-set-up-aider-with-my-ollama-model/105/1 "2026-09-20T22:28:24Z")

</div>

I subscribed last week and want to try the Aider lesson but I cannot get Ollama and Aider to talk to each other. Where do I put the model name? Any help would be great.

---

<div class="post-metadata">

### Author: ![CityLife](https://aiuniversecity.uk/user_avatar/aiuniversecity.uk/citylife/32/40_2.png) [@CityLife](https://aiuniversecity.uk/u/CityLife)
#### Post date: [October 12, 2026, 1:50am UTC](https://aiuniversecity.uk/t/how-do-i-set-up-aider-with-my-ollama-model/105/2 "2026-10-12T01:50:53Z")

</div>

@AUC_Guide_bot test drill: answering this so the thread has a reply.

---

<div class="post-metadata">

### Author: ![AUC\_Guide\_bot](https://aiuniversecity.uk/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@AUC\_Guide\_bot](https://aiuniversecity.uk/u/AUC_Guide_bot)
#### Post date: [October 12, 2026, 1:50am UTC](https://aiuniversecity.uk/t/how-do-i-set-up-aider-with-my-ollama-model/105/3 "2026-10-12T01:50:59Z")

</div>

Hi dean,

Welcome to the AUC lessons! Below is a simple, step‑by‑step guide for getting **Aider** to talk to a model that you’ve pulled with **Ollama**. The exact commands can vary a bit depending on your OS, so treat these as the general ideas – if something looks different on your machine, you can always ask a mentor in the #help‑channel.

* * *

## 1. Make sure Ollama is running and has the model you want

| Step | What to do |
| --- | --- |
| 1.1 | Open a terminal and start Ollama (usually `ollama serve` or just run the Ollama app). |
| 1.2 | Pull the model you’d like to use, e.g. `ollama pull llama3` (replace _llama3_ with the model name you prefer). |
| 1.3 | Verify the model is available by running `ollama list`. You should see something like `llama3 7B` in the output. |

> **Tip:** Keep the terminal where Ollama is running open – Aider will send HTTP requests to the local server (default `http://localhost:11434`).

* * *

## 2. Install / update Aider (if you haven’t already)

```bash
pip install -U aider-chat

```

> If you’re using a virtual environment, activate it first. If you run into any trouble installing, a mentor can walk you through the steps.

* * *

## 3. Tell Aider which Ollama model to use

Aider can receive the model name in **two common ways** :

### Option A – Use the `--model` flag when you start Aider

```bash
aider --model ollama:llama3

```

- Replace `llama3` with the exact name you saw in `ollama list`.
- The `ollama:` prefix tells Aider to talk to an Ollama server.

### Option B – Set an environment variable (so you don’t have to type the flag each time)

```bash
export AIDER_MODEL=ollama:llama3 # Bash / Zsh
# or
set AIDER_MODEL=ollama:llama3 # Windows CMD

```

After setting the variable, just run `aider` and it will pick up the model automatically.

* * *

## 4. Verify the connection

1. Run `aider` (with the flag or after setting the variable).
2. You should see a short welcome banner and then a prompt like `>>>`.
3. Type a quick question, e.g. `>>> What is the capital of France?`
4. If Aider returns an answer, the link is working!

If you get an error that mentions “connection refused” or “cannot reach Ollama”, double‑check that the Ollama server is still running and that the port (`11434` by default) hasn’t been blocked by a firewall.

* * *

## 5. (Optional) Choose a different Ollama endpoint

If Ollama is listening on a non‑default port or a remote host, tell Aider the full URL:

```bash
aider --model ollama:http://my‑host:12345/llama3

```

or set:

```bash
export AIDER_MODEL=ollama:http://my‑host:12345/llama3

```

* * *

### Quick checklist

- Ollama server running (`ollama serve` or app open)
- Desired model pulled (`ollama pull …`)
- Aider installed (`pip install -U aider-chat`)
- Model name supplied (`--model ollama:your_model` **or** `AIDER_MODEL` env var)
- Tested with a simple prompt

If any of these steps give you an error, feel free to drop a reply here or ping a mentor. They can look at the exact error message and help you troubleshoot.

Good luck with the Aider lesson – it’s a great way to see how a local LLM can assist you while you code!

**AI assists.**
