Back to articles
Technology Insight

Deploying Perplexica on a VPS: How to Build Your Own Private, Open-Source AI Search Engine

June 1, 2026

Introduction: The Shift Toward Sovereignty in AI Search

In the rapidly evolving landscape of artificial intelligence, conversational search engines have fundamentally transformed how we retrieve information. Modern professionals increasingly rely on AI to synthesize complex web data, analyze documentation, and generate insights in real-time. However, relying exclusively on proprietary commercial platforms introduces significant corporate challenges, primarily concerning data privacy, intellectual property leakage, and unpredictable subscription costs.

Every query sent to a public AI search engine potentially trains external models and exposes proprietary strategies. For enterprises and technology professionals, this risk is unacceptable. Fortunately, the open-source community has delivered a powerful alternative: Perplexica. As an open-source, self-hosted AI search engine, Perplexica replicates the advanced functionality of platforms like Perplexity AI while granting you absolute ownership of your data infrastructure. By deploying Perplexica on a Virtual Private Server (VPS), you can establish a secure, private search ecosystem tailored specifically to your organization's compliance and operational requirements.

What is Perplexica and Why Should You Self-Host It?

Perplexica is an advanced AI-powered search engine designed to scour the web, synthesize findings, and provide deeply contextual answers complete with source citations. Unlike standard Large Language Model (LLM) interfaces that rely entirely on static pre-training data, Perplexica utilizes Retrieval-Augmented Generation (RAG) to query the live internet before formulating responses.

Architecture-wise, Perplexica operates through several specialized search modes designed to optimize token usage and accuracy:

  • All Mode: Searches the entire web for general inquiries.
  • Academic Mode: Targets scholarly articles, journals, and research papers.
  • Writing Mode: Enables direct LLM interaction for content generation without web overhead.
  • YouTube Mode: Scrapes and processes video transcripts for targeted multimedia answers.
  • Reddit Mode: Searches community discussions for real-world peer opinions.

"Self-hosting Perplexica bridges the gap between public web utility and private infrastructure compliance. It ensures your organizational intellect stays within your perimeter."

Prerequisites: Choosing Your VPS and Infrastructure Layout

Before initiating the deployment process, ensuring your underlying VPS hardware is appropriately provisioned is critical for maintaining low latency and system stability. Perplexica itself is relatively lightweight because it offloads the heavy computational burden of LLM inference to external API providers or a dedicated local inference server.

For a standard production deployment utilizing external APIs (such as OpenAI, Anthropic, or Groq), the following hardware specifications are highly recommended:

  • CPU: 2 vCPUs (Dedicated vCPUs are preferred for high-concurrency business environments).
  • RAM: 4 GB minimum (To comfortably run the Perplexica backend, frontend, and SearXNG meta-search engine instances).
  • Storage: 20 GB to 40 GB SSD or NVMe storage.
  • OS: Ubuntu 22.04 LTS or Ubuntu 24.04 LTS.

Additionally, you will need a fully qualified domain name (FQDN) pointed to your VPS IP address if you plan to secure the installation with HTTPS for remote corporate access.

Step-by-Step Deployment Guide via Docker Compose

Utilizing Docker and Docker Compose is the standard industry practice for deploying Perplexica. This containerized approach ensures consistency across environments and simplifies long-term maintenance and software updates.

Step 1: System Update and Dependency Installation

First, establish an SSH connection to your VPS and update the system packages to their latest secure versions:

sudo apt update && sudo apt upgrade -y

Next, install the required system dependencies, including Git, Curl, and the Docker engine suite:

sudo apt install git curl docker.io docker-compose-plugin -y
sudo systemctl enable --now docker

Step 2: Cloning the Perplexica Repository

Clone the official Perplexica source repository into your preferred deployment directory (typically /opt or your user home directory) and navigate into it:

cd /opt
sudo git clone [https://github.com/ItzCrazyK0S/Perplexica.git](https://github.com/ItzCrazyK0S/Perplexica.git)
cd Perplexica

Step 3: Configuring the Environment Variables

Perplexica relies on an environment configuration file to manage API keys, database settings, and connection strings. Rename the provided sample configuration file to make it active:

cp sample.config.toml config.toml

Open the config.toml file using your preferred text editor (such as nano) to configure your backend settings. Here, you will specify your chosen LLM provider. For an optimal balance of speed and reasoning capabilities, integrating an API provider like Groq (utilizing Llama 3 models) or OpenAI (utilizing GPT-4o) is recommended:

[GENERAL]
PORT = 3001
SIMILARITY_MEASURE = "cosine"

[API_KEYS]
OPENAI = "your-openai-api-key-here"
GROQ = "your-groq-api-key-here"

[SEARXNG]
URL = "http://searxng:8080"

Save and close the file when configurations are finalized.

Step 4: Launching the Containers

With the configurations accurately set, command Docker Compose to pull the official images and build the network stack in detached mode:

sudo docker compose up -d

Verify that all service containers—comprising the frontend, backend, and the SearXNG meta-search routing engine—are active and healthy by running:

sudo docker compose ps

Securing Perplexica for Corporate Environments

By default, Perplexica runs locally and exposes ports 3000 (Frontend) and 3001 (Backend API). Exposing these raw ports directly to the public internet is a major security vulnerability. To safeguard your business operations, implementing a reverse proxy such as Nginx coupled with Let's Encrypt SSL certificates is essential.

Configuring Nginx Reverse Proxy

Install Nginx on your host VPS infrastructure:

sudo apt install nginx -y

Create a dedicated Nginx configuration file for your AI search engine application:

sudo nano /etc/nginx/sites-available/perplexica

Insert the following server block configuration, ensuring you substitute search.yourcompany.com with your actual domain:

server {
    listen 80;
    server_name search.yourcompany.com;

    location / {
        proxy_pass [http://127.0.0.1:3000](http://127.0.0.1:3000);
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable the site configuration and restart Nginx to apply changes:

sudo ln -s /etc/nginx/sites-available/perplexica /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Enforcing HTTPS Encryption

To encrypt data in transit and shield queries from eavesdropping on public networks, apply an SSL certificate using Certbot:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d search.yourcompany.com

Follow the interactive prompt to automatically update the Nginx configuration to enforce a global HTTPS redirect. Your private AI search engine is now fully isolated, encrypted, and production-ready.

Optimizing and Operating Your Private AI Search Engine

Operating a self-hosted platform gives you granular control over optimization. To maximize performance and efficiency within your team, consider implementing the following best practices:

  1. Model Tiering: Utilize fast, cost-efficient models like Llama 3 8B via Groq for routine, everyday search tasks to maintain sub-second response times. Reserve heavy reasoning models like GPT-4o or Claude 3.5 Sonnet for complex technical analysis.
  2. Local LLM Integration: For absolute, closed-loop privacy where zero data ever leaves your VPS, integrate Perplexica with Ollama. By running models like mistral or llama3 locally on a GPU-enabled VPS, your data remains 100% sovereign.
  3. Regular Container Audits: Keep your search engine protected against security exploits by periodically pulling upstream updates from the main branch and rebuilding the container images.

Conclusion: Reclaiming Strategic Data Independence

Deploying Perplexica on a VPS represents a major step toward reclaiming infrastructure independence. It demonstrates that businesses do not have to sacrifice modern, AI-driven efficiency to maintain strict compliance and privacy standards. By controlling your own RAG-powered search pipeline, you eliminate recurring subscription overhead, gain deep structural customizability, and protect your enterprise intellectual property from unauthorized data collection. As AI continues to integrate into daily workflows, hosting your own tools transitions from an engineering novelty to a core competitive advantage.