> For the complete documentation index, see [llms.txt](https://hellbot-docs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hellbot-docs.gitbook.io/docs/database/postgresql.md).

# PostgreSQL

Guide to get a PostgreSQL Database url.

### :pushpin: From ElephantSQL

{% embed url="<https://customer.elephantsql.com/login>" %}
ElephantSQL
{% endembed %}

* Open ElephantSQL website from above and login into your account. If you don't have an account on ElephantSQL, you'll have to create an account using github or google.
* After logging is done, you'll see 'Create new Instance' on top right side of the page.

![Create New Instance](https://435958738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6tuEoYwPa7KG9ZYaI0DC%2Fuploads%2FFCKYH87M4qVS01lOl1s6%2Fphoto_2022-08-21_14-01-59.jpg?alt=media\&token=08ddb9a6-6601-4723-8cf1-874fa9e4e600)

* Now fill 'HellBot DB' in the Name field and select plan as 'Tiny Turtle'
* Then scroll down and click on 'Select Region'.

![Name & Plan](https://435958738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6tuEoYwPa7KG9ZYaI0DC%2Fuploads%2FdP6ciWirAEOXaPVP5zni%2Fphoto_2022-08-21_14-06-34.jpg?alt=media\&token=e54a6615-6bc7-4114-a9f5-cf026d81c541)

* Leave it as it is. It should be Northern Virginia by default.
* Now scroll down and click on 'Review'.&#x20;
* In the next page, scroll down again and click on 'Create Instance'
* Now click on your newly created database.&#x20;
* Under details section, you'll see your URL. Unhide it and copy the database url.
* That's all. You got your database url from elephantsql.

### :pushpin: From Heroku

{% embed url="<https://dashboard.heroku.com>" %}
Heroku
{% endembed %}

* Open Heroku website from above.
* Create a new app from option at top right side.

![Create new app](https://435958738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6tuEoYwPa7KG9ZYaI0DC%2Fuploads%2FeeiLMgMV4bC1Sl0Jn26f%2Fphoto_2022-08-21_14-17-54.jpg?alt=media\&token=577a6909-ac6f-4c05-8373-632e4352d137)

* Now give your app a name and click on 'Create App'.
* Now, go to resources bar and click on 'Quickly add Addons'
* Type 'heroku postgres' and you'll see 'Heroku Postgres' in the list. Click on that.

![Create Database](https://435958738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6tuEoYwPa7KG9ZYaI0DC%2Fuploads%2FJb2WqbfH5UdMdfbJZXra%2Fphoto_2022-08-21_14-23-21.jpg?alt=media\&token=1e371d29-6c6e-466e-b6f4-05f6941d6f96)

* Now select free plan and click on 'Submit Order Form'.
* Now go to settings bar, scroll down and click on 'Reveal Config Var'.
* Now open 'DATABASE\_URL' variable and copy the value. That's your Database Url from Heroku.

![Databse url](https://435958738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6tuEoYwPa7KG9ZYaI0DC%2Fuploads%2F3xCybKZaTXX5NvKtKnA9%2Fphoto_2022-08-21_14-29-09.jpg?alt=media\&token=a37773ef-89a7-4d3c-8635-5426bf0062cf)
