← Back to Guides
Profile image for Marco Suter
Published 7th April 2022

Dgraph is a powerful native GraphQL database which is highly performant. It's designed to be scalable, distributed and highly available and allows for a seamless developer experience.

In this guide we will show you how to deploy Dgraph on Northflank with a few clicks.

  1. Create a new deployment service and choose your name.

  2. Select External Image and use dgraph/standalone:latest as image path.

  3. Networking will detect ports automatically. For this setup, you can delete port 6080 as it is not required. Add port 8080 with HTTP protocol and 9080 with TCP protocol as these are required.

  4. For resources, it's recommended to use at least the nf-compute-50 plan.

  5. Under advanced, add a new persistent volume with the container mount path /dgraph.

    • Choose the storage size according to your needs, it can be increased later if your storage needs change.
  6. Click create service.

    Deploy Dgraph on Northflank, service creation steps

  7. Click Save & redeploy to restart your service.

After your service has redeployed, try to access an enpoint by clicking the link in the upper right corner. You'll see a message saying something like this: 'Dgraph browser is available for running separately using the dgraph-ratel binary'. Use the health endpoint by appending /health to your URL to ensure the Dgraph instance is healthy.

With a few clicks, a standalone instance of Dgraph has been deployed on Northflank.

Optional: Deploy Ratel, the browser UI of Dgraph

You can also optionally deploy an instance of Ratel, the browser UI of Dgraph. Ratel is a tool designed to work with Dgraph for data visualization and cluster management. Tasks like connecting to a backend, managing cluster settings and running DQL queries are typical type of tasks that can be done with Ratel.

To deploy Ratel, follow the next steps:

  1. Create a new deployment service and choose your name.

  2. Select External Image and use dgraph/ratel:latest as image path.

  3. The port should be detected automatically: 8000 with HTTP protocol.

  4. Click create service.

    Deploy Ratel, the browser UI of Dgraph, on Northflank

You can access Ratel by opening the link in the upper right corner of the service.

On the Ratel webpage, select 'use latest' and continue to the main user interface. You'll be asked to specify the Dgraph server URL. Copy the URL from your Dgraph service which we used earlier, make sure it is prefixed with https:// . A port does not have to be specified. After having entered the URL, hit connect and you are ready to go and use Ratel to manage and query your Dgraph instance.

Ratel UI

Share this article with your network
X