# Deploy Postgres by running a single Docker container

The following steps describe how to run the Postgres server in a Docker container.

In a terminal:&#x20;

{% stepper %}
{% step %}
Clone the git repository ddhub-client-gateway

```
git clone https://github.com/energywebfoundation/ddhub-client-gateway.git
```

{% endstep %}

{% step %}
Change the directory to the example directory

```
cd ddhub-client-gateway && cd get-started
```

{% endstep %}

{% step %}
Start the Postgres servicedocker compose up postgres

```
docker compose up postgres
```

The example Postgres will have the user `ddhub` with password `password123` and database `ddhub` created
{% endstep %}

{% step %}
Access the database via the connection string

`postgresql://ddhub:password123@localhost:5432/ddhub`
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-launchpad.energyweb.org/energy-solutions/digital-spine-by-energy-web/component-guides/ddhub-client-gateway/deployment-guide/preparing-to-set-up-a-client-gateway/deploying-the-postgresql-database/deploy-postgres-by-running-a-single-docker-container.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
