Skip to main content
Version: 1.5.0

Troubleshooting installation on Linux

Issues when connecting to Memgraph​

docker run memgraph

While this command will start a Memgraph instance, not publishing the port will cause problems when trying to connect to the database via Memgraph Lab or mgconsole. To avoid this, you should publish the container's port to the host using the -p flag and by specifying the port:

docker run -p 7687:7687 memgraph

Find the IP address of a Docker Container​

Although unlikely, some 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 ID of the Memgraph Container by issuing the command docker ps. The user should get an output similar to the following:

CONTAINER ID    IMAGE       COMMAND                  CREATED
9397623cd87e memgraph "/usr/lib/memgraph/m…" 2 seconds ago

At this point, it is important to remember the container ID of the Memgraph Image. In our case, that is 9397623cd87e.

2. Use the this ID to retrieve the IP address of the Container:

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 9397623cd87e

The command above will yield the IP address that should be used when connecting to Memgraph via Memgraph Lab or mgconsole as described in the querying section. Just replace HOST from the following command with the appropriate IP address:

docker run -it --entrypoint=mgconsole memgraph --host HOST --use-ssl=False