> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prod.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CockroachDB

> Build apps with read and write access to a CockroachDB database

## Setting up CockroachDB

### 1. Add integration

Select **CockroachDB** from the&#x20;
**integrations page**.

### 2. Configure settings

Fill out the form with the following settings:

| Setting | Required | Description |
| - | - | - |
| Name | ✓ | Name that will be displayed to users when selecting this integration in Prod AI |
| Host | ✓ | Hostname or IP address to connect to |
| Port | ✓ | Port to use when connecting to CockroachDB |
| Database Name | ✓ | Name of database to connect to |
| Database Username | ✓ | Username to use to connect |
| Database Password | ✓ | Password for database username |
| Enable SSL | ✗ | Connect via SSL if selected |
| Use a self-signed SSL certificate | ✗ | Provide **Server CA**, **Client Key**, and **Client Cert** if selected |

### 3. Test and save

Click **Test Connection** to check that Prod AI can connect to the data source.

On Dedicated Cloud, allowlist your [Prod AI data plane IP addresses](https://docs.prod.ai/deployment/security/overview.md#ip-addresses).

After connecting successfully, click **Create** to save the integration.

### 4. Set data tags

Optionally, configure different data tags for [separate development environments](https://docs.prod.ai/development-lifecycle/build/data-tags.md).

**CockroachDB connected!**
You can now build
[apps](https://docs.prod.ai/coding-agents/apps.md) and [agents](https://docs.prod.ai/coding-agents/agents.md) with CockroachDB.

## Creating CockroachDB steps

Connect to your CockroachDB integration from Prod AI by creating steps in Application APIs, Workflows and Scheduled Jobs. You can configure a Prod AI CockroachDB integration with read only, read/write, or write only users. You can then configure a Prod AI CockroachDB step to read from a database, as well as modify/delete data. To get started, enter your SQL query into the text area of the CockroachDB step. Then click "Run" to see the Result and Executed SQL statement below.

## Troubleshooting

Check out our guide on [common errors across database integrations](https://docs.prod.ai/integrations/troubleshooting/troubleshooting-databases.md), in addition to [CockroachDB's troubleshooting guide](https://www.cockroachlabs.com/docs/stable/error-handling-and-troubleshooting.html). If you are encountering an error that you don't see in the guide, or the provided steps are insufficient to resolve the error, please contact us at [support@prod.ai](mailto:support@prod.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.