# Ollama

> Guide on how to connect Ollama to Crowdin

URL: https://store.crowdin.com/ollama
Identifier: ollama
Category: AI
Type: Guide
Author: Crowdin

This guide provides step-by-step instructions on how to bridge your local Ollama instance with Crowdin.

Since Crowdin is a cloud-based platform, it cannot directly access your localhost. To bridge this gap, you can use **ngrok** to create a secure gateway.

## Step 1: Prepare Ollama

First, ensure Ollama is running and configured correctly on your local machine.

**1. Start Ollama.** Ensure the application is active in your system tray or terminal.

**2. Download a Model.** Use a model that performs well with translations. Command example:


```bash
ollama pull llama3
```

**3. Verify local access.** Open [http://localhost:11434](http://localhost:11434) in your browser. You should see the message: "Ollama is running".

## Step 2: Create a Tunnel with ngrok

This step creates a temporary public URL that Crowdin can use to "talk" to your computer.

**1. Install ngrok.** Download it from [ngrok.com](https://ngrok.com/download).

**2. Start the tunnel.** Run the following command in your terminal:

```bash
ngrok http 11434
```

**3. Copy the Forwarding URL.** Look for the line starting with Forwarding. It will look like https://a1b2-c3d4.ngrok-free.app.

**Note:** Keep this terminal window open. If you close it, the connection will break.

## Step 3: Connect to Crowdin Store

Now, we will use Crowdin's native OpenAI connector to point toward your local machine.

**1. Open Crowdin.** Navigate to your project and go to **Settings > AI**.

**2. Select Provider.** Choose the OpenAI (Native) connector.

**3. Configure Connection:**
   
   - **API Key:** Enter any placeholder text (e.g., ollama). While Ollama doesn't require a real key, Crowdin's form requires this field to be filled.
   - **Base URL:** Paste your ngrok URL and add /v1 at the end.
   - **Correct format:** https://your-unique-id.ngrok-free.app/v1
   - **Model Name:** Type the exact name of the model you downloaded.

### Note

- On the free version of ngrok, your URL changes every time you restart the app. You will need to update the Base URL in Crowdin whenever you restart your tunnel.
- Local LLMs depend on your hardware. If the model takes too long to respond, Crowdin might report a timeout error.
- Using this method keeps your data processing on your local hardware, which is excellent for sensitive content.
