For fiction writers tackling epic fantasy, complex worldbuilding, or sensitive and NSFW themes, keeping creative manuscripts strictly on local hardware is paramount. Cloud AI services present tangible risks: remote telemetry, privacy policy shifts, and the danger of unreleased prose leaking or being ingested into cloud training sets. Novelcrafter offers an industry-leading interface for planning, Codex bible tracking, and AI-assisted prose generation. However, because the Novelcrafter web app operates over secure HTTPS (https://app.novelcrafter.com), connecting it to a local AI server running unencrypted HTTP on localhost routinely triggers two frustrating technical roadblocks: Cross-Origin Resource Sharing (CORS) rejections and browser Mixed Content connection failures.
At 365Finds, our research indicates that writers do not need to compromise their privacy or pay recurring token fees to enjoy Novelcrafter's generative power. Connecting local open-source models via Ollama or LM Studio is entirely achievable once your environment variables, local server flags, and browser security permissions are aligned.
Our commercial and technical judgment is unequivocal:
- LM Studio is our primary recommendation for the majority of novelists. Its visual model explorer, direct GGUF quantization downloads, one-click CORS toggle, and Just-In-Time (JIT) memory management deliver a far more forgiving experience when switching between lightweight outline generation and heavy prose expansion.
- Ollama remains our top choice for technical authors running headless home servers, Linux desktop environments, or background automation pipelines where minimal memory overhead is mandatory.
- Safari is fundamentally unsuitable for this workflow. Because Safari strictly prohibits HTTPS-to-HTTP local communication without an override flag, fiction authors should immediately standardize on Chromium-based browsers (Google Chrome, Microsoft Edge, or Brave) to run this pipeline.
Here is the comprehensive, step-by-step guide to configuring Ollama, LM Studio, your browser, and Novelcrafter for a flawless, zero-leak offline writing environment.
Why the Connection Fails: CORS and Mixed Content Explained
When you attempt to connect Novelcrafter to your local machine, the browser initiates a network handshake from https://app.novelcrafter.com to http://localhost:11434 (Ollama) or http://localhost:1234 (LM Studio). This request immediately trips two browser security boundaries:
- Cross-Origin Resource Sharing (CORS): By default, modern browsers prevent a web application loaded from one domain from reading data from another origin—especially your private
localhost. Unless your local model server explicitly emits HTTP response headers that includeAccess-Control-Allow-Origin: https://app.novelcrafter.com(or a wildcard*), the browser abruptly terminates the connection. Novelcrafter displays a connection refusal or an infinite spinning loader. - Mixed Content / Insecure Content Blocking: Novelcrafter is served over encrypted
HTTPS. When an HTTPS page requests resources from an unencryptedHTTPendpoint on your local device, modern browsers classify it as active mixed content. Chromium-based browsers block this traffic by default to protect local network devices, while Safari blocks it outright with no native bypass.
To resolve these errors, you must permit incoming requests on the local server side (CORS) and authorize local HTTP communication on the browser side (Mixed Content).
Method 1: Configuring Ollama for Novelcrafter
Ollama runs as a low-overhead background daemon. By default, it rejects incoming HTTP requests originating from external web domains. You must define the OLLAMA_ORIGINS environment variable to explicitly trust Novelcrafter.
Step 1: Set the CORS Origin Variable
On Windows
On Windows, Ollama launches as a hidden background system tray service. Setting the variable requires updating Windows environment variables:
- Completely close Ollama: Right-click the Ollama llama icon in the Windows taskbar system tray and select Quit.
- Open Command Prompt (CMD) or PowerShell as an administrator or current user.
- Run the following command:
(Note: If you use other local web tools alongside Novelcrafter, you can use the wildcard valuesetx OLLAMA_ORIGINS "https://app.novelcrafter.com"setx OLLAMA_ORIGINS "*"instead). - Re-open Ollama from your Windows Start Menu. The daemon will restart with the new origin whitelist active.
On macOS
On macOS, you can launch Ollama directly from the Terminal with the environment prefix:
- Quit the Ollama application from the top macOS menu bar.
- Open Terminal and start the server:
OLLAMA_ORIGINS="https://app.novelcrafter.com" ollama serve - To make this permanent so you do not have to type it every session, add the export line to your shell configuration (
~/.zshrcor~/.bash_profile):
Or set it globally across launchd sessions using:echo 'export OLLAMA_ORIGINS="https://app.novelcrafter.com"' >> ~/.zshrclaunchctl setenv OLLAMA_ORIGINS "https://app.novelcrafter.com"
On Linux (systemd)
If you installed Ollama as a standard systemd service on Linux:
- Open the service drop-in configuration editor:
sudo systemctl edit ollama.service - In the editor window, enter the following lines:
[Service] Environment="OLLAMA_ORIGINS=https://app.novelcrafter.com" - Save the file and restart the daemon:
sudo systemctl daemon-reload sudo systemctl restart ollama
Step 2: Pre-Pull Your Writing Models
Novelcrafter does not download or manage model files for you. Before establishing the connection, pull your chosen open-source models via the terminal:
ollama pull llama3.1:8b
ollama pull mistral-nemo
ollama pull command-r
Verify that the model is functioning locally by running ollama run llama3.1:8b and testing a quick prompt.
Method 2: Configuring LM Studio for Novelcrafter
LM Studio provides a graphic interface tailored for managing GGUF model files. Depending on the version you have installed (LM Studio Classic or LM Studio Bionic v0.3+), follow the relevant path below.
LM Studio Bionic (Version 0.3.x and Newer)
- Launch LM Studio.
- Click the Settings (gear icon) located at the bottom of the left sidebar. (If the sidebar is collapsed, expand it via the top-left menu toggle).
- Select Local Model API from the settings menu.
- Toggle Local API Server to ON.
- Toggle CORS to ON. This allows external web clients like
app.novelcrafter.comto communicate with your local port. - Verify the Base URL display: The host is typically
127.0.0.1and the port is1234.
LM Studio Classic
- Launch LM Studio and ensure the application is set to Power User or Developer Mode (selectable via the dropdown in the bottom-left corner).
- Click the Developer Settings / Local Server icon (
<->) on the left navigation bar. - In the right-hand Server Settings panel:
- Check the box for Enable CORS.
- Check the box for Just-in-Time Model Loading. This setting is critical: it lets Novelcrafter detect and display every model downloaded to your disk, automatically loading weights into VRAM only when Novelcrafter sends a generation request.
- Click the toggle next to Status to switch it to Running.
- Confirm the endpoint reads
http://localhost:1234orhttp://127.0.0.1:1234.
Method 3: Unlocking Browser Mixed Content & Shield Settings
Even when your local AI engine has CORS enabled, Chromium-based browsers may still halt requests due to HTTPS-to-HTTP mixed content policies or strict ad-blocking shields.
1. Allow Insecure Content in Google Chrome and Microsoft Edge
- Open your browser and navigate to
https://app.novelcrafter.com. - Look at the address bar: click the Site Information / Tune icon (sliders or padlock) located immediately to the left of
app.novelcrafter.com. - Select Site settings.
- In the permissions list, locate Insecure content.
- Change the setting from Block (default) to Allow.
- Return to your Novelcrafter tab and click Reload.
2. Configure Brave Browser
Brave's built-in tracker protection actively blocks cross-network and unencrypted local traffic.
- In the Novelcrafter tab, click the Brave Lion Shield icon to the right of the address bar.
- Toggle Shields to DOWN (OFF) for
app.novelcrafter.com. - If issues persist, verify in
brave://settings/shieldsthat local network device access is permitted.
3. Safari Compatibility Notice
Safari enforces strict WebKit security that outright denies active mixed content calls from an HTTPS domain to an unencrypted http://localhost port. There is no user-accessible toggle to bypass this. Authors using macOS must use Chrome, Brave, Edge, or Firefox when integrating local models with Novelcrafter.
Connecting the Local Endpoint in Novelcrafter
Once your local server is broadcasting and your browser is configured, link the endpoint inside Novelcrafter:
- Log in to
https://app.novelcrafter.com. - Click your user avatar in the bottom-left corner and select AI Connections.
- Under the available connection catalog, locate either Ollama or LM Studio and click Add.
- Review the endpoint parameters:
- For Ollama: Host should be
localhost(or127.0.0.1), Port should be11434. - For LM Studio: Host should be
localhost(or127.0.0.1), Port should be1234.
- For Ollama: Host should be
- If the browser displays a prompt asking: "app.novelcrafter.com wants to access devices on your local network", click Allow.
- Click the Refresh button inside the connection card. If configured properly, a green checkmark will appear, and your pulled/downloaded models will populate the Supported Models dropdown.
Critical Post-Connection Settings: Collections and Prompt Tuning
Establishing a physical network handshake is only half the battle. To actually use your local models in Novelcrafter's Write tab, Chat, or Workshop, you must configure model collections and prompt parameters.
1. Adding Local Models to Model Collections
Novelcrafter separates AI connections from Model Collections. Novelcrafter's default cloud model collections do not automatically include local models, leaving them greyed out or missing in your project editor.
- Navigate to AI Connections > Model Collections.
- Create a new collection (e.g., "Offline Fiction Suite") or edit your current active collection.
- Locate your local models under the Ollama or LM Studio section and check the boxes to enable them for your manuscripts.
2. Prioritizing Connection Order
If you maintain multiple active connections (for instance, OpenRouter for quick brainstorming alongside LM Studio for private prose), Novelcrafter uses connection priority when resolving model names. In the AI Connections list, click and drag your local connection card to the very top. This guarantees Novelcrafter routes requests to your local GPU rather than attempting a cloud fallback.
3. Disabling System Messages for Specific Architectures
Certain open-source model families—most notably Google's Gemma and Gemma 2—throw errors such as:
Error running prompt 'user/assistant/user/assistant' while running a prompt
These models reject separate system message blocks in the OpenAI API schema.
- In Novelcrafter, open your local model's settings.
- Expand Advanced Settings.
- Locate the System msg. toggle and turn it OFF. Novelcrafter will then fold your system guidelines into the opening user prompt.
4. Tuning Context Length vs. VRAM Capacity
Novelcrafter injects rich manuscript context: Codex character entries, world notes, relationship states, and recent scene beats. If your local context window is set too high, your GPU will overflow VRAM into system RAM, slowing generation to a crawl or crashing the server.
| GPU Hardware Tier | Recommended Model Classes | Context Window Target | Quantization Sweet Spot |
|---|---|---|---|
| 8 GB VRAM (e.g., RTX 3060 Laptop, RTX 4060) | 7B – 8B parameters (Llama 3.1 8B, Mistral 7B) | 4,096 – 8,192 tokens | Q4_K_M |
| 12 GB – 16 GB VRAM (e.g., RTX 4070, 4080, Apple M2/M3 24GB) | 8B – 14B parameters (Mistral Nemo 12B, Gemma 2 9B) | 8,192 – 16,384 tokens | Q5_K_M or Q6_K |
| 24 GB+ VRAM (e.g., RTX 3090, RTX 4090, Apple M-Max 64GB+) | 27B – 70B parameters (Command R 35B, Llama 3.3 70B) | 16,384 – 32,768 tokens | Q4_K_M or Q5_K_M |
[!TIP] 365Finds Recommendation for Fiction Prose: For writers with 12GB to 16GB of VRAM, we strongly recommend Mistral Nemo 12B (Instruct) or Llama 3.1 8B (Instruct) quantized at
Q5_K_M. They strike the ideal balance between literary prose rhythm, adherence to complex Codex scene constraints, and brisk inference speeds exceeding 25 tokens per second.
Troubleshooting Quick Reference
| Issue Encountered | Root Cause | Exact Remedy |
|---|---|---|
TypeError: Failed to fetch | Local server not running or CORS blocked | Verify LM Studio/Ollama is running; recheck OLLAMA_ORIGINS or LM Studio CORS checkbox. |
| Endless spinning loader in Novelcrafter | Mixed Content blocked by browser | Open Site Settings in Chrome/Edge; set Insecure content to Allow. |
| Local models missing from dropdown | Model files not pulled or JIT disabled | In LM Studio, enable Just-in-Time Model Loading; in Ollama, run ollama pull <model> in terminal. |
| Model selectable but greyed out | Model not in current collection | Add the local model to an active Model Collection in Novelcrafter settings. |
| Extreme lag / System freeze during generation | VRAM overflowed into system RAM | Reduce context window in model settings or switch from a Q8/FP16 quant to Q4_K_M / Q5_K_M. |
By establishing proper CORS headers, unblocking browser insecure content policies, and setting up dedicated Model Collections, fiction authors achieve the gold standard of literary technology: the fluid structuring, beat tracking, and Codex depth of Novelcrafter, backed by 100% private, offline, and subscription-free generative intelligence.