# Autopilot - Running addon with local OLLAMA LLM

**URL:** https://discourse.getcockpit.com/t/autopilot-running-addon-with-local-ollama-llm/3271
**Category:** Addons
**Created:** [November 30, 2025, 10:21am UTC](https://discourse.getcockpit.com/t/autopilot-running-addon-with-local-ollama-llm/3271 "2025-11-30T10:21:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mickov3r](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/mickov3r/32/1597_2.png) [@mickov3r](https://discourse.getcockpit.com/u/mickov3r)
#### Post date: [November 30, 2025, 10:21am UTC](https://discourse.getcockpit.com/t/autopilot-running-addon-with-local-ollama-llm/3271/1 "2025-11-30T10:21:52Z")

</div>

I wanted to share my working configuration for running the Autopilot addon with a local Ollama instance instead of OpenAI API. This might be useful for those who want to use local LLMs for privacy or cost reasons.

**Environment:**

- Cockpit CMS Pro with Autopilot addon

- Ollama server running locally

**Step 1: Configure `config/config.php`**

Add the following to your config file:

```php
'autopilot' => [
    'openAI' => [
        'apiKey' => 'ollama',
        'chatModel' => 'gemma3:latest',
        'useTools' => false,
        'baseUri'=> 'http://your-ollama-server-ip:port/v1'
    ]
],

```

**Notes:**

- `apiKey` can be any non-empty string (Ollama doesn’t require authentication)

- `chatModel` - I’m using `gemma3:latest`, but you can use any model available in your Ollama instance

- `useTools` must be set to `false` (tool calling is not supported by most local models)

- `baseUri` - point this to your Ollama server’s OpenAI-compatible endpoint

**Step 2: Modify `addons/Autopilot/Controller/Autopilot.php`**

The addon has `useTools` hardcoded to `true` by default. To make it configurable, modify line 52:

**Before:**

```php
$useTools = $this->param('useTools', true);

```

**After:**

```php
$configUseTools = $this->app->retrieve('autopilot/openAI/useTools', true);
$useTools = $this->param('useTools', $configUseTools);

```

This change allows the `useTools` setting from the config file to be respected, while still maintaining backward compatibility (defaults to `true` if not specified).

**Result:** The Autopilot addon now works with my local Ollama instance running Gemma 3. Response times depend on your hardware, but it’s a great solution for local development or privacy-focused deployments.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/2X/c/c10b1a441e4b28715a9f60ec36bd851d1824d9ab.png)

---

<div class="post-metadata">

### Author: ![artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/artur/32/4_2.png) [@artur](https://discourse.getcockpit.com/u/artur)
#### Post date: [December 29, 2025, 12:38am UTC](https://discourse.getcockpit.com/t/autopilot-running-addon-with-local-ollama-llm/3271/2 "2025-12-29T00:38:41Z")

</div>

I hear you. `useTools` will be a config option for autopilot in the next release 👍
