Skip to main content
This guide will walk you through setting up FalkorDB, modeling a social network as a graph, and accessing it using one of the FalkorDB client libraries with the Cypher query language.

Prerequisites

Supported servers: FalkorDB 6.2 runs as a module on Valkey or Redis 8.0.0 or later. Redis 7.x is not supported with FalkorDB 6.2. For older FalkorDB releases, check the requirements for that release. See Redis and Valkey to choose a server.
  1. FalkorDB Instance: Set up FalkorDB (on-prem or cloud). Option A β€” Docker (quickest)
    This starts FalkorDB with no authentication. Open the built-in browser at http://localhost:3000 to explore your graphs visually. See Docker & Docker Compose for additional options (persistence, auth, production images). Option B β€” FalkorDB Cloud Create a free FalkorDB Cloud Instance and skip local setup entirely.
  2. Install FalkorDB Client:

Step 1: Model a Social Network as a Graph

Let’s create a simple graph for a social network where:
  • Nodes represent User and Post.
  • Relationships connect Users with a FRIENDS_WITH relationship, and Users are connected via a CREATED relationship to Posts

Graph Schema

Node Types: Relationship Types: FalkorDB-Model a Social Network as a Graph

Step 2: Load Data into FalkorDB

Here’s how you can model and load the data.

Cypher Query to Create the Data

You can execute these commands using the FalkorDB Python client or any supported client.

Step 3: Access Your Data

Connect to FalkorDB

The examples below connect to a local FalkorDB instance started with the docker run command above, which requires no password.
Using authentication? Start FalkorDB with a password:
Then pass your password in the client configuration, for example password="yourpassword" in Python or password: 'yourpassword' in JavaScript, or use the equivalent credential option in your client library. See Docker & Docker Compose for details.

Execute Cypher Queries

Create the Graph

image

Query the Graph

Query Relationships


Step 4: Explore Further

Congratulations! πŸŽ‰ You have successfully modeled, loaded, and queried a social network graph with FalkorDB. Next, dive deeper into FalkorDB’s powerful features: For questions or support, visit our community forums

Frequently Asked Questions

FalkorDB 6.2 requires Redis 8.0.0 or later, or Valkey. The quickest setup is via Docker: docker run -p 6379:6379 -p 3000:3000 --rm falkordb/falkordb:latest. Alternatively, use FalkorDB Cloud to skip local setup entirely.
No. The FalkorDB 6.2 Docker images include everything needed: latest bundles Valkey 9.2 and latest-redis bundles Redis 8.10.2. If you are self-hosting without Docker, install Valkey or Redis 8.0.0+ and load a compatible FalkorDB module. See Redis and Valkey.
FalkorDB has official clients for Python, Node.js, Java, Rust, Go, PHP, and C#. Install them via pip, npm, Maven, Cargo, or the respective package managers. See the Client Libraries page for full details.
The FalkorDB Browser is a built-in web UI for visually exploring your graphs. When running the falkordb/falkordb:latest Docker image, open http://localhost:3000 to create, visualize, and query graphs interactively. For production, use falkordb/falkordb-server which excludes the browser.
FalkorDB uses the Property Graph Model. Data is modeled as nodes (entities with labels and properties) connected by relationships (directed edges with a type and properties). Use the Cypher query language to create and query your graph structure.