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

# Connect your data

> Connect your data sources to Basedash

Basedash supports a wide range of data sources, making it easy to connect and visualize your data. You can connect directly to SQL databases or data warehouses.

If you want a managed warehouse instead of connecting an existing one, see the Basedash [warehouse overview](https://www.basedash.com/features/warehouse).

## Supported data sources

### SQL databases

* [PostgreSQL](/data-sources/databases/postgres)
* [MySQL](/data-sources/databases/mysql)
* [PlanetScale](/data-sources/databases/planetscale)
* [Cloud Spanner](/data-sources/databases/spanner)

Teams connecting an application database can also compare BI options for [PostgreSQL](https://www.basedash.com/lp/bi-for-postgresql).

### Data warehouses

* [BigQuery](/data-sources/warehouses/bigquery)
* [Snowflake](/data-sources/warehouses/snowflake)
* [ClickHouse](/data-sources/warehouses/clickhouse)

For warehouse-specific buyer guidance, see BI for [BigQuery](https://www.basedash.com/lp/bi-for-bigquery) and [Snowflake](https://www.basedash.com/lp/bi-for-snowflake).

## Connection methods

### Direct connection

1. From your Basedash dashboard, click on "Add data source"
2. Select your database type
3. Enter your connection details:
   * Host
   * Port
   * Database name
   * Username
   * Password
4. Click "Test connection" to verify
5. Save your connection

### SSH tunnel

For enhanced security, you can connect through SSH:

1. Follow the direct connection steps
2. Enable "Connect via SSH" option
3. Add our IP (`24.199.77.73`) to your allowlist
4. Provide SSH credentials
5. Test and save the connection

### Security

All connections are encrypted and secure. Basedash:

* Uses HTTPS/TLS for all connections
* Encrypts credentials with AES-256
* Supports read-only credentials by default, with editing workflows available when you explicitly configure write permissions
* Is SOC 2 Type II compliant

For more details about security, check out our [security documentation](/essentials/security).

## Self-hosting option

For organizations that need complete control over their data infrastructure or have specific compliance requirements, we offer [self-hosting](/self-hosting/overview) as an alternative to our cloud service. Self-hosted deployments allow you to deploy Basedash on your own infrastructure while maintaining all the same data connection capabilities.

## Next steps: Add custom context

After connecting your data, we recommend setting up custom context to help the AI better understand your organization and data. This improves the accuracy of charts, automations, and chat responses.

### Quick setup

1. Press **Command + K** and type "AI context"
2. Add organization-wide context about your business, terminology, and key metrics
3. For complex data structures, add descriptions to schemas and columns in the data sources section

For detailed guidance on custom context, see our [custom context documentation](/features/custom-context).
