|
|
||
|---|---|---|
| README.md | ||
README.md
Ollama + Cloudflare + Obsidian BMO Chatbot
Course: Software Engineering — Final Project
A self-hosted AI server running Ollama, tunneled through Cloudflare, and connected to Obsidian via the BMO Chatbot plugin.
How It Works
Obsidian BMO Plugin → Cloudflare Tunnel → Ollama (localhost:11434)
Your prompts go from Obsidian through a secure Cloudflare tunnel to Ollama running on your local machine. No cloud AI provider needed.
Dependencies
| Tool | Purpose |
|---|---|
| Ollama | Runs the local AI model |
| cloudflared | Exposes Ollama over a public HTTPS URL |
| Obsidian | Note-taking app |
| BMO Chatbot Plugin | Connects Obsidian to the Ollama API |
Setup
1. Start Ollama
ollama pull llama3
ollama serve
2. Create a Cloudflare Tunnel
cloudflared tunnel login
cloudflared tunnel create ollama-tunnel
Edit ~/.cloudflared/config.yml:
tunnel: <YOUR_TUNNEL_ID>
credentials-file: /home/<USER>/.cloudflared/<YOUR_TUNNEL_ID>.json
ingress:
- hostname: ollama.yourdomain.com
service: http://localhost:11434
- service: http_status:404
cloudflared tunnel route dns ollama-tunnel ollama.yourdomain.com
cloudflared tunnel run ollama-tunnel
3. Configure BMO Plugin
- Obsidian → Settings → Community Plugins → install BMO Chatbot
- Set REST API URL to
https://ollama.yourdomain.com - Set Model to
llama3 - Leave API Key blank
Project Structure
/
├── README.md
├── requirements.txt
├── config/
│ └── cloudflared-config.yml
├── docs/
│ ├── architecture.md
│ └── dependencies.md
└── src/
Submission Checklist
README.mdrequirements.txtdocs/— architecture & dependenciessrc.tar.gz— source files (tar -czf src.tar.gz src/)