Export & import connections

functional

Move servers, databases, and logins - with or without passwords - plus label colors and icons to another machine in one file, picking exactly what to include.

A connection file moves a whole working setup between machines or teammates in one step: servers, the databases on them, the logins to use, and, if you choose, their passwords, together with the client, project, and environment labels those connections belong to, including each label's color and icon. Both exports write the same file; the only difference is whether passwords are in it. Export one from SQLly, or write one by hand to provision a team, and import it on any copy of SQLly.

A file with passwords holds them in clear text. That is what makes it useful, and what makes it sensitive. SQLly saves an exported file readable only by you, moves every password into your system keychain on import, and never keeps a copy of the file. Send it over a channel you trust, and delete it once it has been imported. To share connections without passwords, use File → Export Connections….

Export connections

Choose File → Export Connections… for a file with no passwords, or File → Export Conn w/ Creds… for one with them (both are in the command palette too). Either opens a picker that shows every saved connection as a tree: each server (host, port, and engine) with the databases you have saved on it underneath. Export Conn w/ Creds opens with a warning at the top that the file will contain passwords in clear text.

  • Pick any or all servers - tick a server to take every database under it, or tick it again to clear them.
  • Pick any or all databases - expand a server and tick individual databases; the server row shows how many of its databases are selected.
  • Select all / Clear toggles everything at once. Everything starts selected.
  • Only what you picked comes along - the shared logins, tunnel profiles, and client, project, and environment labels the chosen connections use are included, and nothing else.

Click Export and choose where to save. Every setting the connection editor offers comes along either way, including each connection's sign-in method. With credentials, SQLly reads each password, passphrase, and token back out of your keychain into the file; without them, every secret is left out and SQLly checks the file holds none before saving it. A login used by several of the exported connections is written once as a shared login; a login used by one connection is written on that connection. Label icons are embedded in the file, so it is complete on its own.

SQLly
SQLLY Export Connections dialog with the choice to include passwords and the destination fileSQLLY Export Connections dialog with the choice to include passwords and the destination file
The Export Connections dialog: choose whether passwords are included, then pick the file.

Import connections

Choose File → Import Connections… and pick the file. The same command reads a file with or without passwords, and files saved by Export Connections in earlier versions of SQLly. Before changing anything it checks the whole file and, if any entry is wrong, lists every problem and imports nothing, so a half-applied import can't happen. A mistyped setting name is reported rather than silently skipped. The imported connections appear in the server explorer straight away.

  • Passwords go to your keychain - Keychain on macOS, Credential Manager on Windows, Secret Service on Linux - never into SQLly's saved connections file. The status bar says how many came in.
  • Labels merge by name - an existing client, project, or environment keeps anything the file doesn't set, and only the safety switches the file lists change.
  • Shared logins update in place - a saved login with the same name and user name gets the new password, so every connection already using it keeps working.
  • No password, no problem - a login without one (every login, in a file exported without credentials) is imported anyway, and SQLly asks for the password the first time you connect.

Importing from Redis Insight

In Redis Insight, select your databases and choose Export (tick Include passwords if you want them carried over). In SQLly choose Import From Other Tools… and pick the exported file, plain JSON or the base64 form Redis Insight also accepts. Each database becomes a Redis connection with its host, port, logical database, ACL user name, SSH tunnel and TLS settings.

  • TLS is never dropped - a database exported with TLS (or with a CA or client certificate) imports encrypted: Verify CA when Redis Insight verified the server certificate, Require when it did not. Certificate and key bodies are saved as PEM files in SQLly's data folder (keys readable only by you), and the connection points at them.
  • Secrets go to your keychain - passwords, SSH passwords and key passphrases from the export are stored exactly like a connection file's, never in the saved connections file. Delete the export afterwards: it holds them in clear text.
  • Azure Entra databases import with Microsoft Entra sign-in; pick the Azure account in the connection editor.
  • Cluster databases import as Redis Cluster connections seeded with the node they name (or as one node when Redis Insight was told to force standalone); Sentinel databases import as Sentinel connections with the master group, the sentinel's password (moved to the keychain) and the master's own sign-in, and the status bar lists anything that could not come over.

What a connection file can hold

SectionWhat it carries
ConnectionsAny number of servers and any number of databases on each: engine, host, port, database, environment, client and project, sign-in method and (with credentials) password, TLS mode and certificate files, connect and statement timeouts, application name, startup SQL, per-connection safety switches, favorite star, masking rules, relay route, and an inline SSH tunnel, proxy, or Kubernetes port-forward.
Shared loginsSeveral named logins (user name, plus the password in a file with credentials) that many connections can use.
Tunnel profilesNamed SSH (with jump host), proxy, and Kubernetes chains, plus SSH passwords and key passphrases in a file with credentials.
Clients, projects, environmentsName, color, icon image (embedded in the file), and any of the query protections.

Every sign-in method SQLly supports can be described: user name and password, Windows integrated security, Microsoft Entra (browser or device code), AWS RDS IAM, Google Cloud SQL IAM, and libSQL / Turso tokens. SQLite and DuckDB files need no sign-in.

Writing one by hand

A connection file is plain JSON, so an admin can write one to hand a team a ready-made setup. Only a connection's name, engine, and server are required - everything else falls back to the same default the connection editor uses. This file adds two databases on one server that share a read-only login, a second server with its own password, and a colored client with an icon:

{
  "format": "sqlly-credentials",
  "version": 1,
  "clients": [
    { "name": "Acme", "color": "#1E88E5", "image": "data:image/png;base64,iVBORw0KGgo…" }
  ],
  "sql_auth_accounts": [
    { "name": "Reader", "username": "ro", "password": "ro-secret" }
  ],
  "connections": [
    { "name": "Sales", "engine": "postgresql", "server": "pg1.acme.internal", "database": "sales",
      "client": "Acme", "environment": "production",
      "authentication": { "type": "sql-login", "account": "Reader" },
      "tls": { "mode": "verify-full" } },
    { "name": "HR", "engine": "postgresql", "server": "pg1.acme.internal", "database": "hr",
      "client": "Acme", "authentication": { "type": "sql-login", "account": "Reader" } },
    { "name": "Ops", "engine": "sql-server", "server": "sql01.acme.internal", "database": "ops",
      "authentication": { "type": "sql-login", "username": "ops", "password": "ops-secret" } }
  ]
}
  • Engines can be written loosely - postgres, PostgreSQL, mssql, sql-server, mysql, sqlite, duckdb, clickhouse, redis, and so on.
  • Colors are #RGB, #RRGGBB, or #RRGGBBAA.
  • Icons are base64 - a data:image/…;base64, URI or the bare base64 - of a PNG, JPEG, GIF, WebP, BMP, ICO, or SVG image up to 1 MB.
  • Environments are local, dev, test, staging, or production.

Preconfigured connections (Docker, Kubernetes, managed machines)

Instead of importing a file once, you can have SQLly provision connections every time it starts - in the desktop app, in the sqlly-cli agent commands, and in a self-hosted sqlly-bridge embedded server. Point SQLLY_PROVISIONED_CONNECTIONS_FILE at a file (or put provisioned-connections.json in SQLly's settings folder, beside connections.json), and/or set one SQLLY_CONNECTION_<NAME> variable per connection holding its URL. The file uses the connection-file format above (format and version may be left out, and only connections is read), and any connection can give a url instead of its engine, server, port, database, and sign-in fields:

{
  "connections": [
    { "name": "Cache",
      "url": "redis+sentinel://app:${REDIS_PASSWORD}@sentinel-0:26379,sentinel-1:26379/mymaster/0?sentinelPassword=${SENTINEL_PASSWORD}",
      "environment": "production" },
    { "name": "Orders", "engine": "postgres", "server": "${PGHOST}", "database": "orders",
      "authentication": { "type": "sql-login", "username": "app", "password": "${PGPASSWORD}" },
      "tls": { "mode": "verify-full" } }
  ]
}
# docker run / Kubernetes env
SQLLY_PROVISIONED_CONNECTIONS_FILE=/etc/sqlly/connections.json
REDIS_PASSWORD=...        # from a Secret
SENTINEL_PASSWORD=...
SQLLY_CONNECTION_SESSIONS=rediss+sentinel://:${REDIS_PASSWORD}@sentinel-0,sentinel-1/sessions
  • Sentinel URLs - redis+sentinel://[user:password@]host1:26379,host2:26379/<master-name>[/<db>], with rediss+sentinel:// for TLS and valkey+sentinel:// / valkeys+sentinel:// for Valkey. ?sentinelPassword= sets the sentinels' own password and ?preferReplica=true sends read-only scripts to a replica. Sentinels without a port use 26379. The same URLs work in the connection editor's Paste URL.
  • ${VARIABLE} anywhere in the file (or in a SQLLY_CONNECTION_ URL) is replaced by that environment variable; write $${ for a literal ${.
  • Passwords stay out of files - a password, token, redis_sentinel_password, URL password, or sentinelPassword written as exactly ${VARIABLE} is read from the environment each time SQLly connects, and is never copied into a profile or saved anywhere.
  • Managed, read-only - provisioned connections appear alongside your own but are never written to connections.json, and Save and Delete are refused for them: change the file or variables instead, or use Duplicate to make your own editable copy.
  • One bad entry never blocks the rest - an unknown setting, an unset variable, or an unreadable URL skips just that connection and prints a warning saying which one and why; a later connection with a name already used is skipped the same way.
  • On the bridge - sqlly-bridge embedded serves them as the read-only profile provisioned (also via --provisioned-connections <file>); launch tokens can name it like any other profile, and it is never written to the state directory.