2020-08-25 14:53:25 +03:00
.. meta ::
:description: Creating projects on Hasura Cloud
:keywords: hasura, cloud, docs, start
.. _create_project:
Creating projects
=================
.. contents :: Table of contents
:backlinks: none
:depth: 2
:local:
Introduction
------------
You can create a new Hasura Cloud project with either a new Postgres database, or an existing Postgres database with a publicly available IP address.
2020-11-27 15:13:36 +03:00
Step 1: Project setup
---------------------
2020-08-25 14:53:25 +03:00
To begin, navigate to the `` Projects `` page, and click the `` New Project `` link.
2020-08-25 19:21:21 +03:00
.. thumbnail :: /img/graphql/cloud/projects/create-new-project.png
2020-08-25 14:53:25 +03:00
:alt: create new project button
2021-02-23 14:20:34 +03:00
:width: 400px
2020-08-25 14:53:25 +03:00
2020-11-27 15:13:36 +03:00
This opens a form on the right where you can create your new project.
2021-02-23 14:20:34 +03:00
Choose a pricing plan, select a region and optionally enter the project name for your project in this form.
2020-11-27 15:13:36 +03:00
.. thumbnail :: /img/graphql/cloud/projects/project-setup.png
:alt: project setup
2021-02-23 14:20:34 +03:00
:width: 1100px
2020-11-27 15:13:36 +03:00
2021-02-23 14:20:34 +03:00
Once you have completed the project setup, click `` Create Project `` .
2020-11-27 15:13:36 +03:00
Step 2: Database setup
----------------------
2021-02-23 14:20:34 +03:00
To get started, Click `` Launch Console `` to open the Hasura console in your browser.
.. thumbnail :: /img/graphql/cloud/getting-started/project-launch-console.png
:alt: database setup with new database
:width: 900px
On the Hasura console, navigate to `` Data -> Manage -> Connect Database `` :
2020-11-27 15:13:36 +03:00
New database
^^^^^^^^^^^^
2020-08-25 14:53:25 +03:00
Hasura Cloud does not host databases, but does provide integrations with which you can create databases on managed cloud providers like Heroku. Integrations for AWS, GCP, and Azure are coming soon.
2021-02-23 14:20:34 +03:00
To get started, choose `` Create Heroku Database -> Create Database `` , and follow the prompts to authenticate with Heroku. Hasura Cloud will integrate with your Heroku account and manage the initial setup of a dev-tier Postgres instance. You can always upgrade the instance and manage options later through your Heroku account.
2020-08-25 14:53:25 +03:00
2020-11-27 15:13:36 +03:00
.. thumbnail :: /img/graphql/cloud/projects/project-new-database-setup.png
:alt: database setup with new database
2021-02-23 14:20:34 +03:00
:width: 700px
2020-08-25 14:53:25 +03:00
2020-11-27 15:13:36 +03:00
Existing database
^^^^^^^^^^^^^^^^^
2021-02-23 14:20:34 +03:00
To use an existing database, choose `` Connect existing database `` and enter your database connection URL and enter your database connection string (looks like `` postgres://username:password@hostname:port/dbname `` ).
2020-08-25 14:53:25 +03:00
2021-02-23 14:20:34 +03:00
.. thumbnail :: /img/graphql/cloud/projects/existing-db-setup.png
2020-11-27 15:13:36 +03:00
:alt: database setup with existing database
2021-02-23 14:20:34 +03:00
:width: 700px
2020-08-25 14:53:25 +03:00
2021-03-08 18:42:35 +03:00
.. note ::
You can connect to databases either using env vars or by using their raw connection string/parameters. It is
recommended to use env vars for better security *(as connection details are part of Hasura metadata)* as well as
to allow configuring different databases in different environments *(like staging/production)* easily.
2020-08-25 14:53:25 +03:00
Allowing connections from Hasura Cloud IP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-02-23 14:20:34 +03:00
For some cloud services, like GCP, you'll need to adjust your Postgres connection settings to allow connections from the Hasura Cloud IP address. You can copy the IP address from the copy icon in the `` Hasura Cloud IP `` field on the project's details view. You may also need to disable SSL. Adding custom cert information to a Hasura Cloud instance is not yet available.
2020-08-25 14:53:25 +03:00
2020-08-25 19:21:21 +03:00
.. thumbnail :: /img/graphql/cloud/projects/hasura-cloud-ip.png
2020-08-25 14:53:25 +03:00
:alt: Hasura Cloud IP field
2020-11-27 15:13:36 +03:00
:width: 1000px
2020-08-25 14:53:25 +03:00
2020-08-25 19:21:21 +03:00
.. thumbnail :: /img/graphql/cloud/projects/gcp-postgres-authorized-network.png
2020-08-25 14:53:25 +03:00
:alt: whitelist Hasura instance IP in Postgres settings
:width: 727px
2021-01-14 11:16:32 +03:00
Postgres requirements
---------------------
2020-08-25 14:53:25 +03:00
Hasura Cloud works with **Postgres versions 9.5 and above** .
2021-01-14 11:16:32 +03:00
Make sure your database user has the right :ref: `Postgres permissions <cloud_postgres_permissions>` .
2020-08-25 14:53:25 +03:00
2021-01-14 11:16:32 +03:00
Connecting to a database not exposed over the internet
------------------------------------------------------
2020-08-25 14:53:25 +03:00
2021-01-14 11:16:32 +03:00
`Contact us <https://hasura.io/contact-us/> `__ for VPC peering and on-premise solutions.
2020-08-25 14:53:25 +03:00
2020-11-27 15:13:36 +03:00
More databases
--------------
Support for more databases (MySQL, SQL Server etc) is coming soon.