# Credentials & security (/docs/guides/security)

How Dora stores connection credentials and AI keys, and how it secures private-network connections.

Dora is a local desktop app: your data and credentials stay on your machine and
go directly to your databases and chosen providers. There is no Dora server in
the middle.

## Connection credentials [#connection-credentials]

Saved connections are stored in a local SQLite database in your app data
directory. The connection details, including the password, are encrypted with
**AES-256-GCM** before they are written, using the same master key as the AI
provider keys below. Redis and Valkey connections are stored the same way.

<Callout type='info'>
	Treat connection strings as secrets: they often embed a username and password. Anyone with read
	access to an exported string can use it.
</Callout>

## AI provider keys [#ai-provider-keys]

API keys for the [AI assistant](/docs/guides/ai-assistant) are encrypted at rest
with **AES-256-GCM**. The master encryption key is generated on first run and
stored in your operating system keychain:

- **macOS**: Keychain,
- **Linux**: Secret Service (gnome-keyring / libsecret),
- **Windows**: Credential Manager.

It is never written to disk in plaintext. If no OS keychain is available, Dora
falls back to a local key file so the app still works, but the keychain is
preferred. You can also supply keys via environment variables instead of saving
them.

## Private-network databases [#private-network-databases]

To reach a database that is not exposed to the internet, use an
[SSH tunnel](/docs/connect#ssh-tunnels). Dora authenticates with a
private key file, a password, or your SSH agent (macOS and Linux), opens the tunnel before
connecting, and closes it on disconnect, so your database stays unexposed.

## Cloud provider tokens [#cloud-provider-tokens]

Account [integrations](/docs/connect#connect-from-a-provider-account)
(Supabase, Neon, Vercel, PlanetScale, Xata, Cloudflare, PostHog, Turso) store the
provider token in the same secure storage and use it only to list your databases
and build connections.
