Quick Start
Get up and running with Fluree in 5 minutes. By the end of this guide, you'll have created a ledger, inserted data, and run your first query.
Prerequisites
- Docker installed on your machine
- curl or any HTTP client
1. Start Fluree Server
Run Fluree using Docker:
docker run -d -p 8090:8090 --name fluree fluree/server
Wait a few seconds for startup, then verify it's running by creating a test ledger:
curl -X POST "http://localhost:8090/fluree/create" \ -H "Content-Type: application/json" \ -d '{"ledger": "test/connection"}'
You should see a JSON response with "ledger": "test/connection" confirming the server is ready.
2. Create a Ledger
A ledger is Fluree's term for a database. Create one called quickstart/demo:
curl -X POST "http://localhost:8090/fluree/create" \ -H "Content-Type: application/json" \ -d '{ "ledger": "quickstart/demo", "insert": { "@context": { "ex": "http://example.org/" }, "@id": "ex:alice", "@type": "ex:Person", "ex:name": "Alice", "ex:age": 30 } }'
This creates the ledger and inserts your first entity in one operation.
3. Insert More Data
Add another person:
curl -X POST "http://localhost:8090/fluree/transact" \ -H "Content-Type: application/json" \ -d '{ "ledger": "quickstart/demo", "insert": { "@context": { "ex": "http://example.org/" }, "@id": "ex:bob", "@type": "ex:Person", "ex:name": "Bob", "ex:age": 25, "ex:knows": { "@id": "ex:alice" } } }'
Notice how Bob references Alice using "@id": "ex:alice" — this creates a graph relationship.
4. Query Your Data
Get All People
curl -X POST "http://localhost:8090/fluree/query" \ -H "Content-Type: application/json" \ -d '{ "from": "quickstart/demo", "@context": { "ex": "http://example.org/" }, "select": { "?person": ["*"] }, "where": { "@id": "?person", "@type": "ex:Person" } }'
Find People Over 25
curl -X POST "http://localhost:8090/fluree/query" \ -H "Content-Type: application/json" \ -d '{ "from": "quickstart/demo", "@context": { "ex": "http://example.org/" }, "select": ["?name", "?age"], "where": [ { "@id": "?person", "ex:name": "?name", "ex:age": "?age" }, ["filter", "(> ?age 25)"] ] }'
Traverse Relationships
Find who Bob knows:
curl -X POST "http://localhost:8090/fluree/query" \ -H "Content-Type: application/json" \ -d '{ "from": "quickstart/demo", "@context": { "ex": "http://example.org/" }, "select": { "ex:bob": ["ex:knows"] } }'
5. Update Data
Change Alice's age:
curl -X POST "http://localhost:8090/fluree/transact" \ -H "Content-Type: application/json" \ -d '{ "ledger": "quickstart/demo", "@context": { "ex": "http://example.org/" }, "where": { "@id": "ex:alice", "ex:age": "?oldAge" }, "delete": { "@id": "ex:alice", "ex:age": "?oldAge" }, "insert": { "@id": "ex:alice", "ex:age": 31 } }'
6. View History
Fluree tracks all changes. See what changed over time:
curl -X POST "http://localhost:8090/fluree/history" \ -H "Content-Type: application/json" \ -d '{ "from": "quickstart/demo", "@context": { "ex": "http://example.org/" }, "history": "ex:alice", "t": { "from": 1 } }'
What's Next?
You've just scratched the surface. Explore these topics:
- Installation Guide — Production setup options
- Core Concepts — Understand the data model
- Learn Fluree — Concepts, guides, and advanced topics
- FlureeQL Reference — Complete query syntax
- HTTP API Reference — All available endpoints
Cleanup
Stop and remove the container:
docker stop fluree && docker rm fluree