Docs
GuidesExamplesWebsite GitHub
OverviewGetting Started
AgentConversationsConfigurationAuthenticationLLM ProvidersTools
Data SourcesSQLitePostgreSQLLocal WorkspaceCatalogQueryingPostgreSQL UpdatesRemote MCP ReadsPrivate Database
ArtifactsDurable JobsScheduled RoutinesInbox and Deliveries
MemorySemanticsSkillsReviewed Learning
Terminal and CLIObservation EventsError HandlingEvaluation
Daita / Docs
OverviewGetting Started
AgentConversationsConfigurationAuthenticationLLM ProvidersTools
Data SourcesSQLitePostgreSQLLocal WorkspaceCatalogQueryingPostgreSQL UpdatesRemote MCP ReadsPrivate Database
ArtifactsDurable JobsScheduled RoutinesInbox and Deliveries
MemorySemanticsSkillsReviewed Learning
Terminal and CLIObservation EventsError HandlingEvaluation

Daita agents / guide

Connect a private database

Reach a PostgreSQL database with no public endpoint through an outbound-only connector you run inside your network.

#What it is

A connector is a small container you run inside your network. It dials out to a Daita relay over TLS. Hosted organization agents then reach your database through that connection.

  • No inbound firewall rule and no IP allowlisting of Daita addresses.
  • The database's own TLS runs end to end. The tunnel carries opaque bytes, so the connector never sees database credentials. They stay in Daita's secret store.
  • Each connector belongs to exactly one organization.

Connector-backed connections work for hosted organization agents only. Ingestion pipelines, ingestion connection tests (probe) and schema refresh run outside the agent runtime and do not go through the connector yet.

#Requirements

  • Docker or any container runtime, on a host that can reach the database.
  • Outbound TLS (port 443) from that host to the relay host.
  • The connector is lightweight: a single small process with no local storage. Daita has not published CPU or memory sizing.
  • PostgreSQL is the only database wired up today. The tunnel itself carries any TCP, but nothing else is supported yet.
  • An organization owner or admin to set it up. Members can view connector status.

#Set up

  1. In the app, open the connection and choose Private network (connector). Only owners and admins can do this.
  2. Register a connector and copy the one-time token. It is shown once.
  3. Run the connector on a host inside your network:
bash
docker run -d --name daita-connector --restart unless-stopped \
  --env-file ./daita-connector.env \
  <CONNECTOR_IMAGE>   # placeholder: image and tag not yet decided
bash
# daita-connector.env  (keep out of version control)
DAITA_RELAY_URL=wss://<RELAY_HOST>   # placeholder: relay hostname not yet decided
DAITA_CONNECTOR_TOKEN=<token from step 2>
DAITA_CONNECTOR_ALLOW=db.internal.example.com:5432
  1. Set DAITA_CONNECTOR_ALLOW to the database host:port (see below).
  2. The connection card shows online once the connector's heartbeat arrives. A connector counts as online when it was seen within the last 45 seconds.

Optional: DAITA_HEARTBEAT_SECONDS (default 15). DAITA_CONNECTOR_CONFIG can name a JSON file with relay_url, token, allow and heartbeat_seconds; environment variables win.

#Allowlist

DAITA_CONNECTOR_ALLOW is a comma-separated list of exact host:port entries, for example db1.internal:5432,db2.internal:5432. Each entry must match, character for character, the host and port the connection uses. No wildcards, no CIDR ranges. Any other target is refused with connector_target_denied.

Routes are keyed by host:port: do not attach two connections with the same host and port to different connectors.

#Upgrades

Pull the new image tag and restart the container. The connector reports its version on every heartbeat, and the connection card shows it.

#Revoke or rotate a token

  • Revoke: the connector is disconnected at its next heartbeat, within about 15 seconds by default, and exits. Revoked connectors cannot be reattached to a connection.
  • Reissue: gives a new one-time token. The old token stops working at the next heartbeat. Update the env file with the new token and restart the connector.

If the token is rejected, the connector logs connector_unauthorized and exits with status 1. Other disconnects reconnect automatically with jittered backoff (up to 30 s).

#Troubleshooting

ErrorCauseFix
connector_offlineThe connector is not connected, its heartbeat is stale (over 45 s), or the relay is not configured for the environment.Check the container is running and can reach the relay on 443. Check its logs.
connector_target_deniedThe database host:port is not in DAITA_CONNECTOR_ALLOW.Add the exact host:port the connection uses and restart the connector.
connector_unauthorizedThe token is invalid, revoked or reissued, or the connector belongs to a different organization.Reissue the token, update the env file, restart.
connector_target_unreachableThe connector allows the target but could not open a TCP connection (10 s timeout).Check DNS, routing and firewall from the connector host to the database.

#Known limits

  • Hosted organization agents only (see the warning above).
  • Attaching or detaching a connector can take up to 30 seconds to take effect for a running agent.
  • All database sessions for one connector share a single connection to the relay, so a slow session can delay others on the same connector. Use one connector per heavy database if this matters.
  • Inside an agent's own tool loop the error text is generic. The specific connector_* code appears where Daita reports the connection error.

#Security notes

  • Tokens are stored hashed and shown once.
  • Do not log or commit the token. Use your secret store or an env file with restricted permissions.
  • The relay accepts runtime traffic only for the organization that owns the connector.
  • Keep database TLS on (verify-full is recommended). The tunnel never terminates it.
PreviousRemote MCP Reads
NextArtifacts

On this page

What it isRequirementsSet upAllowlistUpgradesRevoke or rotate a tokenTroubleshootingKnown limitsSecurity notes