This article briefly outlines the basic steps necessary to install and run Memgraph with Docker.
Before you proceed with the installation guide make sure that you have:
- Installed Docker. Instructions on how to do this can be found on the official Docker website.
- Downloaded the latest Memgraph Docker Image which can be found here.
Memgraph's Docker image was built with Docker version
1.12 and should be
compatible with all newer versions.
If you installed Docker and downloaded the latest Memgraph Docker image, import the image using the following command:
To start Memgraph, use the following command:
If successful, you should see a message similar to the following :
At this point, Memgraph is ready for you to submit queries.
The username and password for connecting to the database are empty by default.
To stop a Memgraph database instance, run the following command:
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
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:
Although unlikely, some OS X/macOS users might experience minor difficulties
after the Docker installation. Instead of running on
localhost, a Docker container for Memgraph may be running on a custom IP
address. Fortunately, that IP address can be found as follows:
1) Determine the container ID of the Memgraph container
By issuing the command
docker ps the user should get an output similar to the
At this point, it is important to remember the container ID of the Memgraph
image. In our case, that is
2) Use the container ID to retrieve an IP of the container
The command above should yield the IP that should be used when
connecting to Memgraph and instead of
HOST when firing up the
with Docker, as described in the querying section.
If you need more information on working with Docker, check out this guide.
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.
Visit the Getting help page in case you run into any kind of problem or you have additional questions.