Once Hasura GraphQL Engine One-Click Droplet is ready, you can visit the Droplet
IP to open the Hasura console, where you can create tables, explore GraphQL APIs
etc. Note that it might take 1 or 2 minutes for everything to start running.

The Hasura console will be at:

http://your_droplet_ip/console

The GraphQL Endpoint will be:

http://your_droplet_ip/v1alpha1/graphql

A Postgres database is also provisioned on the Droplet. Using the console, you
can create a table on this Postgres instance and make your first GraphQL query.

By default Hasura is exposed without any secret key. Anyone can read and write
to your database using GraphQL. When deploying to production, you should secure
the endpoint by adding an admin secret key and then setting up permission rules on
tables.

To add an admin secret key, follow the steps given below:

Connect to the Droplet via SSH:

ssh root@your_droplet_ip

Goto /etc/hasura directory:

cd /etc/hasura

Edit docker-compose.yaml and un-comment the line that mentions admin secret key.
Also change it to some unique secret:

vim docker-compose.yaml
...
# un-comment next line to add an admin secret key
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
...
# type ESC followed by :wq to save and quit

Update the container:

docker-compose up -d

That’s it. Visit the console at http://your_droplet_ip/console and it should
prompt for the admin secret key. Further API requests can be made by adding the
following header:

If you own a domain, you can enable HTTPS on this Droplet by mapping the domain
to the Droplet’s IP. The One-Click Droplet is configured with Caddy which is an
HTTP/2 web server with automatic HTTPS using Let’s Encrypt.

Go to your domain’s DNS dashboard and add an A record mapping the domain to the Droplet IP.