Skip to main content
Back to Settings

Setting Up Ollama with PlotForge

What is Ollama?

Ollama is a free, open-source tool that lets you run large language models (LLMs) locally on your own computer. When connected to PlotForge, it acts as a third AI provider alongside GPT-4o and Claude — giving you the ability to generate drafts, refine scenes, run consistency scans, and chat with AI using models that run entirely on your hardware.

This is an advanced feature. Performance will vary greatly depending on the models you choose and the hardware you're running on. Local models are generally slower than cloud-based AI, and results may take significantly longer depending on the complexity of the task, the size of the model, and your system's capabilities. Please be patient — generation times of several minutes are normal for larger models.


Requirements

  • A paid PlotForge plan (Starter or Pro)
  • A computer with sufficient hardware — at minimum 8GB of RAM, though 16GB+ is strongly recommended. A dedicated GPU will dramatically improve performance.
  • Ollama installed and running on the same machine where you use PlotForge in your browser

Step 1: Install Ollama

Windows

  1. Visit ollama.com/download and download the Windows installer
  2. Run the installer and follow the prompts
  3. Ollama will appear in your system tray when running

macOS

  1. Visit ollama.com/download and download the macOS app
  2. Drag Ollama to your Applications folder
  3. Launch it — you'll see the Ollama icon in your menu bar

Linux

Open a terminal and run:

curl -fsSL https://ollama.com/install.sh | sh

Then start the Ollama server:

ollama serve

Step 2: Download a Model

Ollama needs at least one model downloaded before PlotForge can use it. Open a terminal (or PowerShell on Windows) and run:

ollama pull llama3.1:8b

This downloads Meta's Llama 3.1 8B model, which is a good starting point. You can browse more models at ollama.com/library.

Recommended Models for Creative Writing

  • llama3.1:8b — ~4.7 GB download, needs 8 GB RAM. Good starting point, fast on most hardware.
  • mistral-nemo:12b — ~7 GB download, needs 12 GB RAM. Better prose quality, moderate speed.
  • llama3.1:70b — ~40 GB download, needs 48 GB+ RAM. Excellent quality, requires powerful hardware.
  • deepseek-v3 — Size varies. Strong reasoning and creative capabilities.

Tip: Start with a smaller model to verify everything works, then experiment with larger ones if your hardware supports them.


Step 3: Set the OLLAMA_ORIGINS Environment Variable

Because PlotForge runs in your browser at https://plotforge.app, your browser's security policies require Ollama to explicitly allow connections from this domain. Without this step, your browser will block the connection with a CORS error.

⚠️ Two things trip almost everyone up:

  1. The variable value must be https://plotforge.app exactly — with the https:// scheme, no trailing slash, no www.
  2. After setting or changing the variable, you must fully quit and relaunch Ollama. Closing the window isn't enough — Ollama keeps running in the system tray. Right-click the tray icon and choose Quit, confirm it's gone, then relaunch.

Windows

Option A: Permanent (recommended)

  1. Press Win + R, type sysdm.cpl, and press Enter
  2. Go to the Advanced tab and click Environment Variables
  3. Under User variables, click New
  4. Set Variable name to: OLLAMA_ORIGINS
  5. Set Variable value to: https://plotforge.app
  6. Click OK on all dialogs
  7. Fully quit Ollama: right-click the Ollama icon in the system tray → Quit (not just close the window). Confirm the tray icon is gone.
  8. Relaunch Ollama

Option B: One-liner in PowerShell (sets it permanently for your user)

setx OLLAMA_ORIGINS "https://plotforge.app"

Then quit Ollama from the tray and relaunch, as in step 7–8 above.

Verify it's set — open a new PowerShell window and run:

$env:OLLAMA_ORIGINS

You should see https://plotforge.app printed back. If nothing prints, the variable didn't stick or you need a new terminal window for the change to apply.

macOS

Open Terminal and run:

launchctl setenv OLLAMA_ORIGINS "https://plotforge.app"

Then right-click the Ollama icon in the menu bar → Quit Ollama, and relaunch. If you're running Ollama from the terminal instead:

OLLAMA_ORIGINS=https://plotforge.app ollama serve

To make it permanent, add this line to your ~/.zshrc or ~/.bashrc:

export OLLAMA_ORIGINS="https://plotforge.app"

Linux

If running Ollama as a systemd service, edit the service file:

sudo systemctl edit ollama

Add:

[Service]
Environment="OLLAMA_ORIGINS=https://plotforge.app"

Then restart:

sudo systemctl restart ollama

If running manually in a terminal:

OLLAMA_ORIGINS=https://plotforge.app ollama serve

Step 4: Connect PlotForge

  1. Open PlotForge and go to Settings
  2. Find the Local AI (Ollama) section
  3. Toggle Enable Ollama on
  4. Enter your Ollama Base URL — typically http://localhost:11434
  5. Click Test Connection — PlotForge will reach out to your local Ollama and discover your installed models
  6. Select your preferred model from the dropdown
  7. Click Save Ollama Settings

That's it! PlotForge will now use your local Ollama instance for all AI generation tasks — drafting, refining, polishing, outlining, character generation, consistency scanning, and AI chat.


Switching Between Providers

When Ollama is enabled, PlotForge automatically uses it for all generation tasks in the Draft, Outline, Characters, and Consistency tabs. In the AI Chat tab, you can switch between GPT-4o, Claude, and Ollama using the model dropdown.

To go back to cloud AI, simply toggle Enable Ollama off in Settings. Your Ollama configuration is saved and will be there when you toggle it back on.


Performance Expectations

Local AI is fundamentally different from cloud-based AI. Here's what to expect:

  • Generation times can range from 30 seconds to several minutes depending on model size and your hardware
  • Smaller models (7-8B parameters) are faster but produce shorter, simpler prose
  • Larger models (12B+ parameters) produce higher-quality output but are significantly slower without a powerful GPU
  • A dedicated GPU (NVIDIA with 8GB+ VRAM, or Apple Silicon with unified memory) makes a dramatic difference
  • CPU-only generation works but will be noticeably slow, especially with models above 8B

If a generation seems to be taking a long time, don't worry — the progress indicator will remain active as long as Ollama is working. PlotForge uses streaming, so the connection won't time out while tokens are being generated.


Troubleshooting

"Could not reach Ollama"

  • Make sure Ollama is running (check your system tray or run ollama serve)
  • Verify the URL is correct — the default is http://localhost:11434
  • Ensure no firewall is blocking local connections on port 11434

Test Connection works but generation fails

  • Your model may need more RAM than your system has available
  • Try a smaller model (e.g., ollama pull llama3.1:8b)
  • Check Ollama's terminal output for error messages

Browser shows CORS or network errors

If you see "Could not reach Ollama. This is usually a CORS issue" or the browser console shows No 'Access-Control-Allow-Origin' header is present on the requested resource, it means Ollama is running but didn't pick up OLLAMA_ORIGINS. In order of likelihood:

  1. Ollama wasn't actually restarted. Closing the window isn't the same as quitting — the daemon keeps running in the system tray / menu bar with its old environment. Right-click the tray icon → Quit (or on macOS, Quit Ollama), confirm the icon is gone, then relaunch.

  2. OLLAMA_ORIGINS has the wrong value. It must be exactly https://plotforge.app — with the https:// scheme, no trailing slash, no www. subdomain. Verify from a fresh terminal:

    • Windows PowerShell: $env:OLLAMA_ORIGINS
    • macOS/Linux: echo $OLLAMA_ORIGINS
  3. The env var was set in a different user scope. On Windows, if you set it in a terminal but Ollama was launched by auto-start at login, it may not see the change. Use the GUI method (System Properties → Environment Variables) and then sign out and back in, or use setx and restart Ollama.

  4. Test what Ollama is actually sending. From a terminal:

    curl -v -H "Origin: https://plotforge.app" http://localhost:11434/api/tags
    

    Look for access-control-allow-origin: https://plotforge.app in the response headers. If it's missing, Ollama didn't pick up the env var — go back to step 1.

Chrome shows "Local Network Access" warnings

  • This is a Chrome security feature that warns about connections from public websites to localhost
  • As of early 2026, Chrome warns but still allows these connections
  • The warnings do not affect functionality — your generations will complete normally

Need Help?

If you're having trouble getting Ollama connected, reach out to us at support@plotforge.app and we'll help you get set up.