Self-Hosted AI
Set up Ollama, LM Studio, and other local AI servers
Self-Hosted AI
Run AI models locally for privacy, offline access, and cost savings. This guide covers setting up self-hosted AI providers with Chatelope.
Why Self-Host?
- Privacy - Your data never leaves your machine
- Cost - No API fees after setup
- Offline - Works without internet
- Customization - Fine-tune and modify models
Hardware Requirements
Minimum
- 8GB RAM
- Modern CPU (Intel i5 / AMD Ryzen 5 or better)
- 10GB storage per model
Recommended
- 16GB+ RAM
- Dedicated GPU with 8GB+ VRAM
- SSD storage
For Large Models
- 32GB+ RAM
- GPU with 16GB+ VRAM (NVIDIA recommended)
- Fast NVMe storage
Ollama Setup
Ollama is the easiest way to run models locally.
Installation
macOS:
brew install ollamaLinux:
curl -fsSL https://ollama.com/install.sh | shWindows: Download from ollama.com/download
Running Models
Start the Ollama server:
ollama servePull a model:
ollama pull llama3
ollama pull mistral
ollama pull codellamaConnect to Chatelope
- Go to Settings > AI Settings
- Select Ollama as provider
- Server URL:
http://localhost:11434 - Select your model
Recommended Models
| Model | Size | Use Case |
|---|---|---|
| llama3 | 4.7GB | General chat |
| mistral | 4.1GB | Fast responses |
| codellama | 3.8GB | Code assistance |
| phi3 | 2.2GB | Lightweight |
LM Studio Setup
LM Studio provides a GUI for model management.
Installation
- Download from lmstudio.ai
- Install and open the application
- Browse and download models from the built-in catalog
Running the Server
- Open LM Studio
- Go to the Local Server tab
- Load your chosen model
- Click Start Server
Connect to Chatelope
- Go to Settings > AI Settings
- Select LM Studio as provider
- Server URL:
http://localhost:1234 - Select your model
LocalAI Setup
LocalAI is a drop-in replacement for OpenAI API.
Installation with Docker
docker run -p 8080:8080 --name local-ai \
-v $HOME/models:/models \
localai/localai:latestConnect to Chatelope
- Go to Settings > AI Settings
- Select Custom OpenAI Compatible as provider
- Base URL:
http://localhost:8080/v1 - Leave API key blank or use any value
Performance Tips
GPU Acceleration
For NVIDIA GPUs:
- Install CUDA drivers
- Ollama auto-detects GPU
- LM Studio: Enable GPU in settings
Memory Management
- Close other applications when running large models
- Use quantized models (Q4, Q5) for lower memory usage
- Monitor memory with
ollama ps
Model Selection
| RAM | Recommended |
|---|---|
| 8GB | 7B models (Q4) |
| 16GB | 13B models (Q4) or 7B (Q8) |
| 32GB+ | 70B models (Q4) |
Troubleshooting
Connection Refused
- Ensure the server is running
- Check the port is correct
- Verify firewall allows connections
Out of Memory
- Try a smaller model
- Use more aggressive quantization
- Close other applications
Slow Responses
- Enable GPU acceleration
- Use a smaller model
- Reduce context length
Accessing from Other Devices (Phone, Tablet, Other PCs)
By default, Ollama and LM Studio only listen on localhost. To reach them from the Chatelope mobile app or other devices, you need to expose the service on your network.
Prerequisites: Set OLLAMA_HOST=0.0.0.0 (and restart Ollama) or enable Serve on Local Network in LM Studio.
Option 1: mDNS / .local Names (Zero Config)
Your computer likely already broadcasts a .local hostname via mDNS. If your hostname is my-pc:
http://my-pc.local:11434- Works on macOS, iOS, Windows, Linux out of the box
- Android
.localresolution is unreliable - All devices must be on the same Wi-Fi / LAN
- Run
hostnamein a terminal to find your name
Option 2: Tailscale (Recommended)
Tailscale creates a secure mesh VPN and gives every device a stable, named DNS address via MagicDNS. No port forwarding, no Cloudflare, no ngrok needed. Free for personal use.
- Install Tailscale on your PC and phone/tablet
- Sign in with the same account on both
- Set
OLLAMA_HOST=0.0.0.0and restart Ollama - Access via the Tailscale name:
http://my-pc.tailnet-name.ts.net:11434Why Tailscale?
- Stable, memorable URL that works on every OS including Android
- Works from any network — home Wi-Fi, cellular, coffee shop
- End-to-end encrypted (WireGuard) — no traffic through third parties
- No Cloudflare account or domain needed
- Optional HTTPS certificates for
*.ts.netdomains
Option 3: nip.io / sslip.io (Zero Setup)
nip.io and sslip.io are free wildcard DNS services. Any subdomain containing an IP resolves to that IP:
http://ollama.192.168.1.50.nip.io:11434Replace 192.168.1.50 with your PC's LAN IP. Works on all devices including Android. Requires internet for DNS resolution.
Option 4: Router DNS Entry
Many routers (UniFi, Asus, OpenWrt, pfSense) let you add custom DNS entries. Add ollama.lan pointing to your PC's IP and every device resolves it automatically:
http://ollama.lan:11434Option 5: Caddy Reverse Proxy (Drop the Port Number)
Pair any method above with Caddy to eliminate the port number:
# Caddyfile
:80 {
reverse_proxy localhost:11434
}Now http://my-pc.local proxies to Ollama without needing :11434.
Quick Comparison
| Method | Setup | Android | Outside LAN | Example URL |
|---|---|---|---|---|
| mDNS (.local) | None | Unreliable | No | my-pc.local:11434 |
| Tailscale | Low | Yes | Yes | my-pc.ts.net:11434 |
| nip.io | None | Yes | No | ollama.192.168.1.50.nip.io |
| Router DNS | Low | Yes | No | ollama.lan:11434 |
| + Caddy | Low | — | — | my-pc.local (no port) |
Security Considerations
When self-hosting:
- Keep models updated
- When exposing to the network, use Tailscale or a VPN rather than opening ports to the internet
- Use network isolation if needed
- Review model licenses for your use case