Learning Environment
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
To learn about Dgraph and the components, you can install and run Dgraph cluster on a single host using Docker, Docker Compose, or Dgraph command line.
Dgraph cluster can be setup running as containers on a single host.
Before you begin
Ensure that you have installed:
Launch a Dgraph standalone cluster using Docker
-
Select a name
<CONTAINER_NAME>
for you Docker container and create a directory<GRAPH_DATA_PATH>
that for Dgraph data on your local file system. -
Run a container with the dgraph/standalone image:
-
Optionally launch Ratel using the
dgraph/ratel
docker image:You can now use Ratel UI on your browser at localhost:8000 and connect to you Dgraph cluster at localhost:8080
Setup a Dgraph cluster on a single host using Docker
-
Get the
<IP_ADDRESS>
of the host using: -
Pull the latest Dgraph image using docker:
-
Verify that the image is downloaded:
-
Create a
<DGRAPH_NETWORK>
using: -
Create a directory
<ZERO_DATA>
to store data for Dgraph Zero and run the container: -
Create a directory
<ALPHA_DATA_1>
to store for Dgraph Alpha and run the container: -
Create a directory
<ALPHA_DATA_2>
to store for the second Dgraph Alpha and run the container:To override the default ports for the second Alpha use
-o
. -
Connect the Dgraph cluster that are running using https://play.dgraph.io/. For information about connecting, see Ratel UI.
Was this page helpful?