> For the complete documentation index, see [llms.txt](https://docs.omics.ai/products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omics.ai/products/publisher/data-sources/connectors/connecting-to-postgresql.md).

# Connecting to PostgreSQL

Connect [Publisher](https://github.com/DNAstack/dnastack-product-docs/blob/main/docs/publisher/data-sources/connectors/broken-reference/README.md) to [PostgreSQL](https://www.postgresql.org/docs/) databases to access and share your data. This connection requires your PostgreSQL database credentials and connection details.

## Prerequisites

Before beginning, gather these database details:

* Username
* Password
* Host name
* Port number
* Database name

## Configuration Process

### Initial Setup

From the Publisher interface, select "Data Sources" in the navigation bar and click "Connect Data Source". Choose "PostgreSQL Database" from the available connectors.

### Database Configuration

Enter your PostgreSQL connection details:

* Database username and password
* Host name
* Port number (default is typically 5432)
* Database name
* Enable TLS if required for your connection

{% hint style="warning" %}
Ensure your database user has appropriate permissions for the data you wish to access and that your network security settings allow the connection.
{% endhint %}

### Finalizing Setup

1. Provide a descriptive name for your data source
2. Optionally create and share a collection


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.omics.ai/products/publisher/data-sources/connectors/connecting-to-postgresql.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.
