How to Install Hasura on Linux Mint Latest

In this tutorial, we will walk you through the installation process of Hasura on Linux Mint latest version.

Prerequisites

Step 1 – Install Hasura

  1. Open your terminal
  2. Run the following command to download the Hasura docker image:
sudo docker pull hasura/graphql-engine

Step 2 – Create a docker-compose.yaml file

  1. Run the following command to create a new directory for your Hasura project:
mkdir hasura
cd hasura
  1. Run the following command to create a docker-compose.yaml file:
nano docker-compose.yaml
  1. Copy and paste the following code into the docker-compose.yaml file:
version: '3'
services:
  app:
    image: hasura/graphql-engine:v2.0.0-beta.6
    ports:
      - "8080:8080"
      - "9695:9695"
    volumes:
      - ./config:/hasura/config
      - ./migrations:/hasura-migrations
    environment:
      HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
      HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
    depends_on:
      - db
  db:
    image: postgres:12.4
    volumes:
      - db-data:/var/lib/postgresql/data/
    environment:
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
      POSTGRES_DB: postgres
volumes:
  db-data:
  1. Save the file

Step 3 – Start the Hasura container

  1. Run the following command to start the Hasura container:
docker-compose up -d
  1. Open your browser and navigate to http://localhost:8080/console

  2. You can now start using Hasura

Conclusion

That’s it! You have successfully installed Hasura on Linux Mint latest version. If you face any issues during the installation process, feel free to comment below.

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!