This article briefly outlines the basic steps necessary to install and run Memgraph on Windows with Docker.
Before you proceed with the installation guide make sure that you have:
- Installed Windows Subsystem for Linux (WSL). For detailed instructions, refer to the Microsoft documentation.
- Installed Docker Desktop. Instructions on how to install Docker can be found on the official Docker website.
Memgraph's Docker image was built with Docker version
should be compatible with all newer versions.
You can either manually download the Memgraph Docker image or use the convenient
docker pull memgraph/memgraph-platform command, which we recommend.
- Pull Docker image
- Download Docker image manually
1. Download and load the Memgraph Docker image with the following command:
docker pull memgraph/memgraph-platform
2. Create a new tag for the image so it can be called as
memgraph instead of
docker image tag memgraph/memgraph-platform memgraph
1. Download the latest Memgraph Docker image from the official download center.
2. If you installed Docker correctly, you can import the image using the following command in the Comand Prompt (CMD) or PowerShell:
docker load -i /path-to/memgraph-<version>-docker.tar.gz
To start Memgraph, use the following command in the Comand Prompt (CMD) or PowerShell:
docker run -it -p 7687:7687 -p 3000:3000 memgraph
Docker containers don’t persist data by default (all changes are lost when the
container is stopped). You need to use local volumes to store the data
permanently, which is why Memgraph is started with the
docker run -it -p 7687:7687 -p 3000:3000 -v mg_lib:/var/lib/memgraph memgraph
More information on Docker Volumes can be found here.
If successful, you should see a message similar to the following:
Connected to 'memgraph://127.0.0.1:7687'
Type :help for shell usage
Quit the shell by typing Ctrl-D(eof) or :quit
The username and password for connecting to the database are empty by default.
To stop a Memgraph database instance, run the following command:
docker stop CONTAINER_NAME
You can find the name of the container (
CONTAINER_NAME) by running:
The Memgraph configuration is available in Docker's named volume
Linux systems, it should be in
/var/lib/docker/volumes/mg_etc/_data/memgraph.conf. Keep in mind that this way
of specifying configuration options is only valid if Memgraph was started using
When using Docker, you can also specify the configuration options in the
docker run -it -p 7687:7687 -p 3000:3000 -e MEMGRAPH="--bolt-port=7687" memgraph
To learn about all the configuration options, check out the Reference guide.
Accessing configuration files 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 `
mg_etc contains the configuration file while the logs will be saved
mg_log. The location of the volume directories depends on your specific
setup but can usually be found in
Reusing volumes between Memgraph versions
If it happens that the named volumes are reused between different Memgraph versions, Docker will overwrite a folder within the container with existing data from the host machine. If a new file is introduced, or two versions of Memgraph are not compatible, some features might not work, or Memgraph might not be able to work correctly. We strongly advise you to use different named volumes for different Memgraph versions or to remove the existing volume from the host with the following command:
docker volume rm <volume_name>
Where to next?
If you need more information on working with Docker, check out this
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.
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 Getting help page.