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:
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.
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.
To run Hasura, you will need to deploy the Hasura GraphQL Engine. Here are the steps to do that:
cd <project-name>
hasura quickstart
This command will deploy Hasura on your local machine.
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.
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!