Introducing Render Sandboxes: a computer for every agent.
PG Pinecone
Why deploy PG Pinecone on Render?
pg_pinecone is a PostgreSQL extension that adds vector similarity search capabilities to a Postgres database. It lets developers store and query vector embeddings directly in Postgres, enabling semantic search and retrieval workloads without running a separate vector database. This template deploys PostgreSQL 18 with pg_pinecone preinstalled as a private service on Render, accessible only over the workspace's private network.
This template deploys PostgreSQL 18 with pg_pinecone pre-installed as a private service, so it's never exposed to the public internet—other services in your Render workspace connect over the private network on port 5432 without you configuring VPCs, firewalls, or TLS termination. The Blueprint wires up the Docker image, a persistent 1 GB disk mounted where Postgres 18 actually stores its cluster, a URL-safe generated password, and the pg_pinecone database on first boot, which saves you from debugging the base64 password characters that silently break connection URLs. One click from the Deploy to Render button gives you the cheapest valid private-service-with-disk configuration ($7.25/month) already correct, instead of reverse-engineering disk paths, shutdown-delay constraints, and autoDeployTrigger behavior yourself.
Architecture
What you can build
After you deploy, you'll have a PostgreSQL 18 database with the pg_pinecone and vector extensions ready to use, running as a private service that only other services in the same Render workspace and region can reach over the private network. You can store embeddings alongside your relational data and run vector similarity search directly in SQL, with the option to add a Pinecone API key later for a remote backend, embedding generation, and reranking. The database generates and persists its own password on an attached disk, so your data and credentials survive redeploys, and you connect from other services on port 5432 using that password.
Key features
- PostgreSQL 18 + pg_pinecone: Ships PostgreSQL 18 with the pg_pinecone and vector extensions preloaded via shared_preload_libraries and auto-created on first boot.
- Private service only: Runs as a Render pserv with no public address or TLS, reachable only over the private network on port 5432.
- In-database vector search: Supports vector columns and distance-ordered queries (e.g. the <=> operator) plus pinecone.create_index for similarity search inside Postgres.
- URL-safe generated password: Generates a URL-safe password on first boot stored at mode 600 on disk, reused across redeploys instead of using Render's base64 generateValue.
- Persistent disk setup: Mounts a 1 GB persistent disk at /var/lib/postgresql so the cluster and init state survive redeploys, which skip re-running the extension setup.
Use cases
- Backend engineer adds semantic search to a Render-hosted support app
- ML team stores embeddings privately without exposing Postgres to internet
- Startup runs vector similarity queries inside Postgres, skipping Pinecone costs
- Developer prototypes RAG retrieval using pgvector before adding Pinecone API key
What's included
Service | Type | Purpose |
|---|---|---|
data | Private Service | Application service |
Next steps
- Open the Render Shell for the pg-pinecone service and run
psql -U postgres -d pg_pinecone, then paste the Quickstart SQL — The finalSELECT id FROM items ORDER BY embedding <=> '[1,2,4]' LIMIT 2;returns ids 1 and 2, confirming the vector and pg_pinecone extensions were created on first boot - Read the generated password by running
cat /var/lib/postgresql/.pg_pinecone_passwordin the pg-pinecone Shell and paste it into thePG_PINECONE_PASSWORDenvironment variable on your app service — The app service, usingPG_PINECONE_HOSTfromfromServiceplus port 5432, connects over the private network without the self-signed TLS or password-missing errors you'd get from Render's injected environment - Configure a Pinecone API key by running
SELECT pinecone.set_api_key('...');in the pg-pinecone Shell, then test a remote feature likeSELECT rerank(...)orembed(...)— The call succeeds instead of returning a missing-key error, confirming the remote backend is wired up for embed(), rerank(), and hybrid keyword-plus-vector search
Resources
Repository
For AI agents
Drop into your coding agent to explore and deploy this template.