Installation
Code Search can be installed in several ways depending on your needs and infrastructure.
Prerequisites
Section titled “Prerequisites”Before installing, ensure you have:
- Docker (version 20.10+) and Docker Compose (v2)
- PostgreSQL 14+ or MySQL 8+ (or use the included Docker container)
- Redis 7+ (or use the included Docker container)
- At least 4GB RAM and 10GB disk space for small deployments
For development or building from source:
- Go 1.22+
- Node.js 20+
Installation Methods
Section titled “Installation Methods”The easiest way to get started. Run all services with a single command.
-
Download the docker-compose file:
Terminal window curl -O https://raw.githubusercontent.com/techquestsdev/code-search/main/docker-compose.yml -
Create a configuration file:
Terminal window curl -O https://raw.githubusercontent.com/techquestsdev/code-search/main/config.example.yamlmv config.example.yaml config.yaml -
Edit
config.yamlwith your settings (optional for basic usage) -
Start all services:
Terminal window docker compose up -d -
Verify everything is running:
Terminal window docker compose ps
Services will be available at:
- Web UI: http://localhost:3000
- API: http://localhost:8080
- API Docs: http://localhost:8080/docs
Build from source for development or customization.
-
Clone the repository:
Terminal window git clone https://github.com/techquestsdev/code-search.gitcd code-search -
Install Go dependencies:
Terminal window go mod tidy -
Build all binaries:
Terminal window make build -
Build the web UI:
Terminal window cd webnpm installnpm run buildcd .. -
Start infrastructure (PostgreSQL, Redis, Zoekt):
Terminal window docker compose up -d postgres redis zoekt -
Run database migrations:
Terminal window make migrate-up -
Start the services:
Terminal window # Terminal 1: API Server./bin/code-search-api# Terminal 2: Indexer./bin/code-search-indexer# Terminal 3: Web UI (development)cd web && npm run dev
Deploy to Kubernetes using Helm or raw manifests.
-
Install the chart from OCI registry:
Terminal window helm install code-search oci://ghcr.io/techquestsdev/charts/code-search \--namespace code-search \--create-namespace -
Port-forward to access locally:
Terminal window kubectl port-forward svc/code-search-web 3000:3000 -n code-search
See Helm Deployment for detailed configuration options.
CLI Installation
Section titled “CLI Installation”The CLI can be installed separately for interacting with a Code Search server.
# Using Homebrew (recommended)brew install techquestsdev/tap/code-search
# Or download binarycurl -L https://github.com/techquestsdev/code-search/releases/latest/download/code-search_Darwin_arm64.tar.gz | tar xzsudo mv code-search /usr/local/bin/# Download binarycurl -L https://github.com/techquestsdev/code-search/releases/latest/download/code-search_Linux_x86_64.tar.gz | tar xzsudo mv code-search /usr/local/bin/
# Or use Go installgo install github.com/techquestsdev/code-search/cmd/cli@latestDownload the latest .zip from the releases page and extract code-search.exe to a directory in your PATH.
Verify Installation
Section titled “Verify Installation”After installation, verify everything is working:
# Check the API is respondingcurl http://localhost:8080/health# Expected: {"status":"ok"}
# Check all services are readycurl http://localhost:8080/ready# Expected: {"status":"ready","checks":{"database":"ok","redis":"ok","zoekt":"ok"}}
# Test the CLIcode-search --versionNext Steps
Section titled “Next Steps”Now that Code Search is installed:
- Quick Start - Add your first repository and start searching
- Configuration - Customize your installation
- Code Hosts - Connect to GitHub, GitLab, and more