> For the complete documentation index, see [llms.txt](https://docs.cherry-ai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherry-ai.com/docs/en-us/pre-basic/providers/ollama.md).

# Ollama

Ollama is an excellent open-source tool that lets you easily run and manage various large language models (LLMs) locally. Cherry Studio now supports Ollama integration, allowing you to interact directly with locally deployed LLMs in a familiar interface without relying on cloud services!

## What is Ollama?

Ollama is a tool that simplifies the deployment and use of large language models (LLMs). It has the following features:

* **Run locally:** The model runs entirely on your local computer without requiring an internet connection, protecting your privacy and data security.
* **Easy to use:** Download, run, and manage various LLMs with simple command-line instructions.
* **Rich model selection:** Supports many popular open-source models such as Llama 2, Deepseek, Mistral, and Gemma.
* **Cross-platform:** Supports macOS, Windows, and Linux.
* **Open API**: Supports OpenAI-compatible interfaces and can be integrated with other tools.

## Why use Ollama in Cherry Studio?

* **No cloud service required:** No longer limited by cloud API quotas and costs—experience the powerful capabilities of local LLMs to the fullest.
* **Data privacy:** All your conversation data stays local, so you don't have to worry about privacy leaks.
* **Offline available:** You can continue interacting with the LLM even without an internet connection.
* **Customization:** Choose and configure the LLM that best fits your needs.

## Configure Ollama in Cherry Studio

### **1. Install and run Ollama**

First, you need to install and run Ollama on your computer. Please follow these steps:

* **Download Ollama:** Visit the Ollama official website (<https://ollama.com/>), and download the corresponding installer for your operating system.\
  On Linux, you can directly run the following command to install Ollama:

  ```sh
  curl -fsSL https://ollama.com/install.sh | sh
  ```
* **Install Ollama:** Follow the installer instructions to complete the installation.
* **Download a model:** Open a terminal (or command prompt) and use `ollama run` to download the model you want to use. For example, to download the Llama 2 model, you can run:

  ```sh
  ollama run llama3.2
  ```

  Ollama will automatically download and run the model.
* **Keep Ollama running:** While you are using Cherry Studio to interact with Ollama models, make sure Ollama stays running.

### **2. Add Ollama provider in Cherry Studio**

Next, add Ollama as a custom AI provider in Cherry Studio:

* **Open settings:** In the left navigation bar of the Cherry Studio interface, click "Settings" (gear icon).
* **Go to model services:** On the settings page, select the "Model Services" tab.
* **Add provider:** Click Ollama in the list.

<figure><img src="/files/447bac05fcc903e381d25e79e57ce7e54fc31ee9" alt=""><figcaption></figcaption></figure>

### **3. Configure Ollama provider**

Find the newly added Ollama in the provider list and configure it in detail:

1. **Enabled status:**
   * Make sure the switch on the far right of the Ollama provider is turned on, indicating it is enabled.
2. **API key:**
   * Ollama by default**does not require** an API key. You can leave this field blank or fill in any content.
3. **API address:**
   * Enter the local API address provided by Ollama. Usually, the address is:

     ```
     http://localhost:11434/
     ```

     If you changed the port, please update it accordingly.
4. **Keep alive time:** This option sets the session retention time, in minutes. If there are no new conversations within the set time, Cherry Studio will automatically disconnect from Ollama and free up resources.
5. **Model management:**
   * Click the "+ Add" button to manually add the names of the models you have already downloaded in Ollama.
   * For example, if you have already downloaded`ollama run llama3.2`through`llama3.2`model, then you can enter`llama3.2`
   * Click the "Manage" button to edit or delete the added models.

## Get started

After completing the above configuration, you can select the Ollama provider and the model you have downloaded in Cherry Studio's chat interface, and start chatting with the local LLM!

## Tips and notes

* **First time running a model:** The first time you run a model, Ollama needs to download the model files, which may take a long time. Please be patient.
* **View available models:** Run in the terminal `ollama list` command to view the list of Ollama models you have downloaded.
* **Hardware requirements:** Running large language models requires certain computing resources (CPU, memory, GPU). Please make sure your computer meets the model's requirements.
* **Ollama documentation**: You can click on`View Ollama documentation and models`link to quickly jump to the Ollama official documentation.

***

### 💡 Get help and submit feedback

If you encounter any questions, bugs, or have suggestions for feature improvements during configuration or use, please refer to [Feedback and Suggestions](/docs/en-us/question-contact/suggestions.md) the official channels provided there.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherry-ai.com/docs/en-us/pre-basic/providers/ollama.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
