Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 3.5 KB

install.md

File metadata and controls

79 lines (52 loc) · 3.5 KB

Installation Guide for Searchbase

In this guide, you'll find detailed instructions on how to install Searchbase. Currently, we only support installation via Docker Compose, but we plan to add more installation methods in the future.

Choose Your Version

There are two versions available for installation: Searchbase Secure and Searchbase. The installation process for both versions is identical; the only difference is the Docker Compose file used.

  • For Searchbase Secure, use the docker/docker-compose.yml file.
  • For Searchbase, use the docker/docker-compose-lite.yml file.

Clone the Repository

Start by cloning the Searchbase repository from GitHub:

git clone https://github.com/TimeSurgeLabs/searchbase-llm.git
cd searchbase-llm

Build the Docker Compose

Next, use Docker Compose to build the services:

docker compose -f docker/docker-compose.yml build # For Searchbase
docker compose -f docker/docker-compose-lite.yml build # For Searchbase Lite

Set Up the Environment

Copy the example environment file and open it in your favorite text editor to customize your settings:

cp .env.example .env
nano .env # or open in your favorite text editor

Configuring the Environment

The configuration for both versions includes:

  • NEXTAUTH_URL - The URL of your Searchbase instance. Set it to the URL from which you will be accessing Searchbase.
  • NEXTAUTH_SECRET - A random string used to encrypt cookies. Generate one with openssl rand -hex 32.
  • DISCORD_CLIENT_ID and DISCORD_CLIENT_SECRET - Your Discord OAuth2 client ID and secret.
  • GITHUB_ID and GITHUB_SECRET - Your GitHub OAuth2 client ID and secret.

For Searchbase Secure specific configuration:

  • AI_MODE - Set to the AI model that is configured in docker/docker-compose.yml.

For Searchbase with OpenAI API:

  • AI_MODE - Set to any AI model your OpenAI account has access to.
  • AI_BASE_URL - Leave blank.
  • AI_API_KEY - Your OpenAI API key.

For Searchbase with a remote LLM:

  • AI_MODE - Set to the configured AI model on the remote machine.
  • AI_BASE_URL - Set to the base URL of the remote machine.
  • AI_API_KEY - Leave blank.

Running Searchbase

With your .env configured, you can start Searchbase:

docker compose -f docker/docker-compose.yml up -d # For Searchbase Secure
docker compose -f docker/docker-compose-lite.yml up -d # For Searchbase

Accessing Searchbase

Your Searchbase instance will be available at the URL set in NEXTAUTH_URL. If you set it to http://localhost:3000, you can access it at http://localhost:3000.

Creating the First User

Visit the app and log in via the button at the top right of the screen. The first user can make themselves an admin by navigating to http://localhost:3000/users (or your set URL) and clicking the green button next to the username that says USER. This action grants admin rights allowing them to manage users, upload data, and manage data. Refresh the page to see the new "Admin" menu. Now you can manage users, upload documents, and manage documents from the admin menu.

Caveats and Warnings

If you switch AI models when using Searchbase Secure or Searchbase with remote LLM, you'll need to re-upload your documents because the AI model is used to generate the embeddings. If you switch models, the embeddings will be different. This is not an issue with Searchbase with OpenAI API, as the embeddings are generated by the OpenAI API and are consistent across models.