What is Ollama?
Ollama is a free program that lets you run AI models directly on your computer. This means:
- No internet required - Works offline
- No monthly fees - Completely free to use
- Private - Your data stays on your computer
- Fast - No waiting for online services
Think of it like having your own personal AI generator living on your computer!
Step 1: Download and Install Ollama
- Go to ollama.com
- Click the download button and select your system (Windows, Mac, or Linux)
- Run the downloaded file and follow the installation steps
- That's it! Ollama is now installed.
Step 2: Download an AI Model
After installing Ollama, you need to download an AI model (think of it as the "brain" for your AI):
-
Open Command Prompt (Windows) or Terminal (Mac/Linux):
- Windows: Press
Windows key + R, typecmd, press Enter - Mac: Press
Cmd + Space, typeTerminal, press Enter - Linux: Press
Ctrl + Alt + T
- Windows: Press
-
Type the command and press Enter:
ollama run llama3.2 -
Wait for the download - This might take 5-30 minutes depending on your internet speed
-
You'll see a prompt like
>>>when it's ready - just typeexitto close it -
Visit ollama.com/search to see what other models you can download.
Step 3: Allow Ollama to be accessed from the web
If you are running FMG locally, you don't need this step. But if you want Ollama to be available form the web-version of the FMG, you need to set OLLAMA_ORIGINS.
For Windows Users:
- Press
Windows key + R - Type
sysdm.cpland press Enter - Click the "Environment Variables..." button
- Click "New..." and enter:
- Variable name:
OLLAMA_ORIGINS - Variable value: the FMG origins you use, for example
https://azgaar.github.io,http://localhost:5173
- Variable name:
- Click "OK" on everything
- Restart the Ollama server if it is running. You may need to restart your computer as well
For Mac Users:
- Open Terminal
- Type this command:
nano ~/.zshrc - Add this line at the end:
export OLLAMA_ORIGINS="https://azgaar.github.io,http://localhost:5173" - Save and exit:
- Press
Ctrl + X - Press
Yto confirm - Press
Enterto save
- Press
- Apply the changes:
source ~/.zshrc - Restart your computer
For Linux Users:
- Open Terminal
- Type these commands one by one:
echo 'export OLLAMA_HOST="0.0.0.0"' >> ~/.bashrc echo 'export OLLAMA_ORIGINS="https://azgaar.github.io,http://localhost:5173"' >> ~/.bashrc source ~/.bashrc - Restart your computer
Step 4: Start the server
- Open Command Prompt/Terminal and type
ollama serve. Leave this window open — Ollama is now running. - Open Fantasy Map Generator and open the AI text generator with the robot button in the Notes editor. Select ollama (local models) from the model list.
- In the key field, type the model name:
llama3.2(or whatever model you downloaded). This field is a model name, not an API key. - Update the prompt, optionally adjust the temperature, and click Generate
Important: Fantasy Map Generator connects to Ollama at http://localhost:11434/api/generate. This should work automatically by default. If you need to change the connection address, modify the endpoint in src/controllers/ai-generator.ts in a local source build.
That's It! You can now generate text using your local AI model.
Troubleshooting
If it doesn't work:
- Check that
ollama serveis still running in your command prompt/terminal - Try typing
ollama listto see if your model downloaded correctly - Make sure the model name you typed in the key field matches exactly what
ollama listreports - If you use the hosted version of FMG, double-check
OLLAMA_ORIGINSincludeshttps://azgaar.github.io
Other providers
The same dialog also supports OpenAI and Anthropic models. For those, the key field is a real API key, which is stored only in your browser's local storage and sent directly to the provider.
Main Page | Quick Start Tutorial | Q&A | Shortcuts | URL parameters | Changelog | Report a bug or suggest an idea | Policy
These pages are maintained in the main repository and synced automatically. Edits made here will be overwritten — please open a pull request instead.