Ir para o conteúdo

DOCS

Deploy

Sidecar no compose ou processo separado. O host faz mint de tokens; o runtime guarda modelos e tools.

Deploy

Sidecar no compose ou processo separado. O host faz mint de tokens; o runtime guarda modelos e tools.

sveda-server no Docker, compose ao lado do host, variáveis de ambiente e health checks.

Quick install

Pull ghcr.io/neresson/sveda-server:latest via compose. Postgres 16 and Redis 7 start beside the sidecar. Scripts use GitHub raw URLs so curl is not blocked by Cloudflare bot challenges on sveda.dev/compose.yaml.

curl -fsSL https://raw.githubusercontent.com/neresson/sveda/main/deploy/compose.yaml -o compose.yaml
curl -fsSL https://raw.githubusercontent.com/neresson/sveda/main/deploy/compose.env -o .env
# Edit .env: a model key, SVEDA_EMBED_HOST_API_KEY, SVEDA_CORS_ORIGINS

docker compose up -d
curl -s http://127.0.0.1:8787/sveda/ready

Beside a host app

If the host already has compose, merge the three services below (or open sveda.dev/compose.yaml in a browser). Do not docker compose up --build unless you are developing the runtime. Then docker compose up -d.

services:
  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: sveda
      POSTGRES_PASSWORD: sveda
      POSTGRES_DB: sveda
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U sveda -d sveda"]
      interval: 5s
      timeout: 3s
      retries: 10
    volumes:
      - sveda-postgres:/var/lib/postgresql/data
  redis:
    image: redis:7-alpine
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 10
  sveda-server:
    image: ghcr.io/neresson/sveda-server:latest
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    ports:
      - "8787:8787"
    environment:
      SVEDA_BIND: 0.0.0.0:8787
      SVEDA_EMBED_ENABLED: "true"
      SVEDA_DATABASE_URL: postgres://sveda:sveda@postgres:5432/sveda
      SVEDA_REDIS_URL: redis://redis:6379
      SVEDA_APP_KEY: ${SVEDA_APP_KEY:-dev-app-key-change-me}
      SVEDA_ADMIN_API_KEY: ${SVEDA_ADMIN_API_KEY:-dev-admin-key-change-me}
      SVEDA_EMBED_HOST_API_KEY: ${SVEDA_EMBED_HOST_API_KEY:-dev-host-key-change-me}
      SVEDA_CORS_ORIGINS: ${SVEDA_CORS_ORIGINS:-*}
      DEEPSEEK_API_KEY: ${DEEPSEEK_API_KEY:-}
volumes:
  sveda-postgres:
docker compose up -d
curl -s http://127.0.0.1:8787/sveda/ready

From the Sveda repo

Contributors building the image locally, from the sveda checkout: docker compose up --build starts Postgres 16, Redis 7, and sveda-server on :8787 (exposes Postgres/Redis on host ports for tests).

docker compose up --build
curl -s http://127.0.0.1:8787/sveda/ready

sveda.yaml

Set SVEDA_CONFIG to this file, or name it sveda.yaml next to the process. One file holds prompts, models, shared MCP servers, policies, appearance, CORS, web search, and rate limits. Secrets stay in the environment. Reload with SIGHUP. Add workspace folders for the code index with POST /admin/code-index/store and x-sveda-admin-key.

system_prompt: |
  You are a helpful assistant embedded in the host application.
mcp:
  mcpServers:
    docs:
      url: https://mcp.example.com/mcp
policies:
  reader:
    web: false
    mcp:
      allow: ["tickets.*"]
      max_mode: read
appearance:
  preset: ocean
models:
  - id: gpt-4.1-mini
    protocol: responses
    api_model: gpt-4.1-mini
    url: https://api.openai.com/v1

Stores

SVEDA_DATABASE_URL is required for durable histories and the settings document. SVEDA_REDIS_URL is required for occupancy, embed throttle, MCP creds, and settings revision across replicas. CORS, occupancy, and throttles live in sveda.yaml (SVEDA_CONFIG). Reload that file with SIGHUP. Env vars such as SVEDA_STREAM_THROTTLE seed the document when no file is mounted. If either URL is set and unreachable, the process fails closed at boot. SVEDA_ADMIN_API_KEY unlocks the settings API when you want a control plane to write the same document.

SVEDA_DATABASE_URL=postgres://sveda:sveda@postgres:5432/sveda
SVEDA_REDIS_URL=redis://redis:6379
SVEDA_APP_KEY=...
SVEDA_ADMIN_API_KEY=...
SVEDA_EMBED_ENABLED=true
SVEDA_CONFIG=/etc/sveda/sveda.yaml

Probes

GET /sveda/health is liveness (process up). GET /sveda/ready pings Postgres and Redis when those URLs are set. Kubernetes uses health for liveness and ready for readiness. An SSE turn stays on one pod for the HTTP connection; the next request can land on any replica.

Image

ghcr.io/neresson/sveda-server (linux/amd64 and linux/arm64). Published on every push to main and on v* tags. After the first publish, set the GHCR package visibility to Public so docker pull works without login. Bind 0.0.0.0:8787.

docker pull ghcr.io/neresson/sveda-server:latest

Helm

Chart charts/sveda-server. Until a matching v* image tag exists, set image.tag=latest. Production sets databaseUrl and redisUrl to managed stores. postgresql.enabled and redis.enabled bundle single-replica official images for kind/k3d only — not HA. SVEDA_INDEX_ROOT stays optional and per-pod. It is not a shared code index.

helm install sveda charts/sveda-server \
  --set image.tag=latest \
  --set postgresql.enabled=true \
  --set redis.enabled=true \
  --set secrets.appKey=dev-app-key-change-me \
  --set secrets.adminApiKey=dev-admin-key-change-me \
  --set secrets.hostApiKey=dev-host-key-change-me

Bind the runtime. Mint from the host.

Compose or Helm. Same HTTP contract.

Get started