Head to https://cloud.hasura.io and sign-up for an account if you don't already have one. This account will be used to administer all the Hasura instances that you own. If you already have a Hasura Cloud, please ensure that you can see the New Self-Hosted Project
option in the Cloud dashboard:
If you don't see this option, please contact Hasura support to enable it for your Cloud account.
Click on the aforementioned option to register your self-hosted Hasura instance as a project in Hasura Cloud and filling in the following details:
- Name: a name for the project, for example
Local-HGE
- Endpoint: the URL for the Hasura instance (without
/v1/graphql
), for examplehttp://localhost:8080
Note: This information can be updated later.
Click the Create Project
button and copy the Pro Key
(it will only be shown once):
This key allows communication between your Hasura instance and Hasura Cloud's backend. You can always create a new key if required but the previous key will no longer be valid.
To unlock Hasura Enterprise capabilities, you'll need to run the regular Hasura GraphQL engine image with the following environment variables:
HASURA_GRAPHQL_ADMIN_SECRET
: you may have already done this, but if not, please add an admin secret to secure your instance.HASURA_GRAPHQL_PRO_KEY
: Use the Pro key from the previous step as the value for this environment variable.
Sample Hasura image Docker config:
graphql-engine:
image: hasuraci/graphql-engine-pro:v2.0.1-pro.1
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_PRO_KEY : eyJwcm9qZWN0X2lkIjoiOTYyMThhOTYtZjQyYi00YzUyLThkMjUtZWIzN2NjMzFmMDY3IiwiY29uc29sZV9pZCI6Ijk2MjE4YTk2LWY0MmItNGM1Mi04ZDI1LWViMzdjYzMxZjA2N19jb25zb2xlIiwic2VydmVyX2lkIjoiOTYyMThhOTYtZjQyYi00YzUyLThkMjUtZWIzN2NjMzFmMDY3X3NlcnZlciIsInNlcnZlcl9zZWNyZXQiOiJ2QzZLOFVXUWJKUG90Zm9FZHpYbUljcUJWSUNDYXVWMkhKOWNBbXpBWU1ITk9JVkpZM2luMjV0OFRhZzdFODBUIn0=
...
Your console should now feature a new Login option in addition to the previous admin secret.
You may need to sign out of an existing session via the "Sign out" option in the Settings page
Please use Chrome
- Admin secret: you can still provide the admin secret and login with full admin permissions
- Login with Hasura: you can log in to this console with your new Hasura account (OAuth2.0 login flow). This option redirects you to the Hasura Accounts page and prompts for login and consent if required.
All the features documented here and SSO capabilities via Hasura Cloud are now available to you to configure.
Comment to host images