A simple, built-in key-value database for your Replit Apps with no configuration required.
How to access the Key-Value Store tool
replit
version 3.3.0 or above. Check your version with pip show replit
. Upgrade with upm add 'replit>=3.3.0'
.For Node.js, make sure to install the package with pnpm add @replit/database
.Finding your Key-Value Store
Basic usage in different languages
HTTP API usage for custom clients
REPLIT_DB_URL
is an environment variable created with your Replit App. It’s the connection string that enables database access.
REPLIT_DB_URL
provides full access to your database. Never expose it publicly or share it with untrusted parties.How to access REPLIT_DB_URL
/tmp/replitdb
instead of the environment variable.
If writing a client, first check /tmp/replitdb
and fall back to the environment variable.Checking storage usage
Creating a shared database service