Quick Start
Run EntropyDB on your machine and make your first queries in a few minutes.
1. Start the server
You need Docker with Compose v2 (Docker Desktop, or Docker Engine plus the compose and buildx plugins) and about 2 GB of free memory. The image is built from source on first run, which takes a few minutes.
git clone https://github.com/buildwithteky/entropydb.git
cd entropydb
cp .env.example .env # then set ENTROPYDB_ADMIN_EMAIL and ENTROPYDB_ADMIN_PASSWORD
docker compose up -d --buildThis starts the server on localhost:8080 and the web console on localhost:3000. All data lives in the entropydb-data volume. Prefer no Docker? See Installation.
2. Get an API key
Log in as the administrator you configured in .env; the response contains your API key and user ID.
curl -s -X POST http://localhost:8080/api/v1/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"admin@example.com","password":"<your password>"}'Every other request carries the key and your user ID:
export KEY=<apiKey> USER=<userId>
H=(-H "X-API-Key: $KEY" -H "X-User-ID: $USER" -H "X-Tenant-ID: $USER" -H 'Content-Type: application/json')3. Create a database and use it
curl -s "${H[@]}" -X POST localhost:8080/api/v1/databases -d '{"name":"demo"}'
# SQL
curl -s "${H[@]}" -X POST localhost:8080/api/v1/query/sql \
-d '{"database":"demo","sql":"CREATE TABLE users (id INT, name VARCHAR, PRIMARY KEY (id))"}'
curl -s "${H[@]}" -X POST localhost:8080/api/v1/query/sql \
-d '{"database":"demo","sql":"INSERT INTO users (id, name) VALUES (1, '"'"'Ada'"'"')"}'
curl -s "${H[@]}" -X POST localhost:8080/api/v1/query/sql \
-d '{"database":"demo","sql":"SELECT * FROM users"}'
# Key-value
curl -s "${H[@]}" -X PUT localhost:8080/api/v1/kv/greeting -d '{"database":"demo","value":"hello"}'
curl -s "${H[@]}" "localhost:8080/api/v1/kv/greeting?database=demo"
# Documents
curl -s "${H[@]}" -X POST localhost:8080/api/v1/document \
-d '{"database":"demo","collection":"people","document":{"name":"Zed","age":33}}'
curl -s "${H[@]}" -X POST localhost:8080/api/v1/query/document \
-d '{"database":"demo","collection":"people"}'Graph, vector and time-series data work the same way. The web console at localhost:3000 has a page for each model, plus an EntropyQL console.
4. Connect with psql (optional)
The Compose file enables EntropyDB's PostgreSQL wire protocol on host port 5433. It handles basic queries from psql; it is not a full PostgreSQL implementation, and many PostgreSQL-specific features and drivers are not supported.
psql "host=localhost port=5433 user=admin@example.com dbname=demo" # password: your account passwordNext steps
- Back up your data:
POST /api/admin/backup(see the repository'sdocs/operations/backup-and-restore.md). - All settings:
docs/reference/configuration.mdin the repository. - Three-node replicated cluster:
docs/deployment/multi-node.md.