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 apt install /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 apt install ./memgraph.deb

For example:

wget https://download.memgraph.com/memgraph/v3.14.0/x86_64-deb/memgraph_3.14.0-1_amd64.deb -O memgraph.deb
sudo apt install ./memgraph.deb

For the latest version of Memgraph, replace the version in the download command with the one from the direct download links page.

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.

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>

Multiple notes when starting Memgraph

As of Memgraph 3.13, the package installs the Python libraries used by the bundled query modules — including NumPy, SciPy and NetworkX — automatically during package installation (the machine needs network access at install time). If that automatic installation was skipped (MG_SKIP_PYTHON_DEPS=1) or failed, Memgraph reports it with a note like this on startup:

You are running Memgraph v3.14.0
To get started with Memgraph, visit https://memgr.ph/start
NOTE: Please install networkx, numpy, scipy to be able to use proxied NetworkX algorithms. E.g., CALL nxalg.pagerank(...).

In that case, install the missing libraries manually as the memgraph user (they must land in the memgraph user’s environment, since the embedded interpreter runs as memgraph):

sudo runuser -l memgraph -c 'python3 -m pip install --user networkx numpy scipy'

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.