Database Integrations
AutoDB connects to any PostgreSQL database. The setup varies slightly by provider — mainly around SSL mode, connection string format, and network access. This guide covers each supported provider.
Connection String Format
Section titled “Connection String Format”Every provider uses a standard PostgreSQL URI:
postgresql://USERNAME:PASSWORD@HOST:PORT/DATABASEAutoDB encrypts connection strings at rest using Fernet symmetric encryption. Credentials are never returned by the API after registration.
Providers
Section titled “Providers”db_type: supabase
Supabase provides a managed PostgreSQL database with connection pooling via Supavisor.
Find your credentials:
- Open your Supabase project dashboard
- Go to Settings > Database
- Copy the Connection string under “Direct connection” (not the pooled connection)
Connection details:
| Field | Value |
|---|---|
| Host | db.<project-ref>.supabase.co |
| Port | 5432 (direct) or 6543 (pooled via Supavisor) |
| Database | postgres |
| SSL Mode | require |
Register via API:
curl -X POST https://api.autodb.app/api/v1/connections \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "name": "Supabase Production", "db_type": "supabase", "connection_string": "postgresql://postgres.xxxx:YOUR_PASSWORD@db.xxxx.supabase.co:5432/postgres" }'Network access:
Supabase databases are publicly accessible by default with SSL enforced. No IP allowlisting is required unless you have restricted network policies enabled in your project settings.
db_type: postgresql_aws
AWS RDS and Aurora PostgreSQL instances live inside a VPC. AutoDB needs network access to reach your database endpoint.
Find your credentials:
- Open the RDS console and select your instance
- Copy the Endpoint from the Connectivity tab
- Note the port (default
5432)
Connection details:
| Field | Value |
|---|---|
| Host | your-instance.xxxx.us-east-1.rds.amazonaws.com |
| Port | 5432 |
| Database | Your database name |
| SSL Mode | require |
Register via API:
curl -X POST https://api.autodb.app/api/v1/connections \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "name": "AWS RDS Production", "db_type": "postgresql_aws", "connection_string": "postgresql://autodb_user:YOUR_PASSWORD@your-instance.xxxx.us-east-1.rds.amazonaws.com:5432/mydb" }'Network access:
Your RDS security group must allow inbound connections on port 5432 from AutoDB’s IP address. If your instance is in a private subnet, you will need either:
- A publicly accessible endpoint with security group rules
- VPC peering or a bastion host
db_type: postgres_gcp
Google Cloud SQL for PostgreSQL requires either a public IP with authorized networks or the Cloud SQL Auth Proxy.
Find your credentials:
- Open the Cloud SQL console and select your instance
- Copy the Public IP address (or private IP if using VPC)
- Note the database name and user credentials
Connection details:
| Field | Value |
|---|---|
| Host | Public IP or private IP of your Cloud SQL instance |
| Port | 5432 |
| Database | Your database name |
| SSL Mode | require |
Register via API:
curl -X POST https://api.autodb.app/api/v1/connections \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "name": "GCP Cloud SQL", "db_type": "postgres_gcp", "connection_string": "postgresql://autodb_user:YOUR_PASSWORD@34.123.45.67:5432/mydb" }'Network access:
Add AutoDB’s IP address to your Cloud SQL instance’s Authorized Networks list:
- Go to Connections > Networking in the Cloud SQL console
- Under “Authorized networks”, click Add a network
- Enter AutoDB’s IP address and save
db_type: postgresql_local
For PostgreSQL instances you manage yourself — on-premise servers, Docker containers, or VMs.
Connection details:
| Field | Value |
|---|---|
| Host | Your server’s hostname or IP |
| Port | 5432 (or your custom port) |
| Database | Your database name |
| SSL Mode | disable for local dev, require for remote |
Register via API:
curl -X POST https://api.autodb.app/api/v1/connections \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "name": "Local Dev Database", "db_type": "postgresql_local", "connection_string": "postgresql://postgres:password@localhost:5432/mydb?sslmode=disable" }'Network access:
Ensure your pg_hba.conf allows connections from AutoDB’s IP address. For remote self-hosted instances, you may need to update listen_addresses in postgresql.conf to accept connections beyond localhost.
db_type: postgresql
For any PostgreSQL-compatible database not covered above — Neon, Railway, Render, CockroachDB (PostgreSQL wire protocol), TimescaleDB, etc.
Register via API:
curl -X POST https://api.autodb.app/api/v1/connections \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "name": "My Database", "db_type": "postgresql", "connection_string": "postgresql://user:password@host:5432/dbname" }'Use the connection string format provided by your database host. Set SSL mode to require for cloud-hosted databases.
SSL Modes
Section titled “SSL Modes”AutoDB supports three SSL modes:
| Mode | Behavior | Use when |
|---|---|---|
require | Encrypted connection required, server certificate not verified | Cloud-hosted databases (default) |
prefer | Uses SSL if available, falls back to unencrypted | Mixed environments |
disable | No encryption | Local development only |
The default SSL mode is require. You can override it by appending ?sslmode=disable or ?sslmode=prefer to your connection string, or by selecting the mode in the dashboard connection form.
Recommended Permissions
Section titled “Recommended Permissions”Create a dedicated PostgreSQL user for AutoDB with the minimum permissions needed:
-- Read-only access (introspection + query optimization)CREATE USER autodb_reader WITH PASSWORD 'secure_password';GRANT CONNECT ON DATABASE mydb TO autodb_reader;GRANT USAGE ON SCHEMA public TO autodb_reader;GRANT SELECT ON ALL TABLES IN SCHEMA public TO autodb_reader;ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO autodb_reader;
-- If you want AutoDB to execute migrations, add write access:GRANT CREATE ON SCHEMA public TO autodb_reader;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO autodb_reader;GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO autodb_reader;After Connecting
Section titled “After Connecting”Once your database is registered, run an introspection to index your schema:
curl -X POST https://api.autodb.app/api/v1/connections/CONNECTION_ID/introspect \ -H "X-API-Key: YOUR_API_KEY"This creates a schema snapshot that powers migration analysis, query optimization, and context retrieval. Re-run introspection after schema changes to keep AutoDB up to date.