---
title: "Deploy Weaviate | Pinecone, Qdrant, Pgvector Alternative"
description: "Self Host Weaviate. Built-in support for vectorization (using OpenAI, etc.)"
category: "Storage"
url: https://railway.com/deploy/weaviate-vector-database
---

# Deploy Weaviate | Pinecone, Qdrant, Pgvector Alternative

Self Host Weaviate. Built-in support for vectorization (using OpenAI, etc.)

**[Deploy Weaviate | Pinecone, Qdrant, Pgvector Alternative on Railway](https://railway.com/template/weaviate-vector-database)**

- **Creator:** Heimdall
- **Category:** Storage
- **Total deploys:** 4

## Template content

### Weaviate https://hdrobots.com/wp-content/uploads/2025/09/weaviate-logo.webp

- **Image:** semitechnologies/weaviate
- **Public domain:** Yes

## Documentation

![Weaviate dashboard screenshot](https://events.weaviate.io/hs-fs/hubfs/weaviate-logo.png?width=400&amp;height=165&amp;name=weaviate-logo.png)

# Deploy and Host Weaviate on Railway

This Railway template deploys a **Weaviate vector database** — ready for semantic search, RAG pipelines, and AI-powered apps — with a single click. 

---

## Getting Started with Weaviate on Railway

Once your Railway deploy is live, confirm the instance is healthy by visiting `https://your-url.railway.app/v1/.well-known/ready` — it should return `{}`. Your API key is auto-generated during deployment; copy it from the `AUTHENTICATION_APIKEY_ALLOWED_KEYS` variable in your Railway service environment tab.

Connect using the official Python client:

```
import weaviate

client = weaviate.connect_to_custom(
    http_host="your-url.railway.app",
    http_port=443,
    http_secure=True,
    grpc_host="your-url.railway.app",
    grpc_port=443,
    grpc_secure=True,
    auth_credentials=weaviate.auth.AuthApiKey("your-api-key"),
)

# Create a collection and insert an object
collection = client.collections.create("Article")
collection.data.insert({"title": "Hello Weaviate", "body": "First object!"})
```

Or connect via the JavaScript client: `npm install weaviate-client`, then use `weaviate.connectToCustom(...)` with the same host and API key. 

---

## About Hosting Weaviate

Weaviate is an **open-source vector database** built for AI and machine learning workloads. It stores data objects alongside their vector embeddings, enabling semantic search, Retrieval-Augmented Generation (RAG), and recommendation systems without complex integration layers.

Key features:
- **Hybrid search** — combine vector similarity search with BM25 keyword search using a single `alpha` parameter
- **GraphQL + REST + gRPC APIs** — query your data from any language or toolchain
- **Schema-based data model** — define collections with typed properties for rich filtering alongside vector search
- **Built-in vectorizer modules** — optionally let Weaviate call OpenAI, Cohere, or Hugging Face to generate embeddings at import time
- **RBAC + API key auth** — fine-grained access control out of the box
- **HNSW indexing** — fast approximate nearest-neighbour search that scales logarithmically

This template ships with `DEFAULT_VECTORIZER_MODULE="none"`, meaning you bring your own vectors. This keeps the setup self-contained and works with any embedding model or provider. See the environment variable section below for how to add an external vectorizer.

---

## Why Deploy Weaviate on Railway

Running Weaviate on a raw VPS means managing Docker, configuring volumes, handling TLS, setting up restart policies, and monitoring disk pressure. Railway eliminates all of that. The volume is attached and mounted automatically; environment variables are managed in a UI with secret generation built in; and redeploys are zero-downtime.

---

## Common Use Cases

- **RAG pipelines** — store chunked document embeddings and retrieve the top-k most relevant chunks at query time to ground LLM responses in your own data
- **Semantic search** — replace keyword search with meaning-based search over product catalogues, knowledge bases, or support articles
- **Recommendation engines** — find similar items (articles, products, users) by storing entity embeddings and querying by vector proximity
- **Multi-modal AI apps** — store and search across text and image embeddings in the same collection using Weaviate's multi-vector support

---

## Dependencies for Weaviate

- **Weaviate DB** — `cr.weaviate.io/semitechnologies/weaviate:1.36.2` (also available as `semitechnologies/weaviate` on Docker Hub)

#### Adding an Embedder (Optional)

This template ships without a vectorizer — you provide vectors yourself. To let Weaviate auto-generate embeddings at import time, update these variables:

**OpenAI:**
```
DEFAULT_VECTORIZER_MODULE="text2vec-openai"
ENABLE_MODULES="text2vec-openai"
OPENAI_APIKEY="sk-..."
```

**Cohere:**
```
DEFAULT_VECTORIZER_MODULE="text2vec-cohere"
ENABLE_MODULES="text2vec-cohere"
COHERE_APIKEY="..."
```

**AWS Bedrock:**
```
DEFAULT_VECTORIZER_MODULE="text2vec-aws"
ENABLE_MODULES="text2vec-aws"
AWS_ACCESS_KEY="..."
AWS_SECRET_KEY="..."
```

After updating the variables, redeploy the service and specify the vectorizer in your collection schema at creation time.

### Deployment Dependencies

- Docker image: [`cr.weaviate.io/semitechnologies/weaviate`](https://hub.docker.com/r/semitechnologies/weaviate)
- Official docs: [docs.weaviate.io](https://docs.weaviate.io)
- Client libraries: Python (`pip install weaviate-client`), JS/TS (`npm install weaviate-client`), Go, Java

---

## Minimum Hardware Requirements for Weaviate

Weaviate's memory usage is directly driven by dataset size — the HNSW index must fit in RAM. CPU determines query and import speed; more cores = more concurrent queries.

| Resource | Minimum (dev / small datasets) | Recommended (production, &lt;1M vectors) |
|---|---|---|
| RAM | 1 GB | 8 GB+ |
| CPU | 1 vCPU | 2–4 vCPUs |
| Storage | 5 GB | 20 GB+ (SSD) |
| Runtime | Docker / any Linux | Docker / Kubernetes |

**RAM estimate:** roughly 3 GB per 1 million 384-dimension vectors. For 768-dimension vectors (typical for OpenAI `text-embedding-3-small`), plan ~6 GB per million objects. On Railway, scale your service's memory allocation in **Settings → Resources** as your dataset grows.

---

## Self-Hosting Weaviate

To run Weaviate outside Railway, on any Linux host with Docker:

```
# docker-compose.yml
services:
  weaviate:
    image: cr.weaviate.io/semitechnologies/weaviate:1.36.2
    ports:
      - "8080:8080"
      - "50051:50051"
    volumes:
      - weaviate_data:/var/lib/weaviate
    environment:
      PERSISTENCE_DATA_PATH: "/var/lib/weaviate"
      CLUSTER_HOSTNAME: "node1"
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "false"
      AUTHENTICATION_APIKEY_ENABLED: "true"
      AUTHENTICATION_APIKEY_ALLOWED_KEYS: "your-secret-key"
      AUTHENTICATION_APIKEY_USERS: "admin"
      AUTHORIZATION_ENABLE_RBAC: "true"
      AUTHORIZATION_RBAC_ROOT_USERS: "admin"
      DEFAULT_VECTORIZER_MODULE: "none"
      QUERY_DEFAULTS_LIMIT: "25"

volumes:
  weaviate_data:
```

```
docker compose up -d
# Weaviate is now available at http://localhost:8080
```

For Kubernetes deployments at scale, use the [official Helm chart](https://github.com/weaviate/weaviate-helm).

---

## Is Weaviate Free?

Weaviate is **open-source** under the BSD-3 licence — the database itself is completely free to self-host. On Railway, your only cost is infrastructure (compute + storage). The managed cloud offering, **Weaviate Cloud**, has a free sandbox tier (30-day expiry) and paid tiers starting at $45/month (Flex) based on vector dimensions stored. Self-hosting on Railway is typically the most cost-effective option for teams who want persistent, production-grade infrastructure without per-query or per-dimension fees.

---

## Weaviate vs Pinecone vs Qdrant

| Feature | Weaviate | Pinecone | Qdrant |
|---|---|---|---|
| Open source | ✅ BSD-3 | ❌ Proprietary | ✅ Apache 2.0 |
| Self-hostable | ✅ | ❌ | ✅ |
| GraphQL API | ✅ | ❌ | ❌ |
| Built-in vectorizer modules | ✅ (OpenAI, Cohere, etc.) | ❌ | ❌ |
| Hybrid search | ✅ | ✅ | ✅ |
| p99 query latency (1M vectors) | ~50–70 ms | ~40–50 ms | ~30–40 ms |
| Pricing (self-hosted) | Free | N/A | Free |
| Managed cloud starting price | $45/mo | $70/mo | $25/mo |

Weaviate is the best choice when your data has rich relationships, you want plug-in embedding modules, or your team is already familiar with GraphQL. Qdrant edges it out on raw throughput; Pinecone is the lowest-ops option if you don't need self-hosting.

---

## FAQ

**What is Weaviate?**
Weaviate is an open-source vector database that stores data objects alongside their vector embeddings. It supports semantic search, hybrid search, RAG, and recommendation systems via REST, GraphQL, and gRPC APIs.

**What does this Railway template deploy?**
A single Weaviate service running the official `semitechnologies/weaviate` Docker image, with API key authentication enabled, RBAC configured, and a Railway persistent volume mounted at `/var/lib/weaviate`. Your API key is auto-generated at deploy time.

**Why does the template use `RAILWAY_RUN_UID="0"`?**
Railway runs containers as a non-root user by default. Weaviate needs root permissions to write to its data directory. Without this variable set to `0`, the service crashes on startup with a permission error when trying to create files in `/var/lib/weaviate`.

**Does Weaviate support GraphQL?**
Yes. Weaviate exposes a GraphQL endpoint at `/v1/graphql` for querying objects, running semantic search (`nearVector`, `nearText`), and applying filters. The REST API at `/v1` handles schema management and CRUD operations.

**Can I use this Weaviate template in production?**
Yes, with some care. The template is configured with API key auth and RBAC enabled by default. For production, pin a specific image version (e.g. `1.36.2` rather than `latest`), monitor Railway's memory usage as your dataset grows, and ensure `RAILWAY_DEPLOYMENT_DRAINING_SECONDS` is set so Weaviate can flush data to disk cleanly before restarts.

**How do I add an embedding model like OpenAI?**
Set `DEFAULT_VECTORIZER_MODULE="text2vec-openai"`, `ENABLE_MODULES="text2vec-openai"`, and `OPENAI_APIKEY="sk-..."` in your Railway environment variables, then redeploy. Weaviate will call the OpenAI Embeddings API automatically when you insert objects into collections configured with that vectorizer.

**Can I browse my data without writing code?**
Yes. Open [console.weaviate.cloud](https://console.weaviate.cloud) in your browser and connect it to your Railway instance URL with your API key. This gives you a full GUI for browsing collections, running queries, and inspecting objects — no Weaviate Cloud subscription required.

## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/weaviate-vector-database
