Tutorial: Installing Hasura on Ubuntu Server

In this tutorial, we will walk you through the steps to install Hasura on the latest version of Ubuntu Server. Hasura is an open-source engine that helps you build powerful GraphQL APIs on Postgres databases quickly.

Before we start, make sure you have the following requirements in place:

Now let's proceed to the installation steps:

Step 1: Install the Hasura CLI

Hasura CLI is a command-line tool that allows you to create and manage Hasura projects. To install it, run the following command on your terminal:

curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash

This command will download and install the Hasura CLI on your machine. Once the installation is complete, you can check if the installation has been successful by running the following command:

hasura version

This command should return the version of Hasura CLI installed on your machine.

Step 2: Create a new project

Now that you have installed the Hasura CLI, you can create a new Hasura project. To create a new project, run the following command:

hasura init <project-name>

Replace <project-name> with the desired name for your project. This command will create a new Hasura project with the specified name in the current directory.

Step 3: Deploy Hasura GraphQL Engine

To run Hasura, you will need to deploy the Hasura GraphQL Engine. Here are the steps to do that:

  1. Change directories to your project folder:
cd <project-name>
  1. Run the following command to deploy Hasura:
hasura quickstart

This command will deploy Hasura on your local machine.

Step 4: Access the Hasura Console

Once the Hasura GraphQL Engine is deployed, you can access the Hasura Console by opening a web browser and navigating to http://localhost:8080/console.

The Hasura Console is a web-based tool that allows you to manage Hasura projects and GraphQL APIs. You can use it to create tables, define relationships, and run queries.

Conclusion

Congratulations! You have successfully installed Hasura on Ubuntu Server and deployed the Hasura GraphQL Engine. You can now use Hasura to build powerful GraphQL APIs and manage your data more efficiently. Happy coding!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!