Skip to content

Installation

Deploy Sparrow to Railway with a managed PostgreSQL database — no Docker or Kubernetes needed:

Deploy on Railway

The simplest way to run Sparrow. No need to clone the repo — save this docker-compose.yml anywhere and start it:

docker-compose.yml
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: sparrow
POSTGRES_USER: sparrow
POSTGRES_PASSWORD: sparrow
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sparrow"]
interval: 5s
timeout: 5s
retries: 5
sparrow:
image: ghcr.io/sarathsp06/sparrow:latest
environment:
DATABASE_URL: postgres://sparrow:sparrow@postgres:5432/sparrow?sslmode=disable
SPARROW_SERVE_UI: "true"
ports: ["8080:8080", "50051:50051"]
depends_on:
postgres: { condition: service_healthy }
Terminal window
docker compose up -d

The server is available at:

EndpointURL
Web UIhttp://localhost:8080
HTTP API (Connect-RPC)http://localhost:8080
gRPC APIlocalhost:50051

To stop:

Terminal window
docker compose down # stop containers
docker compose down -v # stop and delete data
  • Go 1.26+
  • Node.js 22+ (for web UI)
  • PostgreSQL 15+
Terminal window
make build-with-ui
Terminal window
export DATABASE_URL=postgres://user:pass@localhost:5432/sparrow?sslmode=disable
# Run migrations
make migrate
# Start the server with UI
SPARROW_SERVE_UI=true ./build/server-*

Cross-compiled binaries are available for:

  • linux/amd64
  • linux/arm64
  • darwin/amd64
  • darwin/arm64
  • windows/amd64

Build them all with:

Terminal window
make build-all

Pre-built multi-arch images (linux/amd64, linux/arm64) are published to GitHub Container Registry:

Terminal window
docker pull ghcr.io/sarathsp06/sparrow:latest

The Dockerfile uses a 3-stage build:

  1. Frontend (node:22-alpine): Builds the SvelteKit UI
  2. Backend (golang:1.26-alpine): Compiles Go binaries with embedded UI
  3. Runtime (distroless/static-debian12:nonroot): Minimal production image