This article briefly outlines the basic steps necessary to install and run Memgraph DB on macOS with Docker.
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.
Before you proceed with the installation guide, make sure that you have:
- Docker Desktop - Install Docker in order to install Memgraph DB.
Memgraph's Docker image was built with Docker version
1.12 and should be
compatible with all newer versions.
Install Memgraph DB
1. Download the latest Memgraph Docker image from the Download Hub.
2. Import the image using the following command:
docker load -i /path-to/memgraph-<version>-docker.tar.gz
Start Memgraph DB
To start Memgraph, use the following command:
docker run -p 7687:7687 -v mg_lib:/var/lib/memgraph memgraph
If successful, you should see a message similar to the following:
You are running Memgraph vX.X.X
To get started with Memgraph, visit https://memgr.ph/start
At this point, the Memgraph database is ready for you to submit Cypher queries via a command-line tool mgconsole, visual user interface Memgraph Lab or various drivers.
The username and password for connecting to the database are empty by default.
Stop Memgraph DB
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:
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:
docker run -p 7687:7687 \
-v mg_lib:/var/lib/memgraph \
-v mg_log:/var/log/memgraph \
-v mg_etc:/etc/memgraph \
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
The logs will be saved to the
mg_log volume, but the location of the
directories depends on your specific setup.
When using Docker, you can also specify the configuration options in the
docker run -p 7687:7687 memgraph --bolt-port=7687
When working with Memgraph DB, you should pass configuration flags as arguments.
For example, you should start the Memgraph DB image with
docker run memgraph
--bolt-port=7687, and Memgraph Platform with
docker run -e MEMGRAPH="--bolt-port=7687"
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.
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.