What you'll build
You'll install Ollama and run an AI model directly on your computer, without internet and without API keys. You'll download a model like Llama 3.2, run it in your terminal, and chat with it. When you're done, you'll have your own local chatbot that works offline, is completely private, and has no usage costs. Ideal for sensitive data, learning how LLMs work, or simply having AI always available.
Why a local model?
| Cloud (Gemini, Claude, OpenAI) | Local (Ollama) |
|---|---|
| Requires internet | Works offline |
| Your data goes to their servers | Your data stays on your machine |
| Pay per use | Free (after download) |
| More powerful models | Smaller models |
๐ก Ideal for: sensitive data, no internet, or just learning how LLMs work under the hood.
Step 1: Install Ollama
| System | Command |
|---|---|
| macOS | brew install ollama |
| Linux | curl -fsSL https://ollama.ai/install.sh | sh |
| Windows | Download from ollama.com/download |
Verify installation:
ollama --version
Step 2: Download a model
ollama pull llama3.2
โณ First time downloads ~2GB. After that it's instant.
Step 3: Chat!
ollama run llama3.2
Type your message and press Enter. To exit: /bye
If something failed
| Error | Cause | Solution |
|---|---|---|
command not found: ollama | Not installed | Reinstall Ollama |
model not found | Not downloaded | Run ollama pull llama3.2 |
| Very slow | Low RAM | Use smaller model: llama3.2:1b |
| Freezes | Insufficient RAM | Close other apps, need 8GB free |
Bonus: Programmatic chatbot
Want to use Ollama from code (like you did with APIs)?
Ask any AI:
I need a Node.js chatbot that:
- Uses Ollama locally (no API key)
- Works in terminal
- Maintains conversation history
Give me the code and commands.
Ollama has a local REST API at http://localhost:11434.
What did you learn?
| Cloud API | Local Model |
|---|---|
| API key required | No API key |
| Internet required | Works offline |
| Remote server | Your computer |
The code is almost the same. Only the endpoint changes.
Next step
โ Chat with Web UI โ Give your chatbot a nice face