Deploy a Free Vector Database on the Cloud
Cloud deployment gives a vector database network accessibility, team collaboration, and production-like infrastructure. There are two genuinely free paths: using a managed cloud free tier, or self-hosting on a cloud VM using free compute from a major provider. This guide covers both, with a working example for each.
Two Free Paths to a Cloud Vector Database
| Managed Free Tier | Self-Hosted on a Cloud VM | |
|---|---|---|
| Setup time | ~5 minutes | 15–30 minutes |
| Infrastructure to manage | None | VM, OS, Docker, networking |
| Cost | Free within plan limits | Cost of the VM (free tier VMs available on all major clouds) |
| Vector/storage limits | Plan-capped | Limited only by VM disk size |
| Data residency | Provider-controlled region | Your chosen region and account |
| Best for | Fast start, shared team access, no DevOps | Full control, compliance, larger datasets |
Option 1 — Managed Free Tier
Several open-source vector databases offer a free managed cloud tier alongside their self-hosted option. These sandboxes are fully managed — no server to configure — and accessible from any client via a URL and API key.
The example below connects to a free managed sandbox from Python:
import weaviate
from weaviate.auth import AuthApiKey
client = weaviate.connect_to_weaviate_cloud(
cluster_url="https://your-sandbox.weaviate.network",
auth_credentials=AuthApiKey("your-api-key"),
)
print(client.is_ready())
Replace the URL and key with those from your free sandbox. No infrastructure setup required — the database is ready to query immediately after signing up.
Option 2 — Self-Host on a Free Cloud VM
All major cloud providers offer free-tier virtual machines. The self-hosted approach removes plan-based vector limits and keeps data in your own account and region.
Free VM Options by Provider
- AWS — EC2 t2.micro (1 vCPU, 1 GB RAM), free for 12 months
- Google Cloud — e2-micro (1 vCPU, 1 GB RAM), always-free in eligible regions
- Azure — B1s (1 vCPU, 1 GB RAM), free for 12 months
- Oracle Cloud — Ampere A1 (up to 4 OCPUs, 24 GB RAM), always-free; the most capable free VM available and the practical choice for a real vector database workload
For a usable vector database deployment, aim for at least 2 GB RAM. Oracle Cloud’s always-free Ampere A1 is the standout option — 24 GB RAM is enough to run a meaningful workload indefinitely at no cost.
Deploy a Free Vector Database on a Cloud VM
SSH into your VM, then install Docker and run the database:
# Install Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER && newgrp docker
# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
---
services:
vectordb:
image: cr.weaviate.io/semitechnologies/weaviate:1.38.0
ports:
- 8080:8080
- 50051:50051
volumes:
- vectordb_data:/var/lib/weaviate
restart: always
environment:
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
CLUSTER_HOSTNAME: 'node1'
volumes:
vectordb_data:
EOF
# Start the database
docker compose up -d
# Confirm it is ready
curl http://localhost:8080/v1/meta
Open the Required Firewall Ports
In your cloud provider's security group or firewall rules, open the ports the database listens on:
- Port 8080 — HTTP REST and GraphQL API
- Port 50051 — gRPC (required by modern client libraries)
Restrict access to known IP ranges for any deployment handling real data.
Add HTTPS with a Reverse Proxy
For HTTPS access over a domain, Caddy is the simplest option — it provisions a Let's Encrypt certificate automatically:
vectordb.yourdomain.com {
reverse_proxy localhost:8080
}
grpc-vectordb.yourdomain.com {
reverse_proxy h2c://localhost:50051
}
Which Path Should You Choose?
Start with a managed free tier to skip infrastructure entirely and validate your use case first. Move to a self-hosted VM when you need more storage, full data control, or want to avoid hitting plan caps. Because both use the same API and client library, the switch is a one-line URL change — no application code changes required.
Frequently Asked Questions
Which cloud VM is best for a free vector database?
Oracle Cloud's always-free Ampere A1 instance is the most capable option — up to 4 OCPUs and 24 GB RAM, permanently free. It is sufficient for a real development or small production workload and has no 12-month expiry like AWS and Azure free tiers.
Is a managed free sandbox suitable for production?
It depends on the provider and the workload. Free sandboxes are generally well-suited for development, staging, and small-scale production. For workloads that need SLA guarantees, backups, or dedicated compute, a paid plan or self-managed cluster is more appropriate.
Can I migrate from a managed sandbox to self-hosted later?
Yes. Export your vectors and metadata from the sandbox, deploy a self-hosted instance on a cloud VM, and re-import. Application code does not need to change — only the cluster URL and credentials.