Install & Getting Started

Privacy-first AI on your terms. Own your conversations.

Getting Started with Private Chat Hub

Get Private Chat Hub running on your Android device and connect to your preferred AI backend in minutes.

πŸ“‹ Prerequisites

  • Android Device β€” Android 7.0 (API 24) or higher
  • AI Backend β€” One of: Ollama, LM Studio, OpenCode server, or on-device model (no server needed)
  • Network Connection β€” Same WiFi network as your server (not required for on-device models)

πŸ“₯ Installation

Option 1: Download APK (Easiest)

  1. Download the latest APK from GitHub Releases
  2. Enable Install from Unknown Sources in Android Settings β†’ Security
  3. Open the downloaded APK and follow the installation prompt
  4. Launch Private Chat Hub and configure your backend connection

Option 2: Build from Source

  1. Install Flutter SDK 3.10.1+
  2. Clone: git clone https://github.com/cmwen/private-chat-hub.git
  3. Get dependencies: flutter pub get
  4. Build: flutter build apk --release
  5. Install: flutter install

πŸ¦™ Connect to Ollama

Ollama is the recommended backend for most users. It runs locally and supports the widest range of open models.

Step 1: Install and Start Ollama

  • Download from ollama.com and install on your PC, Mac, or Linux server
  • Pull a model: ollama pull mistral
  • Ollama listens on port 11434 by default
  • To allow access from your phone, set: OLLAMA_HOST=0.0.0.0

Step 2: Configure in the App

  1. Open Private Chat Hub β†’ Settings β†’ Connection
  2. Select Ollama as the backend
  3. Enter your host URL, e.g. http://192.168.1.100:11434
  4. Tap Test Connection to verify
  5. Select a downloaded model and start chatting

Recommended Starter Models

  • mistral (7B) β€” Fast, well-rounded
  • llama3.2 (3B/8B) β€” Meta's latest, great quality
  • gemma3:4b β€” Google's Gemma 3, excellent for chat
  • qwen2.5:7b β€” Strong reasoning and code
  • deepseek-r1:7b β€” Thinking / extended reasoning

🎬 Connect to LM Studio

LM Studio lets you run any GGUF model with a GUI on Windows, macOS, or Linux.

Step 1: Install and Configure LM Studio

  1. Download from lmstudio.ai
  2. Download a model inside LM Studio
  3. Go to Local Server tab and start the server
  4. Enable Allow connections from network (so your phone can reach it)
  5. Note the server URL shown (usually http://<your-ip>:1234)

Step 2: Configure in the App

  1. Open Private Chat Hub β†’ Settings β†’ Connection
  2. Select LM Studio as the backend
  3. Enter your LM Studio URL, e.g. http://192.168.1.100:1234
  4. Tap Test Connection to verify
  5. Choose a loaded model and start chatting

πŸ”— Connect to OpenCode

OpenCode routes your requests through cloud providers (OpenAI, Anthropic, Google) via a self-hosted server. You bring your own API keys.

Step 1: Install and Start OpenCode Server

  1. Install opencode on your server or PC
  2. Configure your cloud API keys in opencode's config
  3. Start the server (default port 8080)

Step 2: Configure in the App

  1. Open Private Chat Hub β†’ Settings β†’ Connection
  2. Select OpenCode as the backend
  3. Enter your server URL, e.g. http://192.168.1.100:8080
  4. Enter HTTP Basic Auth credentials if configured
  5. Tap Test Connection and choose a provider/model

πŸ“± On-Device Models (Offline)

Run Gemma or Gemini Nano directly on your Android deviceβ€”no server or internet connection required.

  1. Open Private Chat Hub β†’ Settings β†’ On-Device Model
  2. Download a compatible on-device model (Gemma 3 recommended)
  3. Select it as your active model
  4. Chat fully offlineβ€”no network requests made

Note: On-device models require a modern Android device with sufficient RAM (4 GB+ recommended).

πŸ’‘ Tips for Best Experience

  • WiFi is best β€” Large models respond faster over WiFi than mobile data
  • System prompts β€” Set a custom persona per conversation in Chat Settings
  • Tool calling β€” Enable tools (web search, location, URL fetch) in Settings β†’ Tools
  • Model comparison β€” Use the comparison mode to run the same prompt across two models
  • TTS β€” Tap the speaker icon to have a response read aloud
  • Export β€” Back up your chats via Menu β†’ Export Conversation

πŸ”§ Troubleshooting

  • Can't find host: Ensure your phone and server are on the same WiFi network
  • Connection refused: Check the server is running and listening on the correct port
  • Ollama not reachable: Set OLLAMA_HOST=0.0.0.0 to allow LAN connections
  • LM Studio not reachable: Enable Allow connections from network in LM Studio
  • Slow first response: Normal for large modelsβ€”subsequent responses are faster after warm-up
  • Tool calls failing: Some models don't support tool calling; try llama3.1 or mistral-nemo with Ollama

πŸ“– Developer Setup

Want to build from source or contribute? See the GitHub repository for full development setup, architecture docs, and contribution guidelines.