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.

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 restart Ollama (close it from the system tray and reopen)

Option B: Temporary (current session only)

Open PowerShell and run:

$env:OLLAMA_ORIGINS = "https://plotforge.app"
ollama serve

macOS

Open Terminal and run:

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

Then restart Ollama. 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

  • Make sure OLLAMA_ORIGINS is set correctly (see Step 3)
  • After setting the environment variable, you must fully restart Ollama — not just the terminal
  • Verify it's set by running ollama serve and checking the startup log

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.