Chatelope
Settings

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
  • 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 ollama

Linux:

curl -fsSL https://ollama.com/install.sh | sh

Windows: Download from ollama.com/download

Running Models

Start the Ollama server:

ollama serve

Pull a model:

ollama pull llama3
ollama pull mistral
ollama pull codellama

Connect to Chatelope

  1. Go to Settings > AI Settings
  2. Select Ollama as provider
  3. Server URL: http://localhost:11434
  4. Select your model
ModelSizeUse Case
llama34.7GBGeneral chat
mistral4.1GBFast responses
codellama3.8GBCode assistance
phi32.2GBLightweight

LM Studio Setup

LM Studio provides a GUI for model management.

Installation

  1. Download from lmstudio.ai
  2. Install and open the application
  3. Browse and download models from the built-in catalog

Running the Server

  1. Open LM Studio
  2. Go to the Local Server tab
  3. Load your chosen model
  4. Click Start Server

Connect to Chatelope

  1. Go to Settings > AI Settings
  2. Select LM Studio as provider
  3. Server URL: http://localhost:1234
  4. 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:latest

Connect to Chatelope

  1. Go to Settings > AI Settings
  2. Select Custom OpenAI Compatible as provider
  3. Base URL: http://localhost:8080/v1
  4. 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

RAMRecommended
8GB7B models (Q4)
16GB13B 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 .local resolution is unreliable
  • All devices must be on the same Wi-Fi / LAN
  • Run hostname in a terminal to find your name

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.

  1. Install Tailscale on your PC and phone/tablet
  2. Sign in with the same account on both
  3. Set OLLAMA_HOST=0.0.0.0 and restart Ollama
  4. Access via the Tailscale name:
http://my-pc.tailnet-name.ts.net:11434

Why 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.net domains

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:11434

Replace 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:11434

Option 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

MethodSetupAndroidOutside LANExample URL
mDNS (.local)NoneUnreliableNomy-pc.local:11434
TailscaleLowYesYesmy-pc.ts.net:11434
nip.ioNoneYesNoollama.192.168.1.50.nip.io
Router DNSLowYesNoollama.lan:11434
+ CaddyLow——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

On this page