Install Memgraph on Windows with WSL

This article briefly outlines the basic steps necessary to install and run Memgraph on Windows with the Windows Subsystem for Linux.

⚠️

Newer versions of Memgraph might not be backward compatible with older versions and you might not be able to load storage snapshots between different versions. In that case, please contact the Memgraph team and we'll help with the migration as much as possible.

Prerequisites

Before you proceed with the installation guide make sure that you have:

Installation guide

Start Ubuntu

Run the command below from PowerShell to launch Ubuntu:

ubuntu

You can also run Ubuntu from the Start menu.

Install Memgraph

To set up the Memgraph database, use the command below in the Ubuntu terminal:

sudo dpkg -i /mnt/<drive>/Users/<windows username>/Downloads/memgraph_<version>.deb

You can also obtain the Memgraph package using the direct download link. On that page, you will always find the links to the latest release. Make sure to replace the link in the command below with the most recent one:

wget [YOUR_DIRECT_DOWNLOAD_LINK_HERE] -O memgraph.deb 
sudo dpkg -i memgraph.deb

For example, the command for version 2.10.1 on Ubuntu 20.04 would look like:

wget https://download.memgraph.com/memgraph/v2.10.1/ubuntu-20.04/memgraph_2.10.1-1_amd64.deb -O memgraph.deb
sudo dpkg -i memgraph.deb

After the installation is done Memgraph will start automatically.

Verify that Memgraph is running

To verify that Memgraph is running, run the following:

sudo journalctl --unit memgraph

If successful, you should receive an output similar to the following:

You are running Memgraph vX.X.X

If the Memgraph database instance is not running, you can start it explicitly:

sudo runuser -l memgraph -c '/usr/lib/memgraph/memgraph'

If successful, you should receive an output similar to the following:

You are running Memgraph vX.X.X

If you want to start Memgraph with different configuration settings, check out the Configuration section.
At this point, Memgraph is ready for you to submit queries.

⚠️

Potential installation error You could get errors while installing the package with the above commands if you don't have all of Memgraph's dependencies installed. The issues mostly look like the following:

dpkg: error processing package memgraph (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 memgraph

To install missing dependencies and finish the installation of the Memgraph package, just issue the following command:

sudo apt-get install -f

The above command will install all missing dependencies and will finish configuring the Memgraph package.

Configuration

The Memgraph configuration file is available at /etc/memgraph/memgraph.conf. If the configuration file is altered, Memgraph needs to be restarted.

To learn about all the configuration options, check out the Reference guide.

Troubleshooting

Accessing files from your Windows system

Usually, you can find the Windows users directories in this location:

/mnt/<drive>/Users/<username>

Unable to install the Memgraph package with dpkg

While running the following dpkg command:

sudo dpkg -i /mnt/<drive>/Users/<windows username>/Downloads/memgraph_<version>.deb

you may encounter errors that resemble the following:

dpkg: error processing package memgraph (--install): dependency problems -
leaving unconfigured Errors were encountered while processing: memgraph

These errors indicate that you don’t have all of the necessary dependencies installed. To install the missing dependencies and finish the installation, issue the following command:

sudo apt-get install -f

Multiple notes when starting Memgraph

When you start a Memgraph instance, you may see the following list of notes in your terminal:

You are running Memgraph v1.4.0-community
 
NOTE: Please install networkx to be able to use graph_analyzer module. Using Python:
3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0]
 
NOTE: Please install networkx to be able to use Memgraph NetworkX wrappers. Using Python:
3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0]
 
NOTE: Please install networkx, numpy, scipy to be able to use proxied NetworkX algorithms. E.g., CALL nxalg.pagerank(...).
Using Python:
3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0]
 
NOTE: Please install networkx to be able to use wcc module.
Using Python:
3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0]

If you wish to work with built-in NetworkX modules in Memgraph, you need to install the following Python libraries:

For more information on how to install Python libraries in WSL, follow the Python installation guide (opens in a new tab). If you are not interested in working with query modules that depend on these libraries, you can ignore the warnings.

For more information on the installation process and for additional questions, visit the Help Center page.