Install Memgraph Platform on Windows
The following article outlines the basic steps necessary to install and run Memgraph Platform on Windows with Docker.
Memgraph Platform contains:
- Memgraph DB - 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
Newer versions of Memgraph are currently not backward compatible with older versions. That is why you won't be able to load storage snapshots between different versions.
Prerequisites
- Docker Desktop - Memgraph Platform can be installed only with Docker.
Instructions on how to install Docker can be found on the official Docker website.
Memgraph's Docker image was built with Docker version 1.12
and should be
compatible with all newer versions.
Install Memgraph Platform
1. Open the Command Prompt or PowerShell.
2. Download and load the Memgraph Platform Docker image with the following command:
docker pull memgraph/memgraph-platform
3. Create a new tag for the image:
docker image tag memgraph/memgraph-platform memgraph
Start Memgraph Platform
To start Memgraph Platform, use the following command:
docker run -it -p 7687:7687 -p 3000:3000 -v mg_lib:/var/lib/memgraph memgraph/memgraph-platform
If successful, you should see a message similar to the following:
mgconsole X.X
Connected to 'memgraph://127.0.0.1:7687'
Type :help for shell usage
Quit the shell by typing Ctrl-D(eof) or :quit
memgraph>
Command-line tool mgconsole is open in the terminal, and the visual user
interface Memgraph Lab is available at http://localhost:3000
.
User either mgconsole, Memgraph Lab or various drivers to connect to Memgraph DB.
Stop Memgraph Platform
To stop a Memgraph database instance, run the following command:
docker stop CONTAINER_ID
You can find the name of the container (CONTAINER_ID
) by running the following command in a new terminal:
docker ps
Configuration file and logs
If you need to access the Memgraph configuration file or logs, you will need to specify the following volumes when starting Memgraph through PowerShell:
docker run -it -p 7687:7687 -p 3000:3000 -e MEMGRAPH="--bolt-port=7687" `
-v mg_lib:/var/lib/memgraph `
-v mg_log:/var/log/memgraph `
-v mg_etc:/etc/memgraph `
memgraph/memgraph-platform
The configuration file is located in the mg_etc
volume. The exact location of
the file depends on your specific setup, but usually it is
/var/lib/docker/volumes/mg_etc/_data/memgraph.conf
.
The logs will be saved to the mg_log
volume, and the directories can usually be find in
\\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\
.
When using Docker, you can also specify the configuration options in the docker
run
command:
docker run -it -p 7687:7687 -p 3000:3000 -e MEMGRAPH="--bolt-port=7687" memgraph/memgraph-platform
When working with Memgraph Platform, you should pass configuration flags inside of environmental variables.
For example, you can start the Memgraph DB image with docker run memgraph
--bolt-port=7687
, but you should start Memgraph Platform with docker run -e MEMGRAPH="--bolt-port=7687"
memgraph/memgraph-platform
.
To learn about all the configuration options, check out the Reference guide.
Where to next?
If you need more information on working with Docker, check out our guide on how
to work with Docker.
To learn how to query the database, take a look at the
querying guide or Memgraph
Playground for interactive tutorials.
Visit the Building applications
page if you need to connect to the database programmatically.
Getting help
If you run into problems during the installation process, check out our installation troubleshooting guide to see if we have already covered the topic. For more information on the installation process and for additional questions, visit the Help Center page.