Skip to main content
Version: 2.5.0

Install MemgraphDB on macOS with Docker

This article briefly outlines the basic steps necessary to install and run MemgraphDB on macOS with Docker.

caution

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:

info

Memgraph's Docker image was built with Docker version 1.12 and should be compatible with all newer versions.

Install MemgraphDB

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 MemgraphDB

To start Memgraph, use the following command:

docker run -p 7687:7687 -p 7444:7444 -v mg_lib:/var/lib/memgraph 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.

info

The username and password for connecting to the database are empty by default.

Stop MemgraphDB

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:

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:

docker run -p 7687:7687 -p 7444:7444 \
-v mg_lib:/var/lib/memgraph \
-v mg_log:/var/log/memgraph \
-v mg_etc:/etc/memgraph \
memgraph/memgraph --log-level=TRACE

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, 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 command:

docker run -p 7687:7687 -p 7444:7444 memgraph/memgraph --log-level=TRACE
caution

When working with MemgraphDB, you should pass configuration flags as arguments.

For example, you should start the MemgraphDB image with docker run memgraph/memgraph --bolt-port=7687 --log-level=TRACE, and Memgraph Platform with docker run -e MEMGRAPH="--bolt-port=7687 --log-level=TRACE" 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 Drivers overview 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.