Ask a Question

Download

Tip For a single server setup, recommended for new users, please see Get Started page.

Docker

docker pull dgraph/dgraph:main

# You can test that it worked fine, by running:
docker run -it dgraph/dgraph:main dgraph

Automatic download

Running

curl https://get.dgraph.io -sSf | bash

# Test that it worked fine, by running:
dgraph

would install the dgraph binary into your system.

Other installation options:

Add -s -- before the flags.() -y | --accept-license: Automatically agree to the terms of the Dgraph Community License (default: “n”).

-s | --systemd: Automatically create Dgraph’s installation as Systemd services (default: “n”).

-v | --version: Choose Dgraph’s version manually (default: The latest stable release, you can do tag combinations e.g main-beta1 or -rc1).

Installing Dgraph and requesting the automatic creation of systemd service. e.g:

curl https://get.dgraph.io -sSf | bash -s -- --systemd

Using Environment variables:

ACCEPT_LICENSE: Automatically agree to the terms of the Dgraph Community License (default: “n”).

INSTALL_IN_SYSTEMD: Automatically create Dgraph’s installation as Systemd services (default: “n”).

VERSION: Choose Dgraph’s version manually (default: The latest stable release).

curl https://get.dgraph.io -sSf | VERSION=main-beta1 bash
Note Be aware that using this script will overwrite the installed version and can lead to compatibility problems. For example, if you were using version v1.0.5 and forced the installation of main-Beta, the existing data won’t be compatible with the new version. The data must be exported before running this script and reimported to the new cluster running the updated version.

Manual download [optional]

If you don’t want to follow the automatic installation method, you could manually download the appropriate tar for your platform from Dgraph releases. After downloading the tar for your platform from Github, extract the binary to /usr/local/bin like so.

# For Linux
$ sudo tar -C /usr/local/bin -xzf dgraph-linux-amd64-VERSION.tar.gz

# For Mac
$ sudo tar -C /usr/local/bin -xzf dgraph-darwin-amd64-VERSION.tar.gz

# Test that it worked fine, by running:
dgraph

Building from Source

Note You can build the Ratel UI from source separately following its build instructions. Ratel UI is distributed via Dgraph releases using any of the download methods listed above.

Make sure you have Go v1.11+ installed.

You’ll need the following dependencies to install Dgraph using make:

sudo apt-get update
sudo apt-get install gcc make

After installing Go, run

# This should install dgraph binary in your $GOPATH/bin.

git clone https://github.com/dgraph-io/dgraph.git
cd ./dgraph
make install

If you get errors related to grpc while building them, your go-grpc version might be outdated. We don’t vendor in go-grpc(because it causes issues while using the Go client). Update your go-grpc by running.

go get -u -v google.golang.org/grpc