Install and connect

Install Memgraph Lab and connect to a database

We recommend you use the memgraph/memgraph-platform Docker image to install Memgraph Platform and get the complete streaming graph application platform that includes:

  • Memgraph - the database that holds your data
  • Memgraph Lab - visual user interface for running queries and visualizing graph data
  • mgconsole - command-line interface for running queries
  • MAGE - graph algorithms and modules library

After running the image, mgconsole will open in the terminal while Memgraph Lab is available on http://localhost:3000.

There is also a smaller memgraph/memgraph-platform (opens in a new tab) Docker image that doesn't include MAGE - the graph algorithms and modules library. The tag includes only mamgraph and lab keywords, for example: 2.7.1-memgraph2.7.0-lab2.6.0.

If you want to install Memgraph Lab as a desktop application, check out the installation instructions for Windows, macOS and Linux, and if you have a public Memgraph database instance you can access the Lab web application at (opens in a new tab).

Install Memgraph Lab desktop application

Download and install Memgraph

Memgraph Lab needs a running Memgraph database instance.

If you installed Memgraph using Docker, and you want to be able to connect to it with Memgraph Lab desktop application, be sure that ports 7687, used for the instance connection (-p 7687:7687), and 7444, used for logs (-p 7444:7444) were exposed in the docker run ... command.

Download Memgraph Lab

Visit the Download Hub (opens in a new tab) and download Memgraph Lab desktop application.

Install Memgraph Lab

You can install Memgraph Lab by double clicking the downloaded installer and following the instructions.

If you downloaded Memgraph Lab on Linux, you can execute:

sudo dpkg -i MemgraphLab-x.x.x.deb

Set up connection

After you start Memgraph Lab, you should be presented with a login screen.

These are the default settings:

  • Leave the Username and Password fields empty.
  • The Host field can be either localhost, or, or change it appropriately.
  • The Port field should be 7687. Every Memgraph instance is listening on this port by default.
  • The Encrypted option should be disabled and display SSL Off by default.


Click on connect, and you should be presented with the following dashboard:


Congratulations! You have successfully installed Memgraph Lab and connected it to Memgraph. You are now ready to start building your graph and querying it.


You might receive the following error message when trying to connect.


In this case, make sure that Memgraph is properly up and running and that you have entered the correct port number.

Execute queries

Now, you can execute Cypher queries on Memgraph. Open the Query tab, located in the left sidebar, copy the following query and press the Run query button:

CREATE (u:User {name: "Alice"})-[:Likes]->(m:Software {name: "Memgraph"});

The query above will create 2 nodes in the database, one labeled "User" with name "Alice" and the other labeled "Software" with name "Memgraph". It will also create a relationship that "Alice" likes "Memgraph".

To find created nodes and relationships, execute the following query:

MATCH p=()-[]->() RETURN p;

You should get the following result:


Environment variables

Use the following environment variables to configure Memgraph Lab:

APP_CYPHER_QUERY_MAX_LENMax length of a Cypher query[integer]5000
APP_MODULE_NAME_MAX_LENMax length of the query module name[integer]1000
APP_MODULE_CONTENT_MAX_LENMax length of a query module content[integer]50000
APP_STREAM_NAME_MAX_LENMax length of the stream name[integer]500


docker run -p 7687:7687 -p 7444:7444 -p 3000:3000 -v memgraph/memgraph-platform -e APP_CYPHER_QUERY_MAX_LEN=10000 memgraph/memgraph-platform