Perplexity.ai is genuinely useful, but it sends every query to their servers, logs your searches, and charges $20/month for full access to the best models. Perplexica is the open-source self-hosted equivalent — it combines a local or remote LLM with SearXNG (a privacy-respecting metasearch engine) to answer questions with citations, entirely on your own infrastructure.
This guide walks through the Docker setup, connecting Ollama for local model inference, configuring the SearXNG integration, understanding focus modes, and how the experience compares to Perplexity.ai in practice.
How Perplexica Works
When you submit a query to Perplexica:
- The query is reformulated into effective search terms by the LLM.
- SearXNG executes the search across multiple search engines (Google, Bing, DuckDuckGo, etc.) and returns raw results.
- Perplexica fetches and parses the top result pages.
- The page content is chunked and embedded using a local embedding model.
- The most relevant chunks are retrieved and passed to the LLM as context.
- The LLM writes an answer with inline citations pointing to source URLs.
This pipeline means Perplexica always searches the live web — it is not limited to a training data cutoff, unlike a standalone local LLM. The combination of fresh web data and local inference is the core value proposition.
Prerequisites
You need Docker and Docker Compose installed. Optionally, install Ollama for local model inference (you can also configure it to use OpenAI or other cloud APIs).
Pull a capable Ollama model:
ollama pull llama3:8b # Minimum capable model
ollama pull llama3.3:70b # Better quality, requires 48+ GB RAM
ollama pull nomic-embed-text # For local embeddings
Docker Setup
Clone the Perplexica repository:
git clone https://github.com/ItzCrazyKns/Perplexica
cd Perplexica
Copy and edit the configuration file:
cp sample.config.toml config.toml
nano config.toml
The key sections to configure:
[GENERAL]
PORT = 3000
SIMILARITY_MEASURE = "cosine"
[API_KEYS]
OPENAI = "" # Leave blank to use local Ollama only
GROQ = "" # Optional: Groq for faster inference
[API_ENDPOINTS]
SEARXNG = "http://searxng:4000" # Internal Docker network name
OLLAMA = "http://host.docker.internal:11434"
[CHAT_MODEL]
PROVIDER = "ollama"
NAME = "llama3:8b"
[EMBEDDING_MODEL]
PROVIDER = "local"
NAME = "xenova/all-MiniLM-L6-v2" # Browser-compatible embedding
The host.docker.internal address lets the Docker container reach your host machine’s Ollama server. On Linux, you may need to use your host’s actual LAN IP instead.
Launch the full stack:
docker compose up -d
This starts two containers:
- perplexica-app: The Next.js frontend and API server on port 3000
- searxng: The SearXNG search engine on port 4000 (internal only)
Visit http://localhost:3000 to access the UI.
Configuring SearXNG
SearXNG is a metasearch engine that queries multiple search providers simultaneously while removing tracking parameters. Perplexica’s Docker Compose file includes a pre-configured SearXNG instance, so you do not need to set it up separately.
The SearXNG config lives at searxng/settings.yml. By default it queries Google, Bing, and DuckDuckGo. You can adjust the engine list, add specific engines for news or academic sources, or add your own SearXNG instance if you already have one running:
[API_ENDPOINTS]
SEARXNG = "https://your-existing-searxng-instance.example.com"
If you use an external SearXNG instance, make sure it has the json output format enabled in its settings.
Using Ollama for Local LLM Inference
Perplexica supports a range of Ollama models. The quality of answers scales with model capability, but so does inference speed and memory requirements:
| Model | VRAM/RAM | Quality | Speed |
|---|---|---|---|
| llama3.2:3b | 4 GB | Acceptable | Fast |
| llama3:8b | 8 GB | Good | Moderate |
| llama3.3:70b | 48 GB | Excellent | Slow |
| mistral:7b | 8 GB | Good | Moderate |
| qwen2.5:14b | 12 GB | Very good | Moderate |
Switch models in the Perplexica UI settings panel without restarting Docker — the model change takes effect on the next query.
Using Groq for Faster Cloud Inference
If local inference is too slow but you still want web search privacy, Groq provides a good middle ground — the search queries still go through your SearXNG instance, and only the LLM inference step uses the Groq API:
[API_KEYS]
GROQ = "gsk_your-groq-key"
[CHAT_MODEL]
PROVIDER = "groq"
NAME = "llama-3.3-70b-versatile"
Focus Modes
Perplexica’s focus modes restrict the search scope to specific source types. In the UI, click the compass icon next to the search bar to select:
| Focus Mode | What It Searches |
|---|---|
| All | General web search |
| Academic | ArXiv, PubMed, and academic sources |
| Writing | Returns drafts and writing assistance without web search |
| YouTube | YouTube video metadata and transcripts |
| Wolfram Alpha | Mathematical and factual computation |
| Reddit discussions and community opinions |
Academic mode is particularly valuable. When researching technical topics, it surfaces actual papers from ArXiv with proper citations, which is significantly more useful than a general web search returning blog posts about the same topic.
Reddit mode is underrated for product research — it surfaces real user opinions and troubleshooting threads rather than SEO-optimized marketing content.
Perplexica vs Perplexity.ai
| Feature | Perplexica | Perplexity.ai |
|---|---|---|
| Privacy | Fully local option | Queries logged to Perplexity |
| Cost | Free (self-hosted) | Free tier / $20/month Pro |
| Model quality (best) | Llama 3.3 70B | Claude 3.5 Sonnet / GPT-4o |
| Answer quality | Good to very good | Excellent |
| Citation quality | Good | Excellent |
| Focus modes | 6 modes | 5 modes |
| Image search | Not currently | Yes |
| Mobile app | No | Yes |
| Follow-up questions | Yes | Yes |
| Setup required | Docker + config | None |
Perplexity.ai still wins on raw answer quality because it has access to the most capable closed models. For research-grade questions where you need the best possible synthesis, the cloud service has an edge. But Perplexica on a capable local model is genuinely close, and the privacy advantage is absolute — your queries never leave your machine.
Performance Tuning Tips
- CPU-only mode: If you have no GPU,
llama3.2:3bis usable but slow (20–40 seconds per query). Add more RAM before adding a bigger model. - Embedding speed: The default
xenova/all-MiniLM-L6-v2runs in-browser and can be slow on first use. Switch to Ollama’snomic-embed-textfor faster server-side embeddings. - SearXNG caching: Enable SearXNG’s Redis cache in
settings.ymlto speed up repeat queries on the same topic. - Result count: Reduce
MAX_SEARCH_RESULTSin config.toml if queries are slow — fewer pages to scrape means faster response.
Perplexica is the best self-hosted AI search option available right now. If you are comfortable with Docker and want web-augmented AI answers without giving your search history to any company, it is an hour of setup well spent.