Deploy Vespa | (Just Updated) Vector + Hybrid Search Engine, Ready to Feed

Hybrid keyword + vector search engine, sample app ready to feed

Deploy Vespa | (Just Updated) Vector + Hybrid Search Engine, Ready to Feed

Just deployed

/opt/vespa/var

Deploy and Host Vespa on Railway

Vespa is an open-source search and vector database engine that serves text (BM25), vector (HNSW nearest-neighbor) and hybrid queries from one system. This template runs a single-node Vespa from a digest-pinned image with a sample application already deployed, so the document API and the search API answer as soon as the service is healthy.

About Hosting Vespa

Vespa expects to be its own config server and container, and it runs as a non-root user. The start command handles what Railway needs:

  • Writable state. Railway mounts volumes root-owned. The service starts as root, fixes ownership of /opt/vespa/var, then drops to the vespa user. Config, indexes and documents persist across redeploys.
  • Sample application. On first boot a small application is deployed: schema doc with title and text (BM25) and a 384-dimension embedding (HNSW, angular), plus rank profiles bm25 and hybrid. If an application is already on the volume, it is left untouched on later boots.
  • Single-node hostname. The node name is pinned so the config server and container find each other after every restart.
  • Public API on 8080. The document and query API is served on Railway's injected port. The config server (19071) stays internal.

To use your own schema, deploy your application package to the config server over the private network.

Why Deploy

  • Hybrid keyword plus vector search in one engine, with no separate vector store
  • Ready to feed: no application package to build before the first document
  • Data survives redeploys on the attached volume
  • Image pinned by digest, so a deploy never changes under you

Common Use Cases

  • Retrieval for RAG: store chunks with embeddings and query by vector, keywords or both
  • Semantic site or product search
  • Recommendation and similarity lookups
  • A self-hosted alternative to managed vector databases

Dependencies for Vespa Hosting

  • A persistent volume, mounted at /opt/vespa/var (created by the template)

Deployment Dependencies

Implementation Details

Feed a document:

curl -X POST "$VESPA_URL/document/v1/default/doc/docid/1" \
  -H 'Content-Type: application/json' \
  -d '{"fields":{"title":"hello","text":"vespa on railway","embedding":{"values":[/* 384 floats */]}}}'

Keyword query: curl "$VESPA_URL/search/?yql=select%20*%20from%20doc%20where%20userQuery()&query=railway&ranking=bm25"

The data plane has no authentication. Before using it with real data, put it behind your own gateway or reach it only over Railway's private network. Vespa stops accepting writes when its disk is more than 80% full, so size the volume with headroom.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
86