Connections
Connections.
Seven engines, URLs, SSH tunnels, TLS, read-only and Prod tags, the connection test with its plain-language diagnosis, team workspaces and where passwords are kept.
Engines and defaults#
| Engine | Default port | URL schemes | Notes |
|---|---|---|---|
| PostgreSQL | 5432 | postgres://, postgresql:// | Default user postgres, default database postgres. |
| MySQL · MariaDB | 3306 | mysql://, mariadb:// | Default user root. The database is optional. |
| SQLite | a local file | Pick or create a file. No network, login or tunnel. | |
| ClickHouse | 8123 (HTTP) | clickhouse:// | Over HTTP or HTTPS. Default user default, database default. |
| DuckDB | local files | A .duckdb file (opened read-only) or data files. See the DuckDB page. | |
| Redis | 6379 | redis://, rediss:// (TLS) | Opens database index 0 unless you set another. |
| OpenSearch | 9200 | https://, http://, opensearch:// | HTTP or HTTPS. Default port 9200. |
Creating a connection#
New connection opens Add a connection: paste a URL or pick an engine. Inside the form, Import URL… (top right of the Connection card) fills the fields from a URL you paste and click Apply on. A saved connection can be copied with the copy-URL button, which never includes the password. The engine of a saved connection is fixed; to change it, delete and add again.
Connection URLs#
postgres://user:pass@host:5432/db?sslmode=verify-full
mysql://user:pass@host:3306/db?sslmode=verify-full
clickhouse://user:pass@host:8123/default
redis://user:pass@host:6379/0
rediss://user:pass@host:6380/0
https://user:pass@search.example.com:9200- A missing port becomes the engine’s default. The password may be in the URL (percent-encode special characters); it lands in the password field.
?sslmode=acceptsdisable,prefer,allow(treated asprefer),require,verify-caandverify-full. Anything else is an error.rediss://,https://and?ssl=trueturn TLS on withverify-fullunless a mode is given.- Postgres also reads
?dbname=, MySQL and ClickHouse?database=, Redis?db=, and all accept?user=and?password=when the URL has no userinfo.
The form, card by card#
| Card | What is in it |
|---|---|
| Connection | Name, Folder (optional) (connections are grouped by folder in the list), Environment (Local, Dev, Staging, Prod) and the Read-only switch. |
| Server | Host, Port, Database (Redis: DB index). For a file engine: Open… and (SQLite only) New…. |
| Authentication | User and Password (Redis: ACL user (optional)). OpenSearch adds a Method: username and password, API key, or AWS SigV4. |
| Security | The TLS mode (see below) and the CA certificate, Client certificate and Client key file pickers. |
| SSH tunnel | A switch, then the bastion host and how to log in. |
| Advanced | Safe mode, Always Safe Run writes and Run after connecting (SQL) (the last two for Postgres). |
Editing a saved connection never shows its password. The field reads “Saved — leave blank to keep”; type a new one to replace it.
Redis hosts: sockets, Sentinel, Cluster#
The Redis Host field accepts more than a name.
- A unix socket path (starts with
/orunix:): the port is ignored. sentinel://host1:26379,host2:26379/master-namecluster://host1:7000,host2:7001(seed nodes)
OpenSearch fields#
- Path prefix (optional) for a cluster behind a reverse proxy (for example
/search). - Additional nodes (optional), one per line, as
node2.example.com:9200orhttps://node3:9200. - Authentication methods: Username and password (leave both empty for an open cluster), API key (
id:keyor base64) and AWS SigV4 (Amazon OpenSearch) with region, service (Managed domain (es) or Serverless (aoss)), access key id, secret access key and an optional session token.
TLS and certificates#
The Security card has one mode selector. Its label is SSL mode for PostgreSQL and MySQL, TLS for Redis and HTTPS for ClickHouse and OpenSearch.
| Mode | Meaning |
|---|---|
| Disabled | No encryption. |
| Preferred | PostgreSQL only. Encrypt if the server supports it; the certificate is not checked. |
| Required (no verification) | Encrypted, but the server certificate is not checked. |
| Verify CA | The certificate must be signed by a trusted CA (the system trust store, or the CA file you choose). |
| Verify CA and host name | As Verify CA, and the certificate must name the host you typed. |
Pick CA certificate to trust a private CA, and Client certificate plus Client key for mutual TLS. A client certificate needs its key and the other way round.
SSH tunnels#
Switch on Connect over SSH tunnel in the SSH tunnel card to reach a database on a private network through a bastion host. Fill SSH host, SSH port (default 22) and SSH user, then give at least one way to log in:
- SSH private key: paste the key text (it takes priority over a password), with a Key passphrase if it has one;
- SSH key file: a path such as
~/.ssh/id_ed25519, used when no key is pasted; - Use the ssh-agent (SSH_AUTH_SOCK) (on Windows Plasma looks for Pageant or the OpenSSH pipe);
- SSH password.
Plasma tries every method you set. The first time it reaches a bastion it shows the host key’s SHA256 fingerprint and asks you to verify it with the server’s administrator: Trust and connect or Cancel. If a host you trusted before presents a different key, the dialog warns that the server may have been reinstalled or that someone is intercepting the connection, and the buttons become Cancel connection and Trust the new key.
Read-only, tags and the Prod gate#
These two settings are the first line of defence, and both live on the Connection card.
Read-only#
Read-only “refuses writes on every engine”. It is enforced as close to the engine as the engine allows: for PostgreSQL the session is set read-only and re-asserted before every statement, MySQL does the same, ClickHouse uses its readonly=1 mode, SQLite opens the file read-only, and DuckDB opens .duckdb files read-only. Redis and OpenSearch have no such switch, so Plasma classifies each command and request and refuses writes in the app itself. Grid edits and the write buttons are also disabled. A statement cannot undo it: SQL that tries to switch read-only off is refused.
Environment tags and Prod#
Tag a connection Local, Dev, Staging or Prod. Each has a colour that the connection capsule shows, so you always see where you are. Choosing Prod also ticks Read-only (you can untick it). What Prod changes:
- the connection capsule in the top bar turns red;
- destructive SQL always asks first, whatever the Safe mode level;
- every statement run on it is written to the audit log;
- Always Safe Run writes is on by default on Postgres;
- every write from the Redis CLI and from OpenSearch asks first;
- the AI assistant sends the schema only after you opt in for that connection (see what is sent);
- unverified TLS modes are not allowed.
Safe mode per connection#
Advanced → Safe mode overrides the app-wide default for this one connection. The levels are described on Safety and privacy.
Test, errors and diagnosis#
Test shows the steps it went through, in order: Open the SSH tunnel (when one is set), Find the host, Reach the port, Set up TLS, Log in, and last Open the database (Redis: Select the database; OpenSearch: Check the cluster; a file: Open the file). It stops at the first step that fails and marks the rest as skipped. Each step shows how long it took.
A failure is turned into a title, a short explanation and the likely fixes, with the offending field highlighted. A Copy the error details button copies the diagnosis; secrets are removed from it first. These are the problems Plasma recognises:
| Area | Messages you may see |
|---|---|
| Network | Host not found; The name server did not answer; Nothing is listening there; The server did not answer; No route to the server; That does not look like <engine> |
| TLS | The server requires TLS; The server does not support TLS; The server’s certificate is not trusted; The certificate is for a different host name; The server’s certificate has expired; The TLS handshake failed |
| Login | No password was sent; Login was refused; The login method is not supported; The server does not allow this login from here |
| Database | Database not found; No permission to open this database; The server has no free connections; The server is not ready yet |
| Redis | This Redis needs a password; Redis refused the login; This Redis user lacks permissions; No such Redis database; Redis closed the connection |
| OpenSearch | OpenSearch refused the login (401); This user may not use the cluster (403); The cluster is not ready (503); The cluster is red |
| SSH | The SSH host key was not accepted; SSH login failed; The SSH key could not be used; The SSH host could not be reached; The SSH host did not answer; The jump host could not reach the database |
| Files | File not found; That is not a SQLite (or DuckDB) database; The file cannot be opened |
Anything else is shown as Could not connect with the server’s own message.
Saved connections#
- The list is searchable (Search connections…) and grouped by Folder. In the editor, Duplicate copies a connection and Delete asks Delete connection? first.
- On the Connections home each card has Edit, Duplicate and Allow AI tools…, the last of which opens Settings at the MCP server section.
- The switcher in the top bar changes connection (or database) from anywhere, and holds Reconnect to …, Disconnect from … and New connection…. Disconnecting with staged grid edits asks first.
- Settings → General can reconnect to your last connection on launch and retry automatically after a lost connection (see Reconnecting).
Where passwords are stored#
Database passwords, SSH passwords and keys, OpenSearch keys and your AI API key are encrypted with the operating system’s secret store (macOS Keychain, Windows Credential Vault, or GNOME Keyring or KWallet on Linux) and stored as ciphertext in Plasma’s local database. The renderer process never receives a saved password back. If the system has no working secret store, Plasma refuses to save connections rather than store a password in the clear. More on Safety and privacy.
Team workspaces#
A workspace is a folder you can commit to git. It holds a .plasma/ directory with shared connection profiles, saved queries, snippets and notebooks. Open one with Open workspace folder… (File menu, the Connections home, or the command palette), or with plasma open <folder>. The home also lists Recent workspaces, each with a forget button, and a workspace section in the sidebar has a close button.
| Path | Holds |
|---|---|
.plasma/connections.json | Connection profiles. Never a password. |
.plasma/queries/**/*.sql | Saved queries; folders are groups. A short comment header stores the name, description, connection and variables. |
.plasma/snippets.json | Editor snippets. |
.plasma/notebooks/*.plasma-notebook.json | Notebooks. |
Files are written in a fixed, sorted order with no timestamps, so saving an unchanged item produces an identical file and a diff shows only real edits.
Profiles, environment variables and passwords#
A profile has an id, name, engine, host, port, database, user, TLS settings, read-only flag, tag, folder and optional start-up SQL. A profile that contains a password key is skipped with a message. Text fields may use ${NAME} or ${NAME:-default}, replaced from the environment Plasma runs in (nothing else is read, and a missing variable without a default is an error); write $$ for a literal dollar sign.
{
"version": 1,
"connections": [
{
"id": "shop-staging",
"name": "Shop (staging)",
"engine": "postgres",
"tag": "staging",
"host": "${SHOP_DB_HOST}",
"port": 5432,
"database": "shop",
"user": "${SHOP_DB_USER:-app}",
"tlsMode": "verify-full",
"readOnly": true
}
]
}The first time you use a profile, Plasma asks for its password (“Leave empty to connect without a password”). It is kept in your OS keychain for that workspace and is never written to the folder.
Saving queries to the workspace#
Save current query to workspace (in the workspace section) asks for a Name, an optional Folder and a Description. Pressing Save on a tab that came from the workspace writes back to its file. If the file changed on disk meanwhile (a teammate, git or another editor), Plasma asks before it overwrites: File changed on disk, Overwrite. Opening a workspace notebook over a notebook draft you already have asks Replace your notebook?.
Limits#
A workspace is read up to 2,000 files, and a single file larger than 1 MiB is ignored, so a huge repository cannot stall the app.