How to Deploy Weaviate Vector Database with Docker: A Quick Start Guide
Learn how to deploy Weaviate, the open-source vector database, with Docker in minutes. Step-by-step guide with curl examples, Docker Compose setup, and production tips.
Getting Started with Weaviate in 5 Minutes
Weaviate is one of the most popular open-source vector databases, and getting it running with Docker is surprisingly simple. Whether you are building a RAG pipeline for an LLM chatbot, adding semantic search to your application, or experimenting with vector embeddings, this guide will have you up and running in minutes. By the end, you will have a fully functional Weaviate instance ready to store and query vectors.
Prerequisites
All you need is Docker installed on your machine. That is it. Weaviate runs as a single container with zero external dependencies for basic usage. Optionally, you may want curl or a GraphQL client like GraphiQL to interact with the API, but a browser works too.
Step 1: Pull and Run Weaviate
Open a terminal and run the following command:
docker run -d --name weaviate -p 8080:8080 semitechnologies/weaviate:latest
This starts Weaviate in detached mode, mapping port 8080 on your host to port 8080 inside the container. The container will be named weaviate for easy management.
Step 2: Verify It Is Running
Once the container is up, you can check its health via the REST API:
curl http://localhost:8080/v1/.well-known/ready
If you see {"ready":true}, congratulations - Weaviate is live! You can also check the schema endpoint:
curl http://localhost:8080/v1/schema
Step 3: Add Data and Search
Weaviate uses a GraphQL API for all operations. Here is how to create a class (like a database table) and add an object with a vector:
# Create a schema class
curl -X POST http://localhost:8080/v1/schema \
-H "Content-Type: application/json" \
-d '{"class": "Document", "vectorizer": "none"}'
# Add an object with a vector
curl -X POST http://localhost:8080/v1/objects \
-H "Content-Type: application/json" \
-d '{
"class": "Document",
"properties": {"title": "Weaviate guide", "content": "Vector databases are amazing"},
"vector": [0.1, 0.2, 0.3, 0.4, 0.5]
}'
Step 4: Enable Modules for Production
For production use, you will want to enable Weaviate modules. Pass environment variables when starting the container to integrate with AI services:
docker run -d --name weaviate -p 8080:8080 \
-e AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
-e DEFAULT_VECTORIZER_MODULE=text2vec-openai \
-e OPENAI_APIKEY=your-key-here \
semitechnologies/weaviate:latest
This enables OpenAI embeddings so you can search by natural language without manually creating vectors.
Docker Compose for Persistent Storage
For a production setup with persistent data, use Docker Compose:
services:
weaviate:
image: semitechnologies/weaviate:latest
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./data/weaviate:/data
environment:
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true"
PERSISTENCE_DATA_PATH: "/data"
Save this as docker-compose.yml and run docker compose up -d.
Next Steps
Once Weaviate is running, explore its features: hybrid search (BM25 + vector), generative search (ask questions about your data), multi-tenancy for SaaS apps, and the built-in console at http://localhost:8080/weaviate-console. Weaviate integrates with LangChain, LlamaIndex, Haystack, and any OpenAI-compatible framework, making it a flexible backbone for AI-powered applications.
Conclusion
Self-hosting Weaviate with Docker gives you complete control over your vector database infrastructure. No vendor lock-in, no data leaving your network, and the ability to scale horizontally as your needs grow. With its GraphQL API and rich module ecosystem, Weaviate is a powerful addition to any AI stack.