# Create a Perplexity Clone Powered by Open Source Technology Source: https://narb.hashnode.dev/create-a-perplexity-clone-powered-by-open-source-technology Kiwi News: https://news.kiwistand.com/stories/Create-a-Perplexity-Clone-Powered-by-Open-Source-Technology?index=0x6827c0ba0d62553b9bc7a93876abf2e1a3e93e9c8b5776f912a0f9dc52058456356c6e63 Submitted by narbeh.eth on 2025-05-16 UTC, 2 upvotes, 0 comments Intro In this short blog post i’ll show you how to get a clone of Perplexity running using nothing but open source technology. Here’s what we’ll be using: The Perplexica Project for our UI and boiler plate SearXNG metasearch engine to power our web browsing The Lilypad Anura API to power our inference capabilities Docker (installation steps here) Here’s what it will look like when we’re done: Alright, let’s get into it! Step 1: Setup SearXNG Locally SearXNG is a metasearch engine enabling you to search the web privately without popular search engines and databases without being tracked or profiled. Follow the below steps to get SearXNG running on your machine: Pull the SearXNG image from Docker Hub. docker pull searxng/searxng Start the SearXNG container with the following command: docker run -d --name searxng \ -p 8888:8080 \ searxng/searxng With the container running, create a directory for the custom SearXNG configuration and copy the settings.yml file to it. mkdir -p ~/searxng docker cp searxng:/etc/searxng/settings.yml ~/searxng/settings.yml Open the settings.yml file with vim or your preferred text editor. vim ~/searxng/settings.yml and change the following to enable JSON support (search for "default_format") which will allow us to query SearXNG for results in JSON format: ui: default_format: html supported_formats: - html - json # <-- Enable JSON support Now we’ll want to stop and remove the the SearXNG container so that we can start it back up with the new changes we made to the settings.yml file: docker stop searxng && docker rm searxng Now re-run the SearXNG container with the following command to pull in the custom settings.yml file: docker run -d --name searxng \ -p 8888:8080 \ -v ~/searxng/settings.yml:/etc/searxng/settings.yml \ searxng/searxng Verify that the container is running: docker ps 8. Visit http://localhost:8888 in your browser to verify that the SearXNG instance is running. Step 2: Get your Lilypad Anura API Key Now we’ll just need to get our API key to use the Anura API which will let us run AI inference against a decentralized network of nodes on the Lilypad Network equipped with powerful GPUs capable of running a variety of open source models such as Llama, Deepseek, Gemma and others. Right now it’s free to use the API so we’ll definitely want to take advantage! So head over to https://anura.lilypad.tech/ , sign up and generate your api key making sure to note it down in a secure place since we’ll be using it in the next step. Step 3: Starting up our Perplexity clone We are almost at the finish line, all the left to do now is to pull the Perplexica repo and make some slight adjustments to the configurations. Let’s start by cloning the repo via git clone https://github.com/ItzCrazyKns/Perplexica.git Now open the project in your favourite code editor and open the sample.config.toml file which should look like this out of the box: [GENERAL] SIMILARITY_MEASURE = "cosine" # "cosine" or "dot" KEEP_ALIVE = "5m" # How long to keep Ollama models loaded into memory. (Instead of using -1 use "-1m") [MODELS.OPENAI] API_KEY = "" [MODELS.GROQ] API_KEY = "" [MODELS.ANTHROPIC] API_KEY = "" [MODELS.GEMINI] API_KEY = "" [MODELS.CUSTOM_OPENAI] API_KEY = "" API_URL = "" MODEL_NAME = "" [MODELS.OLLAMA] API_URL = "" # Ollama API URL - http://host.docker.internal:11434 [API_ENDPOINTS] SEARXNG = "" # SearxNG API URL - http://localhost:32768 Now this repo let’s you configure your setup through a variety of AI providers such as OpenAI, Groq, etc… which you can totally use if you want; however, you have to pay for those providers and they are closed source for the most part. If you have a powerful machine, you could also run the models locally using Ollama but you’d be limited by your machine hardware in terms of the models you can run. This is why we’re instead going to utilize the Lilypad Anura API so we can use some of the bigger open source models for FREE without having to use up computing resources on our own machine! What we’ll need to get Perplexica running is to do the following: Under [API_ENDPOINTS] set the SEARXNG variable to http://localhost:8888 Under the [MODELS.CUSTOM_OPENAI] set the following variables API_KEY = API_URL = https://anura-testnet.lilypad.tech/api/v1/ MODEL = llama3.1:8b (I’m just using Llama here but you can use any of the supported Anura models) So now your config file should look like the following: [GENERAL] SIMILARITY_MEASURE = "cosine" # "cosine" or "dot" KEEP_ALIVE = "5m" # How long to keep Ollama models loaded into memory. (Instead of using -1 use "-1m") [MODELS.OPENAI] API_KEY = "" [MODELS.GROQ] API_KEY = "" [MODELS.ANTHROPIC] API_KEY = "" [MODELS.GEMINI] API_KEY = "" [MODELS.CUSTOM_OPENAI] API_KEY = "your-api-key-here" API_URL = "https://anura-testnet.lilypad.tech/api/v1/" MODEL_NAME = "llama3.1:8b" [MODELS.OLLAMA] API_URL = "" # Ollama API URL - http://host.docker.internal:11434 [API_ENDPOINTS] SEARXNG = "http://localhost:8888" # SearxNG API URL - http://localhost:32768 Now rename sample.config.toml to config.toml In your terminal run the following commands in the Perplexica Root folder: npm i npm run build npm run start Note: You could have also started up Perplexica using docker via docker compose up -d That’s it! Now visit http://localhost:3000 and enjoy your Preplexity clone powered by open source technology!