Skip to main content
Run the API and workers as separate services so you can add search capacity and background processing capacity independently. Use the one-machine bundle for a Compose evaluation.

Prerequisites

You need a platform that can run the API and worker and execute a one-time migration job. Choose a verified release image for Linux amd64. Provision the shared services on a private network and choose the plugins your application needs. API replicas handle requests while workers handle background jobs. Both use the same backing services.
A TLS proxy fronts the API. API and worker replicas share PostgreSQL, Temporal, Weaviate, S3 storage and plugins.A TLS proxy fronts the API. API and worker replicas share PostgreSQL, Temporal, Weaviate, S3 storage and plugins.
See the first-party plugin catalog and pin your plugins. Choose how to run EmbeddingGemma 2 before pinning inference. The engine runs on CPU. The embedding plugin needs an inference endpoint for document embeddings. The one-machine bundle supplies a CPU text service. Railway can also run an optional local CPU query encoder on the API, while document embeddings still use the configured provider. The shipped Modal deployment uses GPU for image embedding and GPU rerankers.

Configure the engine

Set QUIVR_CONFIG to the path of an engine JSON file. Give the migrator, API and workers matching dependency addresses, plugin pins and secrets. Set temporal_address, weaviate_url, and the s3 endpoint and bucket in the file. Pin an ingestion and a retrieval plugin for the API. The worker needs an ingestion plugin. The secret bindings describe mounted files and optional settings such as QUIVR_CREDENTIAL_KEY, WEAVIATE_API_KEY, and dedicated QUIVR_ADMIN_KEYS. For signed plugins, give each plugin only its own verification ring in QUIVR_PLUGIN_SIGNING_KEYS. See signed engine requests.

Railway environment

The Railway entrypoint generates the JSON. Supply the database, cursor and S3 secrets above and set TEMPORAL_ADDRESS, WEAVIATE_URL, S3_ENDPOINT, and TEI_URL. The wrapper requires an HTTP(S) URL in TEI_URL when building configuration. For EmbeddingGemma 2, set QUIVR_DEMO_EMBEDDING=gemma, the provider’s HTTPS origin in EMBED_URL, and its bearer token in EMBED_API_KEY. On a fresh deployment, set QUIVR_DEMO_CORE_INGEST=0 so only the EmbeddingGemma 2 ingestion plugin is pinned. Supply QUIVR_API_KEYS or the wrapper’s individual key variables, starting with QUIVR_API_KEY. Optional settings include WEAVIATE_GRPC_ADDRESS, QUIVR_WORKER_QUEUES, and the per-queue slot limits. Set QUIVR_RECORD_QUERY_TEXT=0 for private queries in the Railway deployment. See the Railway deployment guide for its service setup and the optional local query encoder.

Run the image

Mount the JSON read-only and make it readable by UID/GID 10001. Use listen for API traffic and probe_listen for private health checks and metrics. To route to ports inside the containers, bind the listeners to container-reachable addresses such as 0.0.0.0:8080 and 0.0.0.0:8081. Place the API behind your TLS proxy.
  1. Start the backing services and plugins. Follow the PostgreSQL prerequisites for an external database and size each dependency using the infrastructure profiles.
  2. Run quivr migrate with the new configuration and wait for it to exit successfully. It prepares the database, object store and index. The Railway API wrapper runs this step at startup. Railway workers wait up to 10 minutes for pending database migrations before they can become ready.
  3. Start quivr api and quivr worker and give each process access to its configuration, secrets and dependencies. Restart the processes when changing their JSON settings.

Use DBA-managed PostgreSQL

Use a dedicated PostgreSQL 17 database on the writable primary. Use the same non-superuser login for migration, API and workers. Grant it CONNECT on the database, USAGE and CREATE on the public schema, and USAGE on plpgsql. Set its database-specific search_path to public. If the DBA removed the plpgsql extension, install it before granting access. Keep Quivr’s objects in public and owned by that login so migrations and background maintenance can modify them. When switching an existing database to a new login, have the DBA verify object ownership first. The postgres_prerequisite diagnostic identifies startup and migration grant failures.

Run first-party plugin images

Use the verified digest from the release’s images.txt. First-party plugin images are named ghcr.io/the-vibe-company/quivr-plugin-<id>, using the manifest ID. Run the plugin on the private network and pin its endpoint and manifest in the engine’s plugins list. See Pin a plugin. For EmbeddingGemma 2, prepare the pinned tokenizer using the --hosted option in scripts/prepare_tokenizer.py and mount the tokenizer file read-only at /tokenizer/tokenizer.json. Set tokenizer.python to /opt/tokenizer/bin/python and tokenizer.model to the mounted path. Run the image’s configure command with that model configuration and save the generated manifest. Mount it at /app/quivr-plugin.yaml in the serving container. Use the same manifest and the exact configuration object in the engine pin’s manifest and configuration fields. Give provider credentials to the plugin through the secret environment declared by its manifest. See the container commands.

Check that it is ready

On the private probe address of each API and worker instance, request GET /readyz. HTTP 204 means ready. A 503 response or an unreachable probe calls for a check of startup logs, migration status and service connectivity. The worker also checks Temporal, S3 and Weaviate. Test ingestion and search before sending production traffic. Those requests exercise the plugins. The worker probe port opens after the schema check. Configure startup checks to allow the full migration_wait plus dependency startup time before liveness checks can restart a waiting worker. To confirm which release is running, check the startup log for the version and revision. The private /metrics endpoint also exposes quivr_build_info.

Diagnose slow searches during imports

Repeat a search in lexical, semantic and hybrid modes during an import. Compare the response’s usage.phases.index_query_ms with the weaviate.request spans for its X-Trace-ID. The spans end at response headers. The API timing includes reading and decoding the response and selecting passages. Compare search latency and import throughput before changing index capacity. The keyword leg of lexical and hybrid search caps the main passage scan at 2,400 passage objects per candidate round. Requests that fetch passage text have a 16 MiB response limit per window. The search can refill once at twice the initial candidate depth, up to 2,400 candidates. These bounds can omit matches and change hybrid ordering, especially when many candidates lack passages from the active ingestion plugin.

Scale workers on backlog

Workers can serve live, bulk, or both queues. Separate them to give live work its own capacity during imports. Watch quivr_queue_waiting_documents and quivr_queue_oldest_waiting_age_seconds on private probes. The readings represent the whole installation. Aggregate replicas with max. Check capacity and backlog before adding replicas, especially if shared services are already saturated.

The quivr-autoscaler binary

The experimental quivr-autoscaler polls the queue API and adjusts one target service. Run one controller per target and set replica bounds based on dependency capacity. Set QUIVR_QUEUE_URL to the full private /v0/admin/queues endpoint. Set QUIVR_QUEUE_KEY to a dedicated key, distinct from API and operator keys, with only queues:read and corpora: ["*"]. See API key scopes. For Railway, follow the autoscaler setup.

Next