Skip to main content
Pinecone Local is an in-memory Pinecone emulator available as a Docker image. This page shows you how to use Pinecone Local to develop your applications locally without connecting to your Pinecone account or incurring usage or storage fees.
Pinecone Local is not suitable for production. See Limitations for details.

Limitations

Pinecone Local has the following limitations:
  • Pinecone Local uses the 2025-01 API version, which is not the latest stable version.
  • Pinecone Local is available in Docker only.
  • Pinecone Local is an in-memory emulator and is not suitable for production. Records loaded into Pinecone Local do not persist after it is stopped.
  • Pinecone Local does not authenticate client requests. API keys are ignored.
  • Max number of records per index: 100,000.
Pinecone Local does not currently support the following features:

1. Start Pinecone Local

You can configure Pinecone Local as an index emulator or database emulator:
  • Index emulator - This approach uses the pinecone-index Docker image to create and configure indexes on startup. This is recommended when you want to quickly experiment with reading and writing data without needing to manage the index lifecycle.
    With index emulation, you can only read and write data to the indexes created at startup. You cannot create new indexes, list indexes, or run other operations that do not involve reading and writing data.
  • Database emulator - This approach uses the pinecone-local Docker image to emulate Pinecone Database more broadly. This is recommended when you want to test your production app or manually create and manage indexes.

Index emulator

Make sure Docker is installed and running on your local machine.Create a docker-compose.yaml file that defines a service for each index that Pinecone Local should create on startup. In this file, include the pinecone-index Docker image, a localhost port for the index to use, and other details:
For each index, update the environment variables as needed:
  • PORT: Specify the port number for the index to listen on.
  • INDEX_TYPE: Specify the type of Pinecone index to create. Accepted values: serverless or pod.
  • VECTOR_TYPE: Specify the type of vectors you will store in the index. Accepted values: dense or sparse.
    Sparse is supported only with serverless indexes.
  • DIMENSION: Specify the dimension of vectors you will store in the index.
    For indexes that store only sparse vectors, this must be set to 0.
  • METRIC: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values when storing dense vectors: cosine, euclidean, or dotproduct. Accepted value when storing only sparse vectors: dotproduct.
To start Pinecone Local, run the following command:
You’ll see a message with details about each index.

Database emulator

Make sure Docker is installed and running on your local machine.Create a docker-compose.yaml file that defines a service for Pinecone local, including the pinecone-local Docker image, the host and port that Pinecone Local will run on and the range of ports that will be available for indexes:
To start Pinecone Local, run the following command:
You’ll see a message with details about the Pinecone Local instance.

2. Develop your app

Running code against Pinecone Local is just like running code against your Pinecone account, with the following differences:
Be sure to review the limitations of Pinecone Local before using it for development or testing.
Example The following example assumes that you have started Pinecone Local without indexes. It initializes a client, creates an index for dense vectors and an index for sparse vectors, upserts records into each, checks their record counts, and queries them.

3. Stop Pinecone Local

Pinecone Local is an in-memory emulator. Records loaded into Pinecone Local do not persist after Pinecone Local is stopped.
To stop and remove the resources for Pinecone Local, run the following command:

Moving from Pinecone Local to your Pinecone account

When you’re ready to run your application against your Pinecone account, be sure to do the following: