Skip to main content

Quickstart

Get Sercha running locally with pre-built Docker images. This guide walks through setup, connecting a GitHub source, syncing content, and running your first search.

info

This guide uses GitHub as an example connector. After completing setup, you can connect any supported data source - see Connectors for all available options.

Prerequisites - Before you start, make sure you have:

  • Docker and Docker Compose
  • Node.js and npm (required if using the Admin UI)
  • 4 GB RAM available

1. Clone the repository

Terminal
git clone https://github.com/sercha-oss/sercha-core.git
cd sercha-core/examples/quickstart

2. Configure environment variables (optional)

Sercha works out of the box with BM25 keyword search. To unlock additional features, you can set environment variables before starting the containers. Create a .env file in the quickstart directory:

.env
# Optional: enables semantic search (embeddings)
OPENAI_API_KEY=sk-your-openai-api-key

# Optional: enables GitHub connector (this guide uses GitHub as an example)
GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
tip

None of these are mandatory. Without them, Sercha runs with BM25 keyword search only. You can add them later and restart the containers.

For the OPENAI_API_KEY, sign up at platform.openai.com. For the GitHub credentials, see the GitHub Connector guide.

3. Start the services

Terminal
docker compose --profile ui up -d

Wait about 60 seconds for OpenSearch to initialize. Check status:

Terminal
docker compose --profile ui ps

All services should show healthy.

info

The --profile ui flag includes the Admin UI. Without it, only the API starts on port 8080.


4. Set up your account

Open http://localhost:3000 in your browser. On first visit, you'll see the login screen. Click Configure Sercha at the bottom to start the setup wizard.

Sercha login screen with Configure Sercha link
Click "Configure Sercha" at the bottom to start the first-time setup wizard.

The setup wizard has 4 steps: Account, AI (optional), Capabilities (optional), and Sources (optional).

Create your admin account

Fill in your name, email, and password, then click Get Started.

Account creation form with name, email, and password fields
Create your administrator account.

Configure AI (optional)

If you set OPENAI_API_KEY in step 2, this screen lets you configure the embedding model for semantic search. Select OpenAI as the provider and Text Embedding 3 Small (1536d) as the model. Click Test Connection to verify, then Save & Continue.

AI configuration showing OpenAI embedding model with Connection successful
Configure the embedding model for semantic search. The "Connection successful" banner confirms your API key is working.

No API key? If you didn't set OPENAI_API_KEY before starting the containers, the connection test will fail. You can skip this step and add it later - just set the env var and restart the containers with docker compose --profile ui restart sercha.

Configure Capabilities

This screen lets you enable indexing and search capabilities. Text Indexing (BM25) is enabled by default. If you configured an embedding model in the previous step, toggle on Embedding Indexing to enable semantic and hybrid search.

Capabilities page with both BM25 and Embedding Indexing enabled
With both indexing capabilities enabled, BM25 Search, Vector Search, and Hybrid Search are all available.

Skip adding sources

The final setup step offers to connect data sources. Click Skip for now - we'll connect a source separately.

Connect Data Sources screen showing GitHub ready to connect and Skip for now button
Skip this step for now. You'll connect data sources after setup is complete.

Dashboard

After completing setup, you may be redirected to the login screen. Sign in with the account you just created.

Sercha admin dashboard showing system health, capabilities, and empty stats
The admin dashboard shows system health, enabled capabilities, and usage stats.

5. Connect GitHub and sync

Sercha is running but has no content yet. Let's connect a GitHub source and index some repositories.

tip

For the full guide with additional details, see the GitHub Connector page.

Create a GitHub OAuth App

Go to Register a new OAuth application on GitHub and fill in the form:

FieldValue
Application nameSercha (or any name you like)
Homepage URLhttp://localhost:3000
Authorization callback URLhttp://localhost:8080/api/v1/oauth/callback

Leave Enable Device Flow unchecked, then click Register application.

GitHub OAuth App registration form
Fill in the OAuth App form. The callback URL must point to the API on port 8080.

After registering, copy the Client ID, then click Generate a new client secret and copy it immediately - GitHub only shows it once.

Add credentials and restart

If you didn't already add these in step 2, add them to your .env file:

.env
GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret

Restart the backend so it picks up the new credentials:

Terminal
docker compose --profile ui restart sercha

Connect your GitHub account

Open http://localhost:3000/admin/sources. Click Connect on the GitHub row.

Sources page showing GitHub ready to connect
Click "Connect" next to GitHub on the Sources page.

GitHub's consent page opens. Review the permissions and click Authorize. If you belong to any organizations, click Grant next to them to index their repositories.

GitHub OAuth consent page
Authorize the app. Grant access to any organizations you want to index.

Select repositories and sync

After authorizing, select which repositories to index and click Create Source.

Repository selection dialog
Select the repositories you want to index.

Click into your new source, then click Sync Now to start indexing.

Source detail page with Sync Now button
Click "Sync Now" to start indexing your selected repositories.

Once the sync completes, you'll see the indexed documents listed on the page.

Sync complete showing indexed documents
Sync complete - your documents are now indexed and searchable.

Open http://localhost:3000 to access the search interface. Type a query and hit Search.

Sercha search interface with search bar
The search interface at localhost:3000. Type a query to search across all your indexed sources.

Results show matched documents with snippets, relevance scores, and links back to the original source.

Search results showing matched documents with snippets and scores
Search results with relevance scores, source badges, and content previews.

Services

ServicePortPurpose
Admin UI3000Web interface (via nginx)
Sercha API8080REST API (API + Worker + Scheduler)
PostgreSQL5432Database + pgvector
OpenSearch9200BM25 full-text search

Stopping

Terminal
# Stop (preserves data)
docker compose --profile ui down

# Stop and delete all data
docker compose --profile ui down -v

Next steps