diff --git a/connections/connection-form.mdx b/connections/connection-form.mdx
index 226d2ff0..b16a2a02 100644
--- a/connections/connection-form.mdx
+++ b/connections/connection-form.mdx
@@ -204,7 +204,7 @@ A connect you did not start never runs the script. A restored window at launch,
| **Query Timeout** | Override of **Settings > Connections** for this connection. Empty inherits the global value, which the empty field shows, such as **Global (60)**, or **No limit**; `0` means no limit. Only drivers that support query timeouts enforce it |
| **Large Value Limit** | PostgreSQL, MySQL, MariaDB and SQLite. A text, JSON or binary value above this many KB loads when you open, copy or export it. Empty uses 64; valid values are 1 to 1048576. See [Large values](/features/data-grid#large-values) |
| **Identifier Case** | PostgreSQL, PGlite, Oracle and Snowflake. The case table, column and schema names take in autocomplete and in **Copy as INSERT Statements** and **Copy as UPDATE Statements**. See [Identifier case](/features/autocomplete#identifier-case) |
-| **Local Only** | Under **iCloud Sync**. Keeps this connection and its passwords off iCloud. Saving an existing synced connection as Local Only removes its passwords from iCloud Keychain, so your other devices ask for them again. Shown while **Sync this Mac with iCloud** is on. See [iCloud Sync](/features/icloud-sync#keeping-a-connection-off-icloud) |
+| **Local Only** | Under **iCloud Sync** or **TablePro Sync**, whichever this Mac syncs with, and hidden while sync is off. Keeps this connection and its passwords on this Mac. On iCloud, saving an existing synced connection as Local Only removes its passwords from iCloud Keychain, so your other devices ask for them again. See [iCloud Sync](/features/icloud-sync#keeping-a-connection-off-icloud) |
The connect timeout is one deadline for the whole network attempt, not a new timeout for each step.
It includes the selected SSH tunnel or proxy, TCP, TLS and database authentication. Local SQLite and
diff --git a/connections/credential-profiles.mdx b/connections/credential-profiles.mdx
index f08f52c0..de408fd4 100644
--- a/connections/credential-profiles.mdx
+++ b/connections/credential-profiles.mdx
@@ -96,6 +96,8 @@ Click the info button on a row in **Settings > Profiles** to edit it, or right-c
An exported connection carries its profile by name, alongside the name, the username and where the password comes from. Importing on a Mac that has no profile of that name creates one set to **Ask Every Time**, whatever source the file names, `~/.pgpass` included. To read your own `~/.pgpass`, switch its source in **Settings > Profiles**. A profile already there is left as it is and the connection links to it. The password never travels, and a profile reading its password from a file or a command exports as one that asks.
-With [iCloud Sync](/features/icloud-sync) on, **Credential Profiles** under **What Syncs** in **Settings > iCloud Sync** carries profiles between your Macs: the name, the username, and where the password comes from. The password and any additional secrets stay in the Keychain. They cross only while **Passwords** is on in the same pane, and only when saved after it was turned on. A profile set to **Password Source** arrives as **Ask Every Time**, and a source set on the second Mac stays on that Mac.
+With [iCloud Sync](/features/icloud-sync) on, **Credential Profiles** under **What Syncs** in **Settings > Sync** carries profiles between your Macs: the name, the username, and where the password comes from. The password and any additional secrets stay in the Keychain. They cross only while **Passwords** is on in the same pane, and only when saved after it was turned on. A profile set to **Password Source** arrives as **Ask Every Time**, and a source set on the second Mac stays on that Mac. Which connections use a profile is kept on each Mac, so pick the profile in **Credentials** again on the second one.
-Which connections use a profile is kept on each Mac, so pick the profile in **Credentials** again on the second one. A profile arriving under a name already taken gets a number after it, such as `prod (2)`. Deleting a profile deletes it on your other Macs too.
+On [TablePro Sync](/features/sync#passwords), the password goes too while **Passwords** is on, end-to-end encrypted, saved ones included. Additional secrets stay on each Mac. Which profile a connection uses goes with the connection.
+
+A new profile, a change to its username or to where its password comes from, and a connection moved to another profile [wait for your approval](/features/sync#changes-that-wait-for-your-approval) on each Mac. Two profiles made under one name on two Macs both survive the sync: one keeps the name and the other gets a number after it, such as `prod (2)`, the same on every Mac. Deleting a profile deletes it on your other Macs too.
diff --git a/connections/ssh-profiles.mdx b/connections/ssh-profiles.mdx
index e638d46e..8205d86b 100644
--- a/connections/ssh-profiles.mdx
+++ b/connections/ssh-profiles.mdx
@@ -38,8 +38,12 @@ One bastion, many connections. A profile holds the server (host, port, username)
Deleting a profile hands its configuration and its secrets to each connection that used it, as that connection's own inline tunnel. Nothing stops connecting, and the tunnel is now editable per connection on its **SSH & Proxies** pane.
-## iCloud Sync
+## Sync
-Profiles sync across Macs with iCloud Sync on and **SSH Profiles** on under **What Syncs** in **Settings > iCloud Sync**. Passwords, key passphrases, and TOTP secrets stay in the local Keychain unless **Passwords** is on too, and that covers newly saved credentials only: re-save an existing password to include it.
+Profiles sync across Macs with **SSH Profiles** on under **What Syncs** in **Settings > Sync**, on iCloud or TablePro Sync. A new profile, and a changed server, user, authentication method, key path or jump host, [wait for your approval](/features/sync#changes-that-wait-for-your-approval) on each Mac.
+
+On iCloud, passwords, key passphrases, and TOTP secrets stay in the local Keychain unless **Passwords** is on too, and that covers newly saved credentials only: re-save an existing password to include it. On TablePro Sync they go end-to-end encrypted while its own **Passwords** switch is on, saved ones included; see [Passwords](/features/sync#passwords).
+
+Two profiles made under one name on two Macs both survive the sync. One keeps the name and the other becomes `Name (2)`, the same on every Mac.
On [iPhone and iPad](/ios#ssh-profiles), a connection that uses a profile keeps the profile's server and jump hosts read only and signs in with the profile's password once it reaches iCloud Keychain. Turning **SSH Tunnel** off there unlinks the profile from that connection on every device.
diff --git a/customization/settings.mdx b/customization/settings.mdx
index 08cfd4a2..b6941b81 100644
--- a/customization/settings.mdx
+++ b/customization/settings.mdx
@@ -40,7 +40,7 @@ A link can open any pane or page directly: see [Open a settings pane](/developer
Providers, inline suggestions, context, slash commands, default AI policy.
MCP server, approvals, tokens, clients, outside servers.
Modules, drivers and formats.
- iCloud sync and what it carries.
+ iCloud or TablePro Sync, moving between them, and what each carries.
Sign-in, plan, devices, teams, offline file and license key.
@@ -131,11 +131,11 @@ What a fresh install ships with, so one glance down this column says what you ch
| Extensions | Routine Debugger | Off |
| Extensions | Live Messages | Off |
| Extensions | Compare & Sync | Off. On for a Mac that ran an earlier version |
-| iCloud Sync | Sync this Mac with iCloud | Off |
-| iCloud Sync | Passwords | Off |
+| Sync | Sync this Mac with | Off |
+| Sync | Passwords | Off for iCloud, on for TablePro Sync |
Keyboard, Profiles and Account are not in the table. Stock keyboard chords are on [Keyboard Shortcuts](/features/keyboard-shortcuts), and Profiles and Account hold no value of their own.
## Where settings live
-The file is `~/Library/Preferences/com.TablePro.plist`. **Reset…** beside **Reset all settings** on the General pane puts every pane back to its stock value after a confirmation, and turns iCloud sync off, password sync included. Each module goes back to the default it had on that Mac. Saved connections, AI providers with their API keys, the **Enable AI features** switch, **Share usage data**, linked folders, trusted links, query history, and MCP tokens survive it.
+The file is `~/Library/Preferences/com.TablePro.plist`. **Reset…** beside **Reset all settings** on the General pane puts every pane back to its stock value after a confirmation, and turns sync off, password sync included. Each module goes back to the default it had on that Mac. Saved connections, AI providers with their API keys, the **Enable AI features** switch, **Share usage data**, linked folders, trusted links, query history, and MCP tokens survive it.
diff --git a/docs.json b/docs.json
index 2006c14e..a7195f72 100644
--- a/docs.json
+++ b/docs.json
@@ -394,6 +394,7 @@
"group": "Sync and licensing",
"icon": "arrows-rotate",
"pages": [
+ "features/sync",
"features/icloud-sync",
"features/handoff",
"features/licensing",
@@ -413,6 +414,7 @@
"self-hosted/aws",
"self-hosted/sign-in",
"self-hosted/roles",
+ "self-hosted/sync",
"self-hosted/operations",
"self-hosted/releases"
]
diff --git a/faq.mdx b/faq.mdx
index abdf7e5c..b1d2ab64 100644
--- a/faq.mdx
+++ b/faq.mdx
@@ -84,7 +84,7 @@ Connecting, browsing, and querying need nothing but the database. What does need
-Through iCloud, with a Pro or Team plan. Sync is off by default and each category has its own toggle: connections, groups and tags, SSH and credential profiles, saved queries, table and database favorites, table folders, and settings. Passwords are a separate opt-in that rides iCloud Keychain, and a connection can be marked **Local Only** to stay off iCloud. See [iCloud Sync](/features/icloud-sync).
+Through iCloud or TablePro Sync, with a paid plan; pick one under **Settings > Sync**, which starts off. Each category has its own toggle, passwords included, and a connection can be marked **Local Only** to stay on one Mac. [Sync](/features/sync) lists what TablePro Sync carries, and [iCloud Sync](/features/icloud-sync) what iCloud carries.
diff --git a/features/company-server.mdx b/features/company-server.mdx
index bb0b0ace..4fcc2ba5 100644
--- a/features/company-server.mdx
+++ b/features/company-server.mdx
@@ -3,7 +3,7 @@ title: Company server
description: Sign the Mac in to your organization's own TablePro server instead of tablepro.app, and set that server, sync, usage data and the plugin registry for every Mac with a configuration profile
---
-An organization on [Enterprise Self-Hosted](/features/licensing#enterprise-self-hosted) runs its own [TablePro server](/self-hosted). People sign in to it with the company's identity provider, and Team Library syncs through it instead of tablepro.app.
+An organization on [Enterprise Self-Hosted](/features/licensing#enterprise-self-hosted) runs its own [TablePro server](/self-hosted). People sign in to it with the company's identity provider, and Team Library and [TablePro Sync](/features/sync) go through it instead of tablepro.app.
## Sign in to a company server
@@ -47,7 +47,8 @@ Signing in to a company server signs the Mac out of the server it used before, a
- **Shared links** are a tablepro.app service. Signed in to a company server, **File > Share Query…**, **Share Result…**, **Manage Shared Links…** and every **Share…** item are hidden. A link someone sends still opens, unless your organization sets `AllowOtherAccountServers` to `false`.
- **Plans and billing** belong to your organization. Gates name the feature and point to your administrator instead of a purchase, and **Settings > Account** has no **Upgrade…**, **Billing…**, **Use License Key…** or offline file.
- **Devices** have no 3-device limit. Every seat includes Pro.
-- **After the license expires**, everything keeps working through its grace, which **Settings > Account** shows under **License**. After that, only Team Library keeps working: it still pulls, the server refuses changes, and changes you publish wait on the Mac and go out once the license is renewed.
+- **TablePro Sync** keeps your own data on your organization's server, as [Personal sync and Team Library](/self-hosted/sync) describes. Your administrator can keep passwords, query history or all of it off the server.
+- **After the license expires**, everything keeps working through its grace, which **Settings > Account** shows under **License**. After that, Team Library and TablePro Sync only download: the server refuses your changes, which wait on the Mac and go out once the license is renewed. Signing out and approving or removing devices still work.
## Set the server for every Mac
@@ -57,13 +58,13 @@ An administrator sets these keys with a configuration profile for the `com.Table
|---|---|---|
| `com.TablePro.policy.AccountServerURL` | String | The company server's address. The Mac signs in to it unless the person picks another, and **Settings > Account** says your organization manages it |
| `com.TablePro.policy.AllowOtherAccountServers` | Boolean | `false`, with `AccountServerURL` set, hides tablepro.app and **Use a Company Server…**, so the Mac signs in only to the managed server. It also keeps the Mac off tablepro.app: a shared link from tablepro.app does not open, and the AI model list stops refreshing, so the list the app shipped with, or the last one it kept, stays in use. On its own it is ignored |
-| `com.TablePro.policy.PersonalSyncProvider` | Array of strings | Where the Mac may sync your own data: `off`, `icloud` or `tablepro-sync`, spelled exactly. One entry sets it and locks **Settings > iCloud Sync**. Several let the person pick among them. An empty array turns sync off and locks it. An entry this version does not offer is left out: the Mac offers `off` and `icloud` today, so a list without `icloud` turns iCloud sync off, and a list whose only Mac entry is `icloud` turns it on. Team Library is not affected |
-| `com.TablePro.policy.ICloudSyncAllowed` | Boolean | `false` turns iCloud sync off and locks **Settings > iCloud Sync**. Passwords saved from then on stay on this Mac. Passwords already in iCloud Keychain stay there and still work, and the data already in iCloud stays |
+| `com.TablePro.policy.PersonalSyncProvider` | Array of strings | Where the Mac may sync your own data: `off`, `icloud` or `tablepro-sync`, spelled exactly. One entry sets it and locks **Sync this Mac with** under **Settings > Sync**. Several let the person pick among them. An empty array turns sync off and locks it. A required TablePro Sync waits for the person to review the first upload, and a required iCloud on a Mac already on TablePro Sync waits for them to review the move back. A required iCloud on a Mac with sync off starts at once. A release without TablePro Sync leaves `tablepro-sync` out of the list. Team Library is not affected |
+| `com.TablePro.policy.ICloudSyncAllowed` | Boolean | `false` turns iCloud sync off and takes **iCloud** out of **Sync this Mac with**. Passwords saved from then on stay on this Mac. Passwords already in iCloud Keychain stay there and still work, and the data already in iCloud stays |
| `com.TablePro.policy.UsageDataAllowed` | Boolean | `false` turns **Settings > General > Privacy > Share usage data** off and locks it |
| `com.TablePro.policy.PluginCatalogAllowed` | Boolean | `false` stops the plugin registry: no plugin is downloaded, installed or updated from it. Plugins already installed keep loading. A connection whose plugin is not installed says your organization manages plugins, so install the plugins people need before you set the key |
-TablePro reads the profile at launch and again when macOS installs or removes one. When iCloud stops being allowed, sync stops at once and stays off after the profile goes; the person turns it on again in **Settings > iCloud Sync**. When the new values no longer allow the server the Mac is signed in to, TablePro stops calling that server until it is relaunched.
+TablePro reads the profile at launch and again when macOS installs or removes one. When iCloud stops being allowed, sync stops at once and stays off after the profile goes; the person chooses it again in **Settings > Sync**. When the new values no longer allow the server the Mac is signed in to, TablePro stops calling that server until it is relaunched.
Software updates have keys of their own: [Managed updates](/security/managed-updates). **Check for Updates…** still reads the update feed when a person picks it.
diff --git a/features/icloud-sync.mdx b/features/icloud-sync.mdx
index f4f7ef61..19afaeb0 100644
--- a/features/icloud-sync.mdx
+++ b/features/icloud-sync.mdx
@@ -5,11 +5,11 @@ description: Sync connections, groups, tags, and saved queries to your Macs, iPh
import LocalCredentialConsent from "/snippets/local-credential-consent.mdx";
-Sync needs a Pro or Team [plan](/features/licensing) and starts off. Press `Cmd+,`, open **Settings > iCloud Sync**, turn on **Sync this Mac with iCloud**, pick what to sync under **What Syncs**, and click **Sync Now**. The iPhone and iPad app shares the same CloudKit data but carries connections, groups, tags, and saved queries only.
+Sync needs a Pro or Team [plan](/features/licensing) and starts off. Press `Cmd+,`, open **Settings > Sync**, choose **iCloud** under **Sync this Mac with**, pick what to sync under **What Syncs**, and click **Sync Now**. Without a plan, choosing **iCloud** opens a dialog to sign in or buy one, and the menu stays where it was. The iPhone and iPad app shares the same CloudKit data but carries connections, groups, tags, and saved queries only. [Sync](/features/sync) covers the other provider, TablePro Sync, and moving between the two.
-
-
-
+
+
+
## What syncs
@@ -53,13 +53,15 @@ What belongs to the connection stays on this Mac with it: its table and database
## Checking that it worked
-**Status**, under the switch, reads **Up to Date** after a clean run. **Last synced** is the last run that both sent this Mac's changes and brought the other devices' in, so it stops moving while uploads fail even though downloads keep arriving.
+**Status**, under the menu, reads **Up to Date** after a clean run. **Last synced** is the last run that both sent this Mac's changes and brought the other devices' in, so it stops moving while uploads fail even though downloads keep arriving.
+
+A new connection from another device, or a change there that moves where a connection signs in or loosens a protection, waits for you instead, and **Status** counts it. See [Changes that wait for your approval](/features/sync#changes-that-wait-for-your-approval).
When the same connection changed on two devices, TablePro merges field by field, so a name edited on one Mac and a port edited on the other both survive. When one field changed in both places, the device that syncs last wins.
## Troubleshooting
-A condition that a retry cannot clear shows as a notice at the top of **Settings > iCloud Sync**, with the action that clears it. Its title also shows as a link on the welcome window that opens the pane, except **iCloud Is Not Ready**, which clears by itself. While it lasts, edits stop going up on every change: they wait on this Mac, and nothing local is deleted.
+A condition that a retry cannot clear shows as a notice at the top of **Settings > Sync**, with the action that clears it. Its title also shows as a link on the welcome window that opens the pane, except **iCloud Is Not Ready**, which clears by itself. While it lasts, edits stop going up on every change: they wait on this Mac, and nothing local is deleted.
### iCloud Storage Is Full
@@ -99,8 +101,8 @@ iCloud refused the changes counted under **Status** and accepted the rest. The r
### Other cases
-Signing in to a different iCloud account starts sync over for that account: the next sync is a full fetch rather than a delta, and changes waiting on this Mac go to the new account. Expect the first sync to take longer.
+Signing in to a different Apple Account stops uploads until you choose between **Move My Data** and **Start Empty**; see [Signed in to another account](/features/sync#signed-in-to-another-account). Expect the first sync after that to take longer: it is a full fetch rather than a delta.
-When your plan ends, sync stops and local data stays where it is. The row under the switch says **iCloud Sync needs a paid plan** and offers **Upgrade Plan**. The switch still turns sync off, and dims once it is off.
+When your plan ends, sync stops and local data stays where it is. The row under the menu says **iCloud Sync needs a paid plan** and offers **Upgrade Plan**. **Off** in the menu still turns sync off, and choosing **iCloud** again asks for a plan.
-A plan this Mac could not verify pauses sync the same way. The row under the switch says **Your plan could not be verified** and offers **Try Again**, which opens **Settings > Account** and checks again. A check that fails says why in the row.
+A plan this Mac could not verify pauses sync the same way. The row under the menu says **Your plan could not be verified** and offers **Try Again**, which opens **Settings > Account** and checks again. A check that fails says why in the row.
diff --git a/features/licensing.mdx b/features/licensing.mdx
index 2a2759bc..42c4ad04 100644
--- a/features/licensing.mdx
+++ b/features/licensing.mdx
@@ -22,7 +22,7 @@ If your company needs central control over TablePro, write to [hello@tablepro.ap
### Enterprise Self-Hosted
-Run the TablePro sync server on your own infrastructure, as an OCI image with PostgreSQL. People sign in through your identity provider with OIDC or SAML 2.0. The preview syncs Team Library, with team roles and an audit log. Syncing query history, settings and connections through the server, with passwords end-to-end encrypted, is coming and is not in the preview. Every seat includes Pro.
+Run the TablePro sync server on your own infrastructure, as an OCI image with PostgreSQL. People sign in through your identity provider with OIDC or SAML 2.0. The preview syncs Team Library, with team roles and an audit log, and from server 0.3.0 each person's [TablePro Sync](/self-hosted/sync): connections, settings and query history, with passwords end-to-end encrypted. Every seat includes Pro.
It is a preview, on macOS first, and the other apps follow. [Self-hosted server](/self-hosted) covers installing and running it. For a free 30-day evaluation, write to [hello@tablepro.app](mailto:hello@tablepro.app) with the subject "TablePro Enterprise Self-Hosted".
@@ -52,7 +52,8 @@ Team and Enterprise Self-Hosted include everything in Pro. A seat on a team give
| Feature | Required plan | Without the plan |
|---------|---------------|-------------------|
-| [iCloud Sync](/features/icloud-sync) | Pro | Dimmed, with a row saying it needs a paid plan |
+| [iCloud Sync](/features/icloud-sync) | Pro | Choosing it under **Settings > Sync** opens a dialog saying it needs a paid plan |
+| [TablePro Sync](/features/sync) | Pro | Choosing it under **Settings > Sync** opens a dialog saying it needs a paid plan |
| [Encrypted connection export](/features/connection-sharing) | Pro | Dimmed, with a row saying it needs a paid plan |
| [Environment variables in connection fields](/features/connection-sharing) | Pro | References stay unresolved |
| [Linked Folders](/features/connection-sharing) | Pro | Dimmed, with a row saying it needs a paid plan |
@@ -68,6 +69,8 @@ The table describes macOS features. The [Linux beta](/linux/install) uses the sa
Signed out, a row, overlay or dialog offers **Sign In** and **Purchase License**. Signed in to an account without the feature, it offers **Upgrade Plan**, which opens the pricing page. A plan you already hold is never offered for sale: when it could not be checked, the gate says what **Settings > Account** says and offers **Try Again**, and past the [device limit](#device-limit) it offers **Open Account Settings…**, which opens **Devices**. Everything else in the app works without a plan.
+TablePro Sync comes with Pro, monthly, yearly or bought once, and with a Team seat. A team whose plan has only Team Library does not include it. On a [company server](/features/company-server), the server's license decides; see [Before you roll it out](/self-hosted/sync#before-you-roll-it-out).
+
## Buy a plan
Choose **Help > Support TablePro**, or click **Support TablePro** under the app name on the welcome window or in the sidebar footer of a connection window. The window states how the project is funded and carries two actions: **Buy a License** opens the pricing page and **Sponsor on GitHub** opens [the sponsorship page](https://github.com/sponsors/datlechin), both in your default browser.
diff --git a/features/query-history.mdx b/features/query-history.mdx
index 555752a7..eb5948cd 100644
--- a/features/query-history.mdx
+++ b/features/query-history.mdx
@@ -86,7 +86,7 @@ The trash button deletes exactly the entries the drawer is listing. Anything the
## Storage and retention
-History lives in `~/Library/Application Support/TablePro/query_history.db`, a local SQLite database with a full-text index. It never leaves the Mac that recorded it: query history is not one of the categories [iCloud sync](/features/icloud-sync) carries, so two Macs keep two separate histories.
+History lives in `~/Library/Application Support/TablePro/query_history.db`, a local SQLite database with a full-text index. [iCloud sync](/features/icloud-sync) does not carry it. On [TablePro Sync](/features/sync#what-tablepro-sync-carries), history also goes to your TablePro account, end-to-end encrypted, unless your server turns that off. Runs on a Local only connection stay on this Mac, and so does a run whose text TablePro cannot check for credentials, such as one on an engine whose SQL it does not parse.
There is no export command. The file is an ordinary SQLite database, so open it as a SQLite connection and query it like anything else.
diff --git a/features/sync.mdx b/features/sync.mdx
new file mode 100644
index 00000000..8c5f8151
--- /dev/null
+++ b/features/sync.mdx
@@ -0,0 +1,215 @@
+---
+title: Sync
+description: Choose whether this Mac syncs with iCloud or TablePro Sync, approve changes from your other devices, move your data from one provider to the other, and set up the end-to-end keys TablePro Sync needs
+---
+
+One provider carries everything this Mac syncs. Pick it under **Sync this Mac with**, at the top of **Settings > Sync**.
+
+
+
+
+
+
+| Provider | Syncs through | Needs |
+|---|---|---|
+| **Off** | Nothing. Connections and settings stay on this Mac | Nothing |
+| **iCloud** | Your Apple Account, to your other Macs, iPhone and iPad | A paid [plan](/features/licensing). See [iCloud Sync](/features/icloud-sync) |
+| **TablePro Sync** | Your TablePro account, on tablepro.app or your [company's server](/features/company-server) | A paid plan or a seat on the company server, and a [recovery key](#set-up-your-recovery-key) |
+
+Choosing a provider your plan does not include opens a dialog saying it needs a paid plan, with **Sign In** while you are signed out, and the menu stays where it was.
+
+Sync starts **Off**. Signed in to a company server, pick **TablePro Sync**, which keeps your data on your organization's server. Otherwise **iCloud** is the one your iPhone and iPad share. [Team Library](/features/team#team-library) syncs whichever you pick, **Off** included.
+
+## What TablePro Sync carries
+
+The switches under **What Syncs** apply to either provider. On TablePro Sync they carry connections, groups and tags, [SSH](/connections/ssh-profiles#sync) and [credential](/connections/credential-profiles#sharing-and-sync) profiles, saved queries, table and database favorites, table folders and settings. Projects go too while **Connections** and **Groups & Tags** are both on; iCloud does not carry them. Two more things go with them:
+
+- **Passwords**, while that switch is on. See [Passwords](#passwords).
+- **Query history**, end-to-end encrypted. It has no switch: on TablePro Sync it syncs unless your server turns it off.
+
+End-to-end encrypted means this Mac seals the value before it leaves, and only your approved devices open it. The rest goes to the server as records it can read.
+
+Connections set to **Local only** stay on this Mac, and so do the sample connections. To set one, right-click it and choose **Exclude from TablePro Sync**. A company server can keep passwords, query history or all of your own data off the server; the pane then says which, and that part stays on this Mac. See [Personal sync and Team Library](/self-hosted/sync#sync-switches).
+
+### Passwords
+
+**Passwords** under **What Syncs** starts on for TablePro Sync. iCloud keeps a switch of its own, which starts off. Turning **Connections** off turns **Passwords** off too.
+
+With it on, these go up end-to-end encrypted with your account's keys:
+
+- a connection's password, SSH password, SSH key passphrase, SSL client key passphrase and TOTP secret;
+- an SSH profile's password, key passphrase and TOTP secret;
+- a credential profile's password.
+
+A driver's own secret fields, a credential profile's additional secrets and AI provider keys stay on this Mac.
+
+Passwords wait for your account's keys, which the move to TablePro Sync sets up before anything goes up: a [recovery key](#set-up-your-recovery-key) on your account's first device, or an [approval](#approve-another-device) on the next. Every password this Mac holds then goes with the first upload, counted on the move sheet, so there is nothing to save again.
+
+Each Mac keeps the passwords in its own Keychain, never in iCloud Keychain. A move from iCloud copies each iCloud Keychain password into this Mac's own Keychain and leaves the iCloud Keychain copy for your devices still on iCloud. A password for a connection that [waits for your approval](#changes-that-wait-for-your-approval) arrives once you approve the connection.
+
+A company server can turn password sync off. **Passwords** then shows off and dimmed, and the pane says "Your server does not sync passwords. Each one stays on this Mac." Your own choice is kept, and the switch shows it again once the server syncs passwords.
+
+## Status
+
+**Status**, under **Sync this Mac with**, says how the last pass went. On TablePro Sync:
+
+| Status | Means |
+|---|---|
+| **Up to Date** | The last pass sent this Mac's changes and brought in the others' |
+| **Syncing…** | A pass is running |
+| **Waiting to Retry** | The server could not be reached or asked TablePro to wait, or this Mac's keychain has not answered yet. Changes wait on this Mac, and TablePro tries again on its own |
+| **Downloading Only** | The server takes no changes from this Mac. See [When the plan or license ends](#when-the-plan-or-license-ends) |
+| **Sync Is Unavailable** | A retry cannot fix it. The line under it says what to do |
+
+**Last synced** is the last pass that got through. It stays after you quit, so a Mac that starts offline still shows it. **Sync Now** runs a pass at once; offline, it says "TablePro Sync cannot be reached. Your data stays on this Mac; try again once you are online." iCloud has statuses of its own, on [iCloud Sync](/features/icloud-sync#troubleshooting).
+
+## Changes that wait for your approval
+
+Some changes made on another device do not apply on this Mac until you approve them here. This holds on either provider, and for [Team Library](/features/team#team-library) too. These wait:
+
+- where a connection or profile goes and how it signs in: database type, host, port, user, database or file path, SSH tunnel and SSH profile, SSL mode, certificate paths, credential profile and password source;
+- a lower Safe Mode, a looser AI policy or **External Clients** level, AI rules, and the AI tools a connection always allows;
+- startup commands;
+- AI settings that send or do more, such as turning AI features on, the AI provider and its endpoint, and including the schema or query results;
+- turning **Share usage data** on.
+
+A connection or profile made on another device waits whole: it appears on this Mac once you approve it.
+
+While changes wait, **Status** reads **N changes need your approval** in place of **Up to Date**, with **Review…** under it. The welcome window shows the same line; click it to review. When the status says something else, such as **Syncing…**, the count shows under it. With sync **Off**, Team Library changes that wait get a row of their own.
+
+
+
+
+
+
+**Review…** opens **Changes Waiting for Your Approval**. Each item is under **Your Library** or **Team Library**, with this Mac's value beside the new one. A new item shows only the new values.
+
+- **Approve** applies the item's values on this Mac.
+- **Don't Apply** keeps this Mac's values, or keeps a new item off this Mac. The same values do not ask again.
+- **Approve All** approves every item listed. An item another device changed again while the sheet was open stays for you to review.
+
+
+
+
+
+
+Passwords never show in the list, and a driver's secret field reads **Hidden**.
+
+## Move between providers
+
+A move to or from TablePro Sync opens a sheet that says what it does before it runs.
+
+| From | To | What happens |
+|---|---|---|
+| **Off** | **iCloud** | Sync starts |
+| **Off** | **TablePro Sync** | **Upload to TablePro Sync** counts the items that go up, the passwords it encrypts and the items that stay on this Mac. Click **Upload** |
+| **iCloud** | **TablePro Sync** | **Move to TablePro Sync** counts the same. Click **Move to TablePro Sync**. Devices still on iCloud stop syncing with this Mac until you move each of them too |
+| **TablePro Sync** | **iCloud** | **Move Back to iCloud** downloads the latest from TablePro Sync, then syncs with iCloud again. Items deleted on TablePro Sync since this Mac moved are deleted from iCloud too, unless another device changed them there, and the button names how many |
+| Either | **Off** | Sync stops. Your data stays on this Mac and with the provider |
+
+
+
+
+
+
+A Mac with no keys yet sets them up before anything goes up: the sheet asks for **Set Up Recovery Key…** on your account's first device, or **Approve This Mac…** when another device already has them, then runs the move.
+
+TablePro's data stays in iCloud after the move. **Delete iCloud Data…**, in the **iCloud data** row of the same pane, removes it. Devices still syncing with iCloud stop until one of them uploads again; what this Mac and TablePro Sync hold stays.
+
+### Signed in to another account
+
+When this Mac syncs with an account other than before, such as another Apple Account, TablePro account or server, nothing personal goes up until you choose. **Signed In to Another Account** offers **Move My Data**, which brings this Mac's data into the account it now syncs with, and **Start Empty**, which takes what that account already holds. It also counts the changes the earlier account never received.
+
+### Chosen by your organization
+
+A configuration profile can set the provider and lock the menu, which then reads **Managed by your organization**. A required TablePro Sync waits for you: **Your Organization Uses TablePro Sync** opens the upload sheet with **Review Upload…**. A required iCloud on a Mac already on TablePro Sync shows **Your Organization Uses iCloud**, and **Review Move Back…** opens the move back. See [Company server](/features/company-server#set-the-server-for-every-mac).
+
+### When the plan or license ends
+
+**Uploads Paused** means your plan no longer includes TablePro Sync, or your company server's license has ended. This Mac still downloads changes and keeps its own until the plan or license is renewed. In a company server's grace period, **Your Server's License Has Expired** gives the date TablePro Sync stops taking changes.
+
+## End-to-end encryption
+
+TablePro Sync seals passwords and query history with keys that belong to your account. Every approved device holds them, and a recovery key that only you keep stands in for a device when none is at hand. They live under **Settings > Account > End-to-End Encryption**, shown while you are signed in.
+
+
+
+
+
+
+### Set up your recovery key
+
+Your account's first device makes the keys, from the move sheet or from **Set Up…** on this page.
+
+
+
+ **Set Up a Recovery Key** shows 14 groups of letters and digits. Click **Copy** or **Print…**, keep it in a password manager or on paper, and click **Continue**. TablePro shows it only this once and cannot recover it.
+
+
+ **Confirm Your Recovery Key** asks for two of the groups. **Show Key Again** goes back to it until you finish.
+
+
+ **Recovery Key Set Up** confirms it, and TablePro Sync seals your secrets on this Mac from then on.
+
+
+
+
+Anyone who has your recovery key and signs in to your TablePro account can read what TablePro Sync keeps for you. Keep it as you would that account's password.
+
+
+You need the recovery key to remove a lost device, and to approve a Mac when no other device is at hand. **Replace…** gives you a new one in exchange for the current one, and lets the devices you compared words with that are still signed in keep your keys; the others ask for approval again.
+
+### Approve another device
+
+A device that signs in to an account with keys gets nothing personal until a device that has them, or your recovery key, approves it. Approve only a device you are signing in to right now.
+
+
+
+ On the new Mac, open **Settings > Account > End-to-End Encryption** and click **Ask Another Device…**.
+
+
+ The request shows under **Waiting for Approval** with the device's name, its platform and when it asked. Check that it is the device you are signing in to, click **Approve…**, and click **Approve**.
+
+
+ Both devices show five words. When they match in the same order, click **The Words Match** on each. If they differ, click **They Don't Match**: nothing is approved, and someone else may be asking for your keys.
+
+
+
+
+The new Mac says **This Mac Is Approved**, and TablePro Sync starts there.
+
+
+A request lasts 10 minutes. With no other device at hand, click **Use Recovery Key…** on the new Mac instead. It then holds new keys, and your other devices ask it for approval.
+
+### Remove a device
+
+Remove a device you lost or gave away from any other device that has your keys.
+
+
+
+ Under **Devices With Your Keys**, click **Remove…** beside it, then **Remove**.
+
+
+ The browser opens to confirm it's you with your account's passkey. On tablepro.app, an account with no passkey gets an emailed code instead. On a company server without a passkey, you add one first, after your organization's sign-in.
+
+
+ TablePro changes your keys with it.
+
+
+ Choose which of your devices keep the keys. Only a device you compared words with that is still signed in can keep them. A removed or signed-out device's keys show **Removed**. Then turn off any teammate you did not mean to confirm while the removed device had them. Teammates you turn off are left out of the new team keys, and **Remove Their Seats First** offers **Manage…** for each team to take their seats too.
+
+
+
+The removed device reads nothing new, and your other devices pick up the new keys at their next sync. A device whose removal stopped before the keys changed shows **Removed, keys not changed yet** with **Finish…**.
+
+A removed Mac signs itself out once the server tells it, and **Settings > Account** there says "This Mac was removed from your account. Sign in again to use it here." Signed in again, it starts as a new device: it asks for approval from another device, or for your recovery key, as under [Approve another device](#approve-another-device).
+
+### Lost the recovery key
+
+**Reset Keys…**, under **Reset** on a Mac that still has your keys, gives you a new recovery key. The reset waits 7 days, and any of your devices, or the old key if you find it, can cancel it. After the wait, **Finish Reset…** on this Mac completes it, and your other devices sign out and join again from this Mac. Passwords and query history stay. Teammates see that your keys changed, and an owner or admin of each team confirms you again before you get its passwords.
+
+With no device that has the keys and no recovery key, **Reset and Start Empty…** on a Mac waiting for approval starts over. It needs your passkey and waits 7 days too. After the wait, **Finish Reset…** on that Mac deletes everything you synced to TablePro Sync for good, passwords and query history included. Team libraries stay.
+
+### Sign out
+
+**Sign Out** under **Settings > Account** erases this Mac's keys. After you sign in again, it waits for approval from another device or your recovery key, like a new Mac. If they cannot be erased, TablePro asks whether to sign out anyway, and they then stay on this Mac until another account signs in here.
diff --git a/features/team.mdx b/features/team.mdx
index 8655588e..c37b4e60 100644
--- a/features/team.mdx
+++ b/features/team.mdx
@@ -12,7 +12,8 @@ Team is sold per seat, from 2 seats, monthly or yearly, at the prices under [Pla
| Role | Can |
|------|-----|
| Owner | Everything an admin can, plus billing, transferring ownership and deleting the team. Exactly one per team, and never removed |
-| Admin | Change members' roles and seats, invite and remove members, publish to the team library, manage API tokens, read the audit log. Nothing that touches the owner |
+| Admin | Change members' roles and seats, invite and remove members, edit and publish to the team library, manage API tokens, read the audit log. Nothing that touches the owner |
+| Editor | Everything a member can, plus edit and publish the team library's connections and saved queries, and delete its items |
| Member | Use the team's features and library, see the team's plan and seat counts, and leave the team |
A seat turns the team's paid features on for one person, on up to 3 of their devices. The limit is per account, so a seat and a Pro plan on the same account share those 3; see [Devices](/features/licensing#devices). Someone in the team without a seat keeps a Free plan unless they have one of their own. The owner does not need a seat.
@@ -65,28 +66,40 @@ Two routes, and the choice is whether your team already shares a folder. If it d
### Team Library
-Every member with a seat reads the library. Owners and admins publish to it from the app, and delete any item on the team's **Library** page in your account, which lists who last changed each one.
+Every member with a seat reads the library. Owners, admins and editors also publish to it from the app and edit what is in it, and delete any item on the team's **Library** page in your account, which lists who last changed each one.
To publish connections, right-click one and choose **Share > Publish to Team Library…**. Someone who publishes to several teams picks one from a submenu. Publishing again updates the team's copy.
-To publish saved queries, right-click empty space in the Favorites sidebar and choose **Publish Saved Queries to Team…**. Your saved queries go up with their folders, and the ones you published from this Mac and deleted since leave the library. What other people published stays.
+To publish saved queries, choose **File > Publish Saved Queries to Team** and pick the team, or right-click empty space in the Favorites sidebar and choose **Publish Saved Queries to Team…**. Your saved queries go up with their folders, and the ones you published from this Mac and deleted since leave the library. What other people published stays.
-Only the connection definition and the query text travel, never passwords, key passphrases or TOTP secrets. The server refuses a publish holding an item over 256 KiB or a field named like a credential, and stores none of it.
+To change a team connection, right-click it in the welcome window's **Team Library** section and choose **Edit…**. The connection form opens on the team's copy with its passwords, and **Save** publishes the change to the team, not to your own connections. A password changes only when you change or clear its field. An empty field you did not touch keeps the team's password.
-TablePro pulls the library at launch, every 15 minutes and right after each publish, and sends only what changed. The **Team Library** header shows a spinner while it syncs and a warning icon after a sync that failed; hover the header for when it last updated. A publish the server cannot take right now says **Not published yet**, stays on the Mac, and goes out once the server answers.
+Everything but the [passwords](#passwords-in-team-library) travels as records the server can read. The server refuses a publish holding an item over 256 KiB or a readable field named like a credential, and stores none of it.
-Teammates find the connections in a **Team Library** section of the welcome window, read only, without startup SQL or a tunnel command. Queries land under **Team Library** in the Favorites sidebar, each labeled with who last changed it, or with its folder when the library names no one.
+TablePro pulls the library at launch, every 15 minutes and right after each publish, and sends only what changed. The **Team Library** header shows a spinner while it syncs and a warning icon after a sync that failed; hover the header for when it last updated. A publish the server cannot take right now says **Not published yet** and stays on the Mac, after a quit too. The header counts it, such as **1 Not Uploaded**, and it goes out once the server answers.
-Shared sign-in settings need [approval on each Mac](/connections/connection-form#sign-ins-from-this-mac) before using local cloud credentials or Kerberos tickets.
+Teammates find the connections in a **Team Library** section of the welcome window, without startup SQL or a tunnel command. Queries land under **Team Library** in the Favorites sidebar, each labeled with who last changed it, or with its folder when the library names no one. A teammate's change to where a connection goes or how it signs in, a lower Safe Mode or a looser AI policy [waits for your approval](/features/sync#changes-that-wait-for-your-approval) before it applies on your Mac.
+
+Before a Team Library connection uses this Mac's cloud credentials, Kerberos tickets, SSH agent or SSH keys, or a database file on this Mac, TablePro [asks once for each destination](/connections/connection-form#sign-ins-from-this-mac).
+
+### Passwords in Team Library
+
+A published connection carries its password, SSH password and TOTP secret, encrypted with the team's key, so teammates connect without typing them. Key passphrases stay on the Mac that saved them. So do key files: the team's copy names the file's path, and each teammate needs that file on their own Mac.
+
+Passwords go while the team's password sync is on, which it is from the start. On tablepro.app, owners and admins turn it off with **Sync saved passwords** on the team's **Settings** page in your account, and the server deletes the team's passwords it holds. On a company server one switch covers every team; see [Sync switches](/self-hosted/sync#sync-switches). With it off, the publish confirmation says passwords are not included, and teammates enter their own.
+
+A teammate's Mac opens the passwords once an owner or admin has confirmed that teammate's keys. Each member sets up keys of their own first, under **Settings > Account > End-to-End Encryption**; see [Set up your recovery key](/features/sync#set-up-your-recovery-key). Then an owner or admin opens **Settings > Account > Teams**, picks the team, and clicks **Confirm…** beside the member under **Members**, once the six words match the ones the member sees under **Show My Words…**. Until then, that person's Mac asks for each password, and their publishes say **Published without passwords**.
### Library conflicts
-A publish that changes an item someone else changed since your last sync leaves a conflict instead. The header shows **1 Conflict**; click it, or choose **Resolve Team Library Conflicts…** from a right-click. The sheet sets **Your Version** beside **Team's Version**, which names who changed it:
+A publish that changes an item someone else changed since your last sync leaves a conflict instead. The header shows **1 Conflict**; click it, or choose **Resolve Team Library Conflicts…** from a right-click. The sheet lists only the fields you both changed, **Your Version** beside **Team's Version**, and names who changed it:
- **Keep Mine** replaces the team's version with yours.
- **Keep Theirs** leaves the team's version, and holds until your copy on this Mac changes again.
- **Decide Later** closes the sheet and keeps the conflict.
+**Keep Mine** and **Keep Theirs** each keep the team password that goes with the version that stays.
+
When the team's plan ends, or your seat goes, Team Library connections and queries disappear from the Mac. The library stays in your account until the owner deletes the team.
Versions before TablePro accounts pull the library at launch, at most once a week, and right after they publish. A publish from one of them replaces what that account published before, and skips any item changed since through a newer version or your account.
diff --git a/images/end-to-end-encryption-dark.png b/images/end-to-end-encryption-dark.png
new file mode 100644
index 00000000..73550595
Binary files /dev/null and b/images/end-to-end-encryption-dark.png differ
diff --git a/images/end-to-end-encryption.png b/images/end-to-end-encryption.png
new file mode 100644
index 00000000..f15c5431
Binary files /dev/null and b/images/end-to-end-encryption.png differ
diff --git a/images/settings-sync-dark.png b/images/settings-sync-dark.png
index ce7177b4..a39a8a37 100644
Binary files a/images/settings-sync-dark.png and b/images/settings-sync-dark.png differ
diff --git a/images/settings-sync.png b/images/settings-sync.png
index 8377d4fa..f60098d3 100644
Binary files a/images/settings-sync.png and b/images/settings-sync.png differ
diff --git a/images/sync-approvals-review-dark.png b/images/sync-approvals-review-dark.png
new file mode 100644
index 00000000..09888a9d
Binary files /dev/null and b/images/sync-approvals-review-dark.png differ
diff --git a/images/sync-approvals-review.png b/images/sync-approvals-review.png
new file mode 100644
index 00000000..b9d16c34
Binary files /dev/null and b/images/sync-approvals-review.png differ
diff --git a/images/sync-move-to-tablepro-sync-dark.png b/images/sync-move-to-tablepro-sync-dark.png
new file mode 100644
index 00000000..b6c616f3
Binary files /dev/null and b/images/sync-move-to-tablepro-sync-dark.png differ
diff --git a/images/sync-move-to-tablepro-sync.png b/images/sync-move-to-tablepro-sync.png
new file mode 100644
index 00000000..51438d7a
Binary files /dev/null and b/images/sync-move-to-tablepro-sync.png differ
diff --git a/images/sync-provider-dark.png b/images/sync-provider-dark.png
new file mode 100644
index 00000000..92a82734
Binary files /dev/null and b/images/sync-provider-dark.png differ
diff --git a/images/sync-provider.png b/images/sync-provider.png
new file mode 100644
index 00000000..23aee94b
Binary files /dev/null and b/images/sync-provider.png differ
diff --git a/images/sync-status-approvals-dark.png b/images/sync-status-approvals-dark.png
new file mode 100644
index 00000000..68c18c8c
Binary files /dev/null and b/images/sync-status-approvals-dark.png differ
diff --git a/images/sync-status-approvals.png b/images/sync-status-approvals.png
new file mode 100644
index 00000000..a4cd5983
Binary files /dev/null and b/images/sync-status-approvals.png differ
diff --git a/security/privacy.mdx b/security/privacy.mdx
index 24c49f04..01304c75 100644
--- a/security/privacy.mdx
+++ b/security/privacy.mdx
@@ -16,7 +16,8 @@ Turn off app usage data in the privacy settings if you do not want to send it. M
| [Mac plugin catalog](#the-plugin-catalog) | `updates.tablepro.app` | On; no off switch |
| [AI provider](#ai-providers) | Your chosen provider | No provider on a fresh install; remove it or turn off **Enable AI features** |
| [AI model catalog](#the-ai-model-catalog), Mac, Linux and Windows | `updates.tablepro.app` | Only when a provider's model list loads; no provider on a fresh install |
-| [iCloud sync](#icloud-sync) | Your iCloud account | Off; **Settings > iCloud Sync** |
+| [iCloud sync](#icloud-sync) | Your iCloud account | Off; **Settings > Sync** |
+| [TablePro Sync](#tablepro-sync) | `api.tablepro.app`, or your organization's server | Off; **Settings > Sync** |
| [MCP clients](#the-mcp-server) | Local HTTP and a private Unix socket | Off; **Settings > MCP** |
| [Accounts and Team Library](#accounts-and-the-team-library) | `api.tablepro.app` | Account requests after sign-in; content uploads when published |
| [Shared links](#shared-links) | `api.tablepro.app`; link pages on `s.tablepro.app` | Only when you open a share sheet, create or revoke a link, or open one |
@@ -120,7 +121,13 @@ Passwords are not one of those record types. The **Passwords** switch under **Wh
That flag is set on every keychain item the app writes, not only connection passwords: AI provider keys and an older license key go through the same helper. Current account tokens never sync. MCP tokens and Google sign-in refresh tokens do not; their stores always write device-only items.
-With password sync off, secrets are written `kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly`, which keeps them on that one Mac. Query history, the activity log, the execution log, tab state, MCP settings, and the sync settings themselves are never synced. Individual connections can be marked **Local Only**, which also moves their secrets out of iCloud Keychain onto that one Mac. Full detail in [iCloud Sync](/features/icloud-sync#keeping-a-connection-off-icloud).
+With password sync off, secrets are written `kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly`, which keeps them on that one Mac. Query history, the activity log, the execution log, tab state, MCP settings, and the sync settings themselves never go to iCloud. Individual connections can be marked **Local Only**, which also moves their secrets out of iCloud Keychain onto that one Mac. Full detail in [iCloud Sync](/features/icloud-sync#keeping-a-connection-off-icloud).
+
+## TablePro Sync
+
+Off by default, and it needs a paid plan or a seat on your organization's server. When it is on, records go to `/v2/sync` on the server this Mac is signed in to: `api.tablepro.app`, or your organization's own server.
+
+Passwords and other connection and profile secrets, and query history, are sealed on the Mac with AES-256-GCM under keys that only your approved devices hold, so the server stores ciphertext. On the Mac they stay device-only Keychain items. Connections, groups and tags, projects, SSH and credential profiles, saved queries, favorites, table folders and settings go as records the server can read. The activity log, the execution log, tab state and MCP settings never sync. See [Sync](/features/sync).
## The MCP server
@@ -171,7 +178,7 @@ From Mac 0.86.0 (including 0.86.0-beta.1), Linux 0.1.0-beta.1 and the Windows pr
Mac builds before 0.86.0 use `https://api.tablepro.app/v1/license` after a key is entered. Activation and seven-day revalidation send the license key, machine ID, Mac name and app/OS versions. Deactivation sends the key and machine ID. Device records and audit changes are covered by the [account policy](https://tablepro.app/privacy#account).
-On Mac, publishing Team Library sends connection definitions and saved SQL to the service. Structured credentials are excluded; free text is not scrubbed. Current account builds use `/v2/teams/{id}/library`, pull changes at launch, every 15 minutes and after publishing, and publish changes rather than replacing the whole library. Older builds use `/v1/license/library` and pull at most weekly. [Team Library](https://tablepro.app/privacy#library) describes access, and [retention](https://tablepro.app/privacy#retention) distinguishes normal team deletion from deleting its sole owner's account.
+On Mac, publishing Team Library sends connection definitions and saved SQL to the service. A connection's password, SSH password and TOTP secret go only sealed under the team's key, and only while the team's password sync is on; key passphrases stay on the Mac. Free text is not scrubbed. Current account builds use `/v2/teams/{id}/library`, pull changes at launch, every 15 minutes and after publishing, and publish changes rather than replacing the whole library. Older builds use `/v1/license/library` and pull at most weekly. [Team Library](https://tablepro.app/privacy#library) describes access, and [retention](https://tablepro.app/privacy#retention) distinguishes normal team deletion from deleting its sole owner's account.
## Shared links
@@ -220,13 +227,13 @@ Every path here is under `~/Library/Application Support/TablePro/` unless it say
| `LastSession.json`, `LastOpenConnections.json` | What to reopen for **Reopen Last Session**, and which of those connections dial on their own. |
| `Plugins/` | Plugins you installed yourself. |
| `Registry/URLCache/` | The cached plugin catalog. |
-| `team_library.json` | The cached team library. |
+| `team_library.json` | The cached team library, with the team's passwords still sealed. |
| `linked_sql_index.db` | File metadata for linked SQL folders. |
| `~/Library/Preferences/com.TablePro.plist` | Settings; older builds also keep a signed license blob with its email. |
## Passwords and secrets
-Imported, synced and shared connections need [local sign-in approval](/connections/connection-form#sign-ins-from-this-mac) before using this Mac's cloud credentials or Kerberos tickets. Environment variable references have a [separate prompt](/features/connection-sharing#environment-variables). These approvals stay on the Mac that granted them.
+Imported, synced and shared connections need [local sign-in approval](/connections/connection-form#sign-ins-from-this-mac) before using this Mac's cloud credentials or Kerberos tickets, and Linked Folders and Team Library connections before using its SSH agent, SSH keys or database files. Environment variable references have a [separate prompt](/features/connection-sharing#environment-variables). These approvals stay on the Mac that granted them.
Secrets live in the macOS keychain, under the `com.TablePro` service and in the data protection keychain: connection passwords, SSH passwords, key passphrases, SSL client key passphrases, TOTP secrets, plugin secure fields, AI provider keys, and older license keys. Account refresh tokens use a device-only Keychain item. Google sign-in refresh tokens for BigQuery and Spanner are kept in the same keychain under `com.TablePro.GoogleOAuth`, one per OAuth client ID. MCP tokens are the exception, stored as a salted SHA-256 hash; the plaintext is shown once at creation and never written down.
diff --git a/self-hosted/aws.mdx b/self-hosted/aws.mdx
index 75e02aac..42d45d08 100644
--- a/self-hosted/aws.mdx
+++ b/self-hosted/aws.mdx
@@ -26,7 +26,7 @@ Six subnets across two Availability Zones: two for the ALB, two for the task and
- **Target group.** Type `ip`, port 8080, health check path `/readyz`, matcher 200, interval 15 seconds, healthy threshold 2, unhealthy threshold 5, deregistration delay 30 seconds. No host rules: the server routes by `Host` itself.
- **ALB attributes.** `routing.http.drop_invalid_header_fields.enabled=true`, `routing.http.preserve_host_header.enabled=true`, `routing.http.xff_header_processing.mode=append` (the default), `deletion_protection.enabled=true`.
- **Security groups.** The ALB takes 443 and 80 from the clients. The task takes 8080 from the ALB's group only. RDS takes 5432 from the task's group only.
-- **Task subnets.** Two of their own, never the ALB's. The task pulls the image from GHCR, with OIDC it calls the IdP, and with `LICENSE_RENEWAL=on` it calls `api.tablepro.app` on 443: use private subnets with a NAT gateway, or public subnets with `assignPublicIp`.
+- **Task subnets.** Two of their own, never the ALB's. The task pulls the image from GHCR, with OIDC it calls the IdP, with `LICENSE_RENEWAL=on` it calls `api.tablepro.app` on 443, and with `SMTP_HOST` set it reaches the relay on `SMTP_PORT`: use private subnets with a NAT gateway, or public subnets with `assignPublicIp`.
- **No egress.** Mirror the image to ECR with `oras cp -r` ([Image and keys](/self-hosted/image#mirror-to-a-private-registry)), run an OIDC IdP inside the VPC, and take a term other than monthly: each license file is then installed by hand. A SAML IdP needs no route from the task: the browser carries its answer.
- **Database subnets.** Two more, for RDS's DB subnet group. They need no route out.
- **Client address.** `CLIENT_ADDRESS=xff`, with `CLIENT_ADDRESS_TRUSTED_CIDRS` set to the CIDRs of the ALB's subnets. Not the VPC's CIDR: a workload elsewhere in it would set its own rate-limit key.
@@ -57,7 +57,7 @@ aws secretsmanager create-secret --name tablepro/db \
aws secretsmanager create-secret --name tablepro/keys --secret-string file://credentials.json
```
-The task execution role `tablepro-cloud-execution` has `AmazonECSTaskExecutionRolePolicy`, plus `secretsmanager:GetSecretValue` on the three secrets, and `kms:Decrypt` when they use a customer managed key.
+The task execution role `tablepro-cloud-execution` has `AmazonECSTaskExecutionRolePolicy`, plus `secretsmanager:GetSecretValue` on the three secrets and on an SMTP password's secret when you add one, and `kms:Decrypt` when they use a customer managed key.
ECS reads a secret only when a task starts. After changing one, run `aws ecs update-service --cluster tablepro --service tablepro-cloud --force-new-deployment`.
@@ -256,6 +256,8 @@ With a SAML IdP, replace `OIDC_ISSUER` and `OIDC_CLIENT_ID` with `SAML_IDP_ENTIT
With a monthly license, add `{ "name": "LICENSE_RENEWAL", "value": "on" }` to `app`'s `environment`. See [Renew](/self-hosted/operations#renew).
+To email passkey notices, add `SMTP_HOST`, `SMTP_TLS`, `SMTP_FROM` and, for a relay that takes a login, `SMTP_USERNAME` to `app`'s `environment`, and `SMTP_PASSWORD` to its `secrets` from a secret of its own. See [Email](/self-hosted/settings#email).
+
```bash
aws ecs register-task-definition --cli-input-json file://ecs-task-definition.json
```
@@ -312,7 +314,7 @@ task=$(aws ecs run-task --cluster tablepro --task-definition tablepro-cloud --la
--query 'tasks[0].taskArn' --output text)
```
-`license status`, `migrate status`, `bootstrap --replace-owner`, `sync new-epoch` and `version` run the same way, with their words as the command. [Docker Compose](/self-hosted/docker-compose#run-a-command) lists what each one does.
+`license status`, `migrate status`, `bootstrap --replace-owner`, `sync new-epoch`, `passkeys reset `, `mail test ` and `version` run the same way, with their words as the command. [Docker Compose](/self-hosted/docker-compose#run-a-command) lists what each one does.
`bootstrap` prints the owner's claim link to the log stream, where anyone who reads the log group can use it within its hour. Running `bootstrap` again voids the earlier link.
diff --git a/self-hosted/docker-compose.mdx b/self-hosted/docker-compose.mdx
index fcc93f5a..6f0e6902 100644
--- a/self-hosted/docker-compose.mdx
+++ b/self-hosted/docker-compose.mdx
@@ -99,7 +99,7 @@ volumes:
# Fill in, then chmod 600 .env. Every variable: https://docs.tablepro.app/self-hosted/settings
# The release to run, by version and digest.
-TABLEPRO_IMAGE=ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256:
+TABLEPRO_IMAGE=ghcr.io/tableproapp/tablepro-cloud:0.3.0@sha256:
# The database password: openssl rand -hex 24. Postgres keeps the first one it starts with.
POSTGRES_PASSWORD=
@@ -140,6 +140,16 @@ IDP_DISPLAY_NAME=
# HTTPS_PROXY=http://proxy.example.com:3128
# NO_PROXY=idp.example.com
+# Your mail relay, for one kind of email: a passkey added to or removed from someone's account, or reset with
+# passkeys reset. TLS always, starttls or implicit, never plaintext. Unset, the audit log and the logs are the notice.
+# Check the settings with: docker compose run --rm --no-deps app mail test you@example.com
+# SMTP_HOST=smtp.example.com
+# SMTP_PORT=587
+# SMTP_TLS=starttls
+# SMTP_USERNAME=
+# SMTP_PASSWORD=
+# SMTP_FROM=tablepro@example.com
+
# The server's signing and encryption keys, as one line from credentials.sh, in single quotes.
# Keep a copy offline: a database restored without these keys cannot read the IdP tokens it holds.
TABLEPRO_CREDENTIALS=
@@ -168,7 +178,7 @@ TABLEPRO_CREDENTIALS=
```
- Forward both hostnames to `127.0.0.1:8080` over TLS. The proxy passes `Host` unchanged and sets `X-Forwarded-For`. The server takes request bodies up to 16 MiB; a proxy with a lower limit, such as nginx's default `client_max_body_size 1m`, refuses larger Team Library publishes.
+ Forward both hostnames to `127.0.0.1:8080` over TLS. The proxy passes `Host` unchanged and sets `X-Forwarded-For`. The server takes request bodies up to 16 MiB; a proxy with a lower limit, such as nginx's default `client_max_body_size 1m`, refuses larger Team Library publishes and sync uploads.
```bash
@@ -205,7 +215,9 @@ Every server command runs in a one-off `app` container:
| `docker compose run --rm --no-deps app license status` | Shows the installed license and the seats taken |
| `docker compose run --rm --no-deps app bootstrap ""` | Prints the link that claims the server. Refused once it has an owner |
| `docker compose run --rm --no-deps app bootstrap --replace-owner` | Prints a link that replaces an owner who can no longer sign in |
-| `docker compose run --rm --no-deps app sync new-epoch` | After a database restore, before `app` starts. See [Restore](/self-hosted/operations#restore-a-backup) |
+| `docker compose run --rm --no-deps app sync new-epoch` | After a database restore, before `app` starts. Prints the new epoch's ID. See [Restore](/self-hosted/operations#restore-a-backup) |
+| `docker compose run --rm --no-deps app passkeys reset ` | Deletes every passkey of the account, for someone who lost theirs. See [Lost passkeys](/self-hosted/operations#lost-passkeys) |
+| `docker compose run --rm --no-deps app mail test ` | Sends one test email through the SMTP relay. See [Email](/self-hosted/settings#email) |
| `docker compose run --rm --no-deps app migrate status` | Lists every migration with the time it was applied, or `pending`. `migrate up` prints nothing when it succeeds |
| `docker compose run --rm --no-deps app version` | Prints the release |
diff --git a/self-hosted/image.mdx b/self-hosted/image.mdx
index 2861e0f8..d229c58a 100644
--- a/self-hosted/image.mdx
+++ b/self-hosted/image.mdx
@@ -3,22 +3,22 @@ title: Image and keys
description: Pull the TablePro server image from GHCR, verify its cosign signature, SBOM and provenance, mirror it to a private registry, and generate the server's keys
---
-Pull from `ghcr.io/tableproapp/tablepro-cloud`. It is public and built for `linux/amd64` and `linux/arm64`. The current release is `0.2.0`; [Self-hosted releases](/self-hosted/releases) lists every release and what it changed.
+Pull from `ghcr.io/tableproapp/tablepro-cloud`. It is public and built for `linux/amd64` and `linux/arm64`. The current release is `0.3.0`; [Self-hosted releases](/self-hosted/releases) lists every release and what it changed.
| | |
|---|---|
-| Tags | `X.Y.Z` and `X.Y`, such as `0.2.0` and `0.2`. There is no `latest` |
+| Tags | `X.Y.Z` and `X.Y`, such as `0.3.0` and `0.3`. There is no `latest` |
| Base | `gcr.io/distroless/static-debian13:nonroot`. No shell |
| User | 65532. The root filesystem can be read-only |
| Entry point | `/tablepro-cloud`, default command `serve`, listening on `:8080` |
-| `version` | Prints the release, such as `0.2.0` |
+| `version` | Prints the release, such as `0.3.0` |
| Third-party notices | `/usr/share/doc/tablepro-cloud/THIRD_PARTY_NOTICES` |
| Amazon RDS CA bundle | `/etc/ssl/rds-global-bundle.pem`, for `sslrootcert` in `DATABASE_URL` |
-Deploy by digest, not by tag. The index digest of `0.2.0` is `sha256:de9130a22de1439e917fa621b9b22af62fd080ac9cf848b19b2e3e4c1d1885d8`. Check it, or get another release's, with:
+Deploy by digest, not by tag. The index digest of `0.3.0` is `sha256:ecee1a9c3259b00cd3c2001ca47261dab2462ebcaee89331f6dbc992bb0b828d`. Check it, or get another release's, with:
```bash
-docker buildx imagetools inspect ghcr.io/tableproapp/tablepro-cloud:0.2.0
+docker buildx imagetools inspect ghcr.io/tableproapp/tablepro-cloud:0.3.0
```
`Digest:` at the top is the index digest. Each entry under `Manifests:` names one platform's digest.
@@ -57,7 +57,7 @@ The signatures are also in Sigstore's public Rekor log, which `cosign verify` ch
### Mirror to a private registry
```bash
-oras cp -r ghcr.io/tableproapp/tablepro-cloud@sha256: registry.example.com/tablepro-cloud:0.2.0
+oras cp -r ghcr.io/tableproapp/tablepro-cloud@sha256: registry.example.com/tablepro-cloud:0.3.0
```
ORAS 1.3 or later copies the signatures and attestations with the image, since cosign 3 stores them as OCI referrers. `cosign copy` 3.1 leaves them behind. Run the verify commands against the mirror afterwards.
@@ -117,10 +117,10 @@ Run it once per install, with the image by digest, and with your SAML IdP's meta
chmod +x credentials.sh
# OIDC
-./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256: > credentials.json
+./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.3.0@sha256: > credentials.json
# SAML 2.0: the IdP's metadata file as the second argument
-./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256: idp-metadata.xml > credentials.json
+./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.3.0@sha256: idp-metadata.xml > credentials.json
```
diff --git a/self-hosted/index.mdx b/self-hosted/index.mdx
index aa728d37..5d9e384f 100644
--- a/self-hosted/index.mdx
+++ b/self-hosted/index.mdx
@@ -3,7 +3,7 @@ title: Self-hosted server
description: What the Enterprise Self-Hosted preview runs, what it needs from your infrastructure, the order to set it up in, and its limits
---
-One OCI image serves your teams and their Team Library to the Macs, from your own PostgreSQL. People sign in through your identity provider. The server sends no email and no telemetry. Its only outbound calls go to an OIDC identity provider and, when you turn on [license renewal](/self-hosted/operations#renew), to tablepro.app for the license's next file.
+One OCI image serves your teams, their Team Library and each person's [TablePro Sync](/self-hosted/sync) to the Macs, from your own PostgreSQL. People sign in through your identity provider. The server sends no telemetry. Its only outbound calls go to an OIDC identity provider, to your SMTP relay when you [set one](/self-hosted/settings#email) for passkey notices, and, when you turn on [license renewal](/self-hosted/operations#renew), to tablepro.app for the license's next file.
This is a preview. It serves TablePro for macOS. The other apps follow. To try it, write to [hello@tablepro.app](mailto:hello@tablepro.app) with the subject "TablePro Enterprise Self-Hosted"; plans and prices are under [Enterprise Self-Hosted](/features/licensing#enterprise-self-hosted).
@@ -15,10 +15,11 @@ This is a preview. It serves TablePro for macOS. The other apps follow. To try i
|---|---|
| Container host | Docker Compose on one Linux host, or AWS ECS on Fargate. The image runs on `linux/amd64` and `linux/arm64` |
| Database | PostgreSQL 18. The Compose file brings its own; on AWS, RDS for PostgreSQL 18 |
-| Two hostnames | One for the account portal, one for the API. They must differ |
+| Two hostnames | One for the account portal, one for the API. They must differ, and the portal's must be a DNS name: passkeys take no IP address |
| TLS | A reverse proxy or load balancer in front that terminates TLS for both hostnames and forwards to port 8080 |
| Identity provider | One IdP over OpenID Connect or SAML 2.0. See [Sign-in](/self-hosted/sign-in) |
| License file | Issued by TablePro for your API address |
+| SMTP relay | Optional. It sends the passkey notices; see [Email](/self-hosted/settings#email) |
These pages use two example hostnames:
@@ -62,8 +63,8 @@ The license file names the API address as `https://` plus `API_HOST`, and the se
## Preview limits
- **macOS only.** The other TablePro apps cannot sign in to a self-hosted server yet.
-- **Team Library is what syncs in the preview.** Shared links, billing and plan purchases are tablepro.app services and are not on a self-hosted server; [Company server](/features/company-server#what-is-different-on-a-company-server) lists what the Mac hides.
-- **No email.** An invitation is a link to copy and send yourself. Every email the server would send is dropped and logged as `email not sent`.
+- **Team Library and TablePro Sync are what sync.** Shared links, billing and plan purchases are tablepro.app services and are not on a self-hosted server; [Company server](/features/company-server#what-is-different-on-a-company-server) lists what the Mac hides.
+- **Passkey notices are the only email.** An invitation is a link to copy and send yourself. Every other email the server would send is dropped and logged as `email not sent`.
- **One IdP, one protocol.** Moving to another IdP or protocol later gives every person a new identity, and nothing links the old accounts to the new ones.
- **SAML is SP-initiated only.** A Response the IdP sends unasked is refused, and the server reads no encrypted assertion and sends no Single Logout.
- **No SCIM, no LDAP.** People appear at their first sign-in. An LDAP directory goes through an OIDC broker you run, such as Keycloak's LDAP user federation or Dex's LDAP connector.
diff --git a/self-hosted/operations.mdx b/self-hosted/operations.mdx
index 0f8382db..f2a918cf 100644
--- a/self-hosted/operations.mdx
+++ b/self-hosted/operations.mdx
@@ -1,6 +1,6 @@
---
title: License and upkeep
-description: Install, check and renew the self-hosted server's license, upgrade it one release at a time, back it up and restore it, and the log events to alert on
+description: Install, check and renew the self-hosted server's license, upgrade it one release at a time, back it up and restore it, reset lost passkeys, test the mail relay, and the log events to alert on
---
Server commands on this page, such as `license install`, run in a one-off container. [Docker Compose](/self-hosted/docker-compose#run-a-command) and [AWS Fargate](/self-hosted/aws#run-a-command) show how on each platform.
@@ -39,7 +39,7 @@ A file with an end date has a grace after it, written into the file: 21 days for
|---|---|---|
| `active` | Until the end date | Everything |
| `grace` | The end date, until the grace ends | Everything. The Mac shows the grace under **License** in **Settings > Account** |
-| `lapsed` | The end of the grace | Pulls and administration. The server refuses Team Library publishes with `license_expired`, and Macs keep only Team Library; see [Company server](/features/company-server#what-is-different-on-a-company-server) |
+| `lapsed` | The end of the grace | Pulls, administration, and key changes such as Sign Out, approving and removing devices, recovery and resets. The server refuses data uploads with `license_expired`, Team Library publishes included, and changes wait on each Mac; see [Company server](/features/company-server#what-is-different-on-a-company-server) |
A perpetual file has no end date. It covers every release dated up to its end of maintenance, and keeps them running for good. `migrate up`, `serve` and `license install` refuse a later release and name the last date the file covers; `migrate up` refuses before it changes the schema. Extending maintenance is a new file with a later date.
@@ -101,13 +101,13 @@ On AWS, RDS keeps automated backups. Before each upgrade, also take a manual sna
```bash
aws rds create-db-snapshot --db-instance-identifier \
- --db-snapshot-identifier tablepro-before-0-2-0 --query 'DBSnapshot.Status' --output text
-aws rds wait db-snapshot-available --db-snapshot-identifier tablepro-before-0-2-0
+ --db-snapshot-identifier tablepro-before-0-3-0 --query 'DBSnapshot.Status' --output text
+aws rds wait db-snapshot-available --db-snapshot-identifier tablepro-before-0-3-0
```
## Restore a backup
-A restore rolls the Team Library back, while the Macs hold positions past it. `sync new-epoch` makes every Mac take a fresh copy of the library from the restored server.
+A restore rolls the server's sync data back, while the Macs hold positions past it. A new sync epoch makes every Mac take a fresh copy from the restored server, and a Mac on TablePro Sync then sends back the changes it still holds that the restore lost.
@@ -124,8 +124,8 @@ A restore rolls the Team Library back, while the Macs hold positions past it. `s
On AWS, restore the RDS instance to a point in time as a new instance, and point `DATABASE_URL` in a new task definition revision at it.
-
- Once, before the server starts: `docker compose run --rm --no-deps app sync new-epoch`, or the same command as a one-off task on AWS.
+
+ Once, before the server starts: `docker compose run --rm --no-deps app sync new-epoch`, or the same command as a one-off task on AWS. It prints the epoch's ID.
`docker compose up -d`, or the desired count back to 1.
@@ -133,9 +133,52 @@ A restore rolls the Team Library back, while the Macs hold positions past it. `s
-Everything written after the restore point is lost, including what Macs published after it. The Macs take the restored library and drop their newer copy.
+Everything written to the server after the restore point is lost there. Only what a Mac on TablePro Sync still holds comes back. A Mac without TablePro Sync takes the restored Team Library and drops its newer copy.
+Keys come back the same way: each Mac sends back the keys its own account made that the restore lost. Two cases need a person:
+
+- A Mac whose account keys cannot go back shows **Your keys could not be restored**. The person signs out, then uses their recovery key or resets their keys; see [Sync](/features/sync#lost-the-recovery-key).
+- A team key that someone else made waits on each teammate's Mac until that person's device sends it back, then sync carries on by itself. A team key that cannot go back ends the team's keys: an owner creates a new team and shares its connections again.
+
+### The restore check
+
+`serve` also checks for a restore by itself, at start and on each new database connection. It compares the database cluster's system identifier and timeline with the ones it stored. A point-in-time recovery, a promoted standby and a dump restored into a new cluster each change one, and the server opens a new epoch at once and logs `the database was restored, so a new sync epoch started and every app refills` at WARN. A storage snapshot, or a restore into the same cluster, changes neither, so run `sync new-epoch` after every restore. A second epoch costs each Mac one more fresh copy and loses nothing.
+
+A connection pooler between the server and PostgreSQL that keeps its own server connections, such as PgBouncer in transaction mode or RDS Proxy, hides a database swapped behind it. Neither reference deploy has one. Behind one, only `sync new-epoch` after every restore opens the new epoch.
+
+The check reads `pg_control_system()`, `pg_current_wal_insert_lsn()` and `pg_walfile_name()`, which PostgreSQL lets every role run. When it cannot, every TablePro Sync call answers 503 `restore_check_unavailable`, Macs without TablePro Sync still get Team Library, and the server logs why at ERROR:
+
+| `msg` | Fix |
+|---|---|
+| `the restore check cannot read the database's control data, so /v2/sync answers 503 restore_check_unavailable` | The three functions were revoked, or the database has none of them. Run the `grant execute` the log line names, as a superuser |
+| `the database is a standby or still recovering, so /v2/sync answers 503 restore_check_unavailable until it is promoted` | Point `DATABASE_URL` at the primary, or promote the standby |
+| `the database holds sync writes but no identity for the restore check, so /v2/sync answers 503 restore_check_unavailable until sync new-epoch runs` | Stop the server, run `sync new-epoch`, then start it |
+
+## Lost passkeys
+
+Someone who lost every passkey can still use a synced copy at its provider, such as iCloud Keychain or a password manager. Otherwise, run `passkeys reset` with their address, as a one-off command on [Docker Compose](/self-hosted/docker-compose#run-a-command) or [AWS](/self-hosted/aws#run-a-command):
+
+```bash
+docker compose run --rm --no-deps app passkeys reset ada@example.com
+```
+
+It deletes every passkey of the account, the owner's included, and ends its portal sessions. App sessions stay. It prints the account's ID and how many it deleted, never the address, and records `account.passkeys_reset` in the audit log. With an SMTP relay set, the person gets an email. They add a new passkey at their next step-up, after the IdP signs them in again; see [Step-up](/self-hosted/sign-in#step-up).
+
+Nobody resets passkeys from the portal.
+
+Moving the portal to another host makes every passkey useless there. After the move, run `passkeys reset` for everyone who has one, starting with the owner and admins.
+
+## Test the mail relay
+
+With the `SMTP_*` settings in place, send yourself one message:
+
+```bash
+docker compose run --rm --no-deps app mail test you@example.com
+```
+
+It goes straight through the relay, not the server's queue, and prints `The relay at : took the test message .` A failure exits 1 and names the step that failed: connect, tls, authentication, sender, recipient or data. [Email](/self-hosted/settings#email) lists the settings.
+
## Alerts
The server writes one JSON object per line to standard output, with `level` and `msg`. A command that fails, a `serve` that refuses to start and `migrate up` included, writes one more JSON line to standard error, with `"level":"ERROR"`, `"msg":"command failed"`, `command` and `error`, and exits 1. Wrong arguments print the error and the usage as plain text and exit 2, which a filter on the JSON never sees, so alert on the exit code too:
@@ -154,7 +197,7 @@ The server also logs these events once a day and at each start. A metric filter
| `license not installed` | WARN | No license file verifies |
| `license expires soon` | WARN | From 30 days before the end date, unless `LICENSE_RENEWAL=on` |
| `license expired, in grace` | WARN | Past the end date, within the grace |
-| `license lapsed, library pushes refused` | ERROR | Past the grace |
+| `license lapsed, sync pushes refused` | ERROR | Past the grace |
| `license renewal failed` | WARN | With `LICENSE_RENEWAL=on`: no route, a proxy that refused, tablepro.app down, or an answer the server does not take. It tries again the next day |
| `license renewed` | INFO | With `LICENSE_RENEWAL=on`: a later file was installed |
| `license renewal found no newer file` | INFO | With `LICENSE_RENEWAL=on`: nothing newer yet |
@@ -162,4 +205,16 @@ The server also logs these events once a day and at each start. A metric filter
| `idp certificate expiring` | WARN | A trusted SAML signing certificate ends within 30 days |
| `idp certificate expired` | ERROR | A trusted SAML signing certificate has ended, and sign-ins it signs fail |
-`email not sent` at INFO is expected: a self-hosted server sends no email.
+These events come as they happen:
+
+| `msg` | Level | When |
+|---|---|---|
+| `passkey added`, `passkey removed` | INFO | Someone added or removed a passkey. Without a relay, these lines and the audit log are the only notice outside the portal. A filter `{ $.msg = "passkey*" }` catches them |
+| `passkeys reset` | INFO | `passkeys reset` ran. The command writes it to its own standard error |
+| `email off: passkey notices are only in the audit log and these logs; set SMTP_* to send them` | WARN | At start, with no SMTP relay set |
+| `an email failed on its last attempt` | ERROR | A passkey notice never went, after about four hours of retries |
+| `the mail service refused an email` | ERROR | The relay refused the recipient or the message for good |
+| `the database was restored, so a new sync epoch started and every app refills` | WARN | The [restore check](#the-restore-check) found a restored database |
+| Three messages that contain `restore_check_unavailable` | ERROR | Sync is down until the cause is fixed; see [The restore check](#the-restore-check) |
+
+`email not sent` at INFO is expected: a self-hosted server sends no email but the passkey notices, and those only with a relay.
diff --git a/self-hosted/releases.mdx b/self-hosted/releases.mdx
index c2aba434..4180658e 100644
--- a/self-hosted/releases.mdx
+++ b/self-hosted/releases.mdx
@@ -5,6 +5,35 @@ description: What each release of the self-hosted TablePro server image changed,
Read the entry for a release before you upgrade to it, then follow [Upgrades](/self-hosted/operations#upgrades). Each entry names the release's index digest; [Image and keys](/self-hosted/image#verify-the-image) shows how to verify it.
+
+ Index digest `sha256:ecee1a9c3259b00cd3c2001ca47261dab2462ebcaee89331f6dbc992bb0b828d`, tags `0.3.0` and `0.3`.
+
+ - The server side of TablePro Sync. `/v2/sync` keeps each person's own data and query history, and each team's library. Saved passwords and query history are end-to-end encrypted. Macs without TablePro Sync keep using Team Library as before. See [Personal sync and Team Library](/self-hosted/sync).
+ - **Server > Sync** in the portal, for the owner and admins, with three switches: **Personal sync**, **Saved passwords** and **Query history**. Each is on until someone turns it off. Turning one off deletes what the server holds for it, and turning it on again lets the apps send their copies.
+ - **Server > Audit log** in the portal, for the owner and admins, with the server's own events: license files, sync switches, members, devices, key resets and rotations, and restores found.
+ - Step-up is a passkey of the account. A role change, a removal or a restore, a transfer, an invitation to admin, a team API token, turning a sync switch off, and adding or removing a passkey need one from the last 5 minutes. The owner and admins add their first passkey after the IdP signs them in again. See [Step-up](/self-hosted/sign-in#step-up).
+ - With an SMTP relay set (`SMTP_HOST`, `SMTP_PORT`, `SMTP_TLS`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_FROM`), the server emails a person when a passkey is added to or removed from their account, or reset. It sends no other email. `mail test ` checks the relay. See [Email](/self-hosted/settings#email).
+ - `passkeys reset ` deletes every passkey of an account, the owner's included, for someone who lost theirs.
+ - The server checks its database for a restore at start and on each new connection. A point-in-time recovery, a promoted standby or a dump restored into a new cluster opens a new sync epoch by itself, and every app refills. `sync new-epoch` is still the step after any restore, and now prints the epoch's ID.
+ - `serve` refuses to start, and `/readyz` answers 503, while the database's schema is older than the release. Run `migrate up` first, as the reference deploys do.
+ - Removing a member deletes their personal and history sync data 30 days later. Restoring them before then keeps it.
+ - The portal refuses to remove a device of an account with end-to-end keys, with 403 `forbidden`. It still shows **Remove device…**, and the removal fails with "Something went wrong. Try again in a moment." The person removes the device in the app on one of their approved devices; see [A lost Mac](/self-hosted/sync#a-lost-mac).
+ - An invitation to admin can be accepted only by the account whose address from the IdP is the invited one. Any other account gets 403 `invitation_address_mismatch`, and the invitation stays pending.
+ - Every member of a team can read its member list, which the apps need to name members in key alerts.
+ - An app's sign-in can ask for a step-up (RFC 9470 `acr_values`), and its tokens carry `acr` and `auth_time`.
+ - The license's lapsed event is now `license lapsed, sync pushes refused`. A filter on `license*` still catches it. Past the grace, sync pulls and key changes go on, Sign Out, device approval and removal, recovery and resets included, and data pushes are refused until a new file is installed.
+ - New log events to alert on: `passkey added`, `passkey removed` and `passkeys reset` at INFO, `email off` at start without a relay, `an email failed on its last attempt` and `the mail service refused an email` at ERROR, and the restore check's errors, which contain `restore_check_unavailable`. See [Alerts](/self-hosted/operations#alerts).
+
+ To upgrade, from 0.2.0:
+
+ - Take a backup first. `migrate up` applies migrations 00040 to 00051. 00047 moves the Team Library into the new sync store, and going back to 0.2 means restoring the backup.
+ - The portal's host must be a DNS name, not an IP address, since passkeys take no IP address: `ACCOUNT_HOST`, or the host in `ACCOUNT_BASE_URL` when you set it. `migrate up` refuses an IP address before it changes the schema.
+ - 00047 creates the `pgcrypto` extension. PostgreSQL trusts it since 13, so the database owner that `migrate up` connects as creates it, on RDS too.
+ - The restore check runs `pg_control_system()`, `pg_current_wal_insert_lsn()` and `pg_walfile_name()`, which PostgreSQL lets every role run. If they were revoked, `serve` logs the `grant execute` to run as a superuser, and `/v2/sync` answers 503 until it is run.
+ - To email passkey notices, add the `SMTP_*` settings, then run `mail test` with your own address.
+ - After the upgrade, the owner and each admin add a passkey at their first role change or other step-up action. Change one role to try it.
+
+
Index digest `sha256:de9130a22de1439e917fa621b9b22af62fd080ac9cf848b19b2e3e4c1d1885d8`, tags `0.2.0` and `0.2`.
diff --git a/self-hosted/roles.mdx b/self-hosted/roles.mdx
index 8e166344..9795b0d2 100644
--- a/self-hosted/roles.mdx
+++ b/self-hosted/roles.mdx
@@ -5,7 +5,7 @@ description: The server's owner, admins and members, the owner, admin, editor an
A self-hosted server has two layers of roles. The server role decides who runs the server: who creates teams and who removes people. The team role decides what someone does inside one team, as on tablepro.app.
-Changing a role, removing or restoring someone, transferring a team and creating a team API token each need a fresh sign-in through the IdP; see [Step-up](/self-hosted/sign-in#step-up).
+Changing a role, removing or restoring someone, transferring a team and creating a team API token each need a passkey of your account; see [Step-up](/self-hosted/sign-in#step-up).
## Server roles
@@ -54,6 +54,7 @@ Removing someone from the IdP stops their sign-ins, but the seat and some creden
- signs them out of the portal and every app, and they cannot sign in again until restored;
- takes them out of every team, and makes the remover the owner of each team they owned;
- revokes the team API tokens they created and the invitation links they were handed;
-- frees their seat.
+- frees their seat;
+- deletes what they synced with TablePro Sync 30 days later: their own data and query history.
-Only the owner removes an admin, and nobody removes the owner or themselves. **Restore…** lets a removed person sign in again; their next sign-in takes a seat, and their teams are not given back.
+Only the owner removes an admin, and nobody removes the owner or themselves. **Restore…** lets a removed person sign in again; their next sign-in takes a seat, and their teams are not given back. Restored within those 30 days, they keep what they synced.
diff --git a/self-hosted/settings.mdx b/self-hosted/settings.mdx
index dae0a98e..9abdb647 100644
--- a/self-hosted/settings.mdx
+++ b/self-hosted/settings.mdx
@@ -10,8 +10,10 @@ Every setting is an environment variable read at start. A missing or invalid val
| Variable | Default | Meaning |
|---|---|---|
| `PROFILE` | `saas` | Set `selfhosted`. Required |
-| `ACCOUNT_HOST` | | The account portal's hostname, such as `tablepro-account.example.com`. Required |
+| `ACCOUNT_HOST` | | The account portal's hostname, such as `tablepro-account.example.com`. Required, and a DNS name, not an IP address |
| `API_HOST` | | The API's hostname, such as `tablepro.example.com`. Required, and different from `ACCOUNT_HOST`. The license file must name `https://` plus this host |
+| `ACCOUNT_BASE_URL` | `https://` plus `ACCOUNT_HOST` | The portal's address as browsers reach it, with no path. `https`, or `http` on a loopback host. Its host must be a DNS name, not an IP address: passkeys belong to it, and a passkey takes no IP address. `serve`, `migrate up` and every other command refuse an IP address. A trial on one machine over `http` on a loopback host, such as `http://account.localhost:8080` with `ACCOUNT_HOST=account.localhost`, works in Safari and the Mac app: the portal then sets its cookies without `Secure`, which WebKit drops over `http`. Set it only when the portal is not on `https://` plus `ACCOUNT_HOST` |
+| `API_BASE_URL` | `https://` plus `API_HOST` | The API's address as the apps reach it, with no path. Its host must be `API_HOST` |
| `DATABASE_URL` | | A PostgreSQL URL, such as `postgres://tablepro@db.example.com:5432/tablepro?sslmode=verify-full`. Required |
| `PGPASSWORD` | | The database password, kept out of `DATABASE_URL` as the reference deploys do |
| `LISTEN` | `:8080` in the image | The address and port `serve` listens on |
@@ -70,6 +72,28 @@ Durations take Go's form: `90m`, `10h`, `168h`. [Sign-in](/self-hosted/sign-in#s
| `HTTPS_PROXY` | | The proxy every outbound HTTPS call goes through, such as `http://proxy.example.com:3128` |
| `NO_PROXY` | | Comma-separated hosts reached without the proxy, such as an IdP inside your network |
+## Email
+
+The server sends one kind of email: a notice to a person when a passkey is added to or removed from their account, or when `passkeys reset` deletes them. It goes through your SMTP relay, in the person's language, to the address the IdP gives. With no relay, the audit log and the server's log are the only notice.
+
+| Variable | Default | Meaning |
+|---|---|---|
+| `SMTP_HOST` | | The relay's host name or address. Unset sends nothing |
+| `SMTP_TLS` | | `starttls` or `implicit`. Required with `SMTP_HOST`. There is no plaintext mode, and `starttls` fails when the relay offers no STARTTLS |
+| `SMTP_PORT` | `587` with `starttls`, `465` with `implicit` | The relay's port |
+| `SMTP_USERNAME`, `SMTP_PASSWORD` | | Both, or neither for a relay that takes no login. The login is PLAIN, else LOGIN, inside TLS only |
+| `SMTP_FROM` | | One bare address, such as `tablepro@example.com`. Required with `SMTP_HOST`. The emails come from "TablePro" at it |
+
+The server checks the relay's certificate for `SMTP_HOST` against the system's roots, with TLS 1.2 or later. A relay behind a private CA needs it in `SSL_CERT_FILE` or `SSL_CERT_DIR`, as under [Identity provider](#identity-provider). `HTTPS_PROXY` does not apply to the relay.
+
+`serve` checks these settings at start and stops on a mistake, but never connects then, so a relay that is down stops nothing. It logs `email on: passkey notices go through the SMTP relay` at INFO, or the `email off` warning under [Alerts](/self-hosted/operations#alerts). Send yourself a test with `mail test`, as under [Test the mail relay](/self-hosted/operations#test-the-mail-relay). A notice that fails is retried for about four hours, a refused login included, so fixing the settings and restarting still sends it. A relay's permanent refusal of the recipient or the message gives up at once.
+
+`MAIL_POSTAL_ADDRESS`, `MAIL_FROM_ACCOUNT`, `MAIL_FROM_NEWS` and `MAIL_REPLY_TO` are tablepro.app's. A self-hosted server sends no email they apply to, and `SMTP_FROM` is the only sender. `MAIL_POSTAL_ADDRESS` is still checked at start: a value that is not one line of at most 300 characters stops the server.
+
+## Sync
+
+Sync has no environment variable. The owner and admins choose what the server keeps under **Server > Sync** in the portal; see [Personal sync and Team Library](/self-hosted/sync#sync-switches).
+
## Keys
`TABLEPRO_CREDENTIALS` holds the server's keys as one JSON object, from each credential's name to the file's contents. [Image and keys](/self-hosted/image#generate-the-keys) makes it. `serve` refuses to start without `oauth-access`, `entitlement` and an `identity-tokens.`.
@@ -78,4 +102,4 @@ Durations take Go's form: `90m`, `10h`, `168h`. [Sign-in](/self-hosted/sign-in#s
## Refused settings
-The server stops when one of tablepro.app's own settings is set, so a copied configuration cannot reach an outside service: `POLAR_*`, `SES_*`, `NEWSLETTER_LINK_KEY`, `POSTHOG_API_KEY`, `POSTHOG_HOST`, `TURNSTILE_*`, `CRISP_WEBSITE_ID`, `GITHUB_TOKEN`, `WATCHDOG_PING_URL`, `APPLE_*`, `GITHUB_CLIENT_*`, `GOOGLE_CLIENT_*`, `PASSKEY_*`, `LEGACY_*`, `LICENSE_MACHINE_BINDING_*` and `SHARE_CREATE_DISABLED`. `OIDC_ADMIN_GROUP_ID` and `OIDC_DISPLAY_NAME` stop it too: they are now `IDP_ADMIN_GROUP_ID` and `IDP_DISPLAY_NAME`.
+The server stops when one of tablepro.app's own settings is set, so a copied configuration cannot reach an outside service: `POLAR_*`, `SES_*`, `NEWSLETTER_LINK_KEY`, `POSTHOG_API_KEY`, `POSTHOG_HOST`, `TURNSTILE_*`, `CRISP_WEBSITE_ID`, `GITHUB_TOKEN`, `WATCHDOG_PING_URL`, `APPLE_*`, `GITHUB_CLIENT_*`, `GOOGLE_CLIENT_*`, `PASSKEY_*`, `LEGACY_*`, `LICENSE_MACHINE_BINDING_*`, `SHARE_CREATE_DISABLED`, `EMAIL_VERIFICATION_ORIGIN_TRIALS` and `EDUCATION_DOCUMENTS_*`. `PASSKEY_RP_ID` and `PASSKEY_ORIGINS` are among them: a self-hosted server's passkeys belong to the host in `ACCOUNT_BASE_URL`, with that address as their only origin. `OIDC_ADMIN_GROUP_ID` and `OIDC_DISPLAY_NAME` stop it too: they are now `IDP_ADMIN_GROUP_ID` and `IDP_DISPLAY_NAME`.
diff --git a/self-hosted/sign-in.mdx b/self-hosted/sign-in.mdx
index c80023ab..1fc92d47 100644
--- a/self-hosted/sign-in.mdx
+++ b/self-hosted/sign-in.mdx
@@ -1,6 +1,6 @@
---
title: Sign-in through your IdP
-description: Connect the self-hosted TablePro server to AWS IAM Identity Center, another SAML 2.0 IdP such as OneLogin, or an OpenID Connect IdP, how long sessions last, and the fresh sign-in a role change needs
+description: Connect the self-hosted TablePro server to AWS IAM Identity Center, another SAML 2.0 IdP such as OneLogin, or an OpenID Connect IdP, how long sessions last, and the passkey a role change needs
---
People sign in to the portal, and through it to the Mac, with one identity provider, over SAML 2.0 or OpenID Connect. `SAML_IDP_ENTITY_ID` or `OIDC_ISSUER` picks which; set exactly one.
@@ -85,7 +85,7 @@ Identity Center connects an outside application over SAML 2.0 from an organizati
`GroupId` in the answer is the value.
- A [step-up](#step-up) through Identity Center proves only that the person's Identity Center session is still alive. Keep that session short. In the IAM Identity Center console, choose **Settings**, open the **Authentication** tab, and choose **Configure** next to **Session duration**. Under **User interactive sessions**, set 15 minutes, the minimum, and choose **Save**.
+ An owner's or admin's first passkey binds after the IdP signs them in again, and through Identity Center that proves only that the person's Identity Center session is still alive; see [Step-up](#step-up). Keep that session short. In the IAM Identity Center console, choose **Settings**, open the **Authentication** tab, and choose **Configure** next to **Session duration**. Under **User interactive sessions**, set 15 minutes, the minimum, and choose **Save**.
The same duration applies to the AWS access portal, so people sign in there again every 15 minutes too. It applies only to sessions that start after the change. See AWS's [User interactive sessions](https://docs.aws.amazon.com/singlesignon/latest/userguide/user-interactive-sessions.html).
@@ -205,16 +205,48 @@ Removing someone at the IdP ends their sessions within those caps, or at the nex
## Step-up
-These changes in the portal need a sign-in from the last 5 minutes:
+These changes need a passkey of the account, used in the last 5 minutes:
- on **Server > Members**: **Make admin**, **Make member**, **Remove from server…** and **Restore…**;
-- in a team: changing a member's role, removing a member, inviting an admin or making a new link for that invitation, transferring ownership, and creating an API token.
+- on **Server > Sync**: turning a switch off;
+- in a team: changing a member's role, removing a member, inviting an admin or making a new link for that invitation, transferring ownership, and creating an API token;
+- in the portal's **Settings**, under **Passkeys**: adding or removing a passkey.
-Without one, the portal shows **Confirm it's you**, and **Sign in again** sends the person through the IdP and back to the page, where they make the change again. The server asks the IdP to authenticate them again rather than answer from its session: OIDC's `max_age=0`, `prompt=login` unless the IdP's discovery leaves it out, and `auth_time` as an essential claim; SAML's `ForceAuthn`. It then reads when the IdP says the person authenticated, from `auth_time` or the assertion's `AuthnInstant`. No time, or a time more than 3 minutes before the sign-in started, confirms nothing: the portal says "Your organization's sign-in didn't ask you to sign in again, so nothing was confirmed", and the server logs `the IdP's answer does not show it authenticated the person again` at WARN.
+The IdP's sign-in never counts as a step-up, however recent. Passkeys only confirm changes: nobody signs in with one. They belong to the portal's host, and the server fetches no passkey metadata.
-- **AWS IAM Identity Center.** Identity Center does not sign you in again for a stepped-up change; it only checks your session. Set its session duration short, as in the last step under [AWS IAM Identity Center](#aws-iam-identity-center).
+### What owners and admins see
+
+A change without a recent step-up opens **Confirm it's you**. **Use passkey** runs the browser's passkey prompt, such as Touch ID or a security key, and the change goes through. The next changes within 5 minutes ask nothing.
+
+An account with no passkey adds one first, once:
+
+
+
+ The change opens **Add a passkey to confirm changes**. **Sign in again** sends the person to the IdP, which must ask them to authenticate rather than answer from its session, and brings them back to the same page.
+
+
+ **Add a passkey** opens. **Add passkey** runs the browser's prompt, and **Passkey added** says to try the change again.
+
+
+ It asks for the new passkey, as every later step-up does.
+
+
+
+After a portal sign-in, an owner or admin with no passkey is also offered one, with **Skip**. Each passkey after the first needs a step-up with one the account has, so an IdP sign-in alone never adds a second. Removing the last passkey means the next change starts with the IdP again.
+
+The server asks the IdP to authenticate the person again for that first passkey: OIDC's `max_age=0`, `prompt=login` unless the IdP's discovery leaves it out, and `auth_time` as an essential claim; SAML's `ForceAuthn`. It reads when the IdP says the person authenticated, from `auth_time` or the assertion's `AuthnInstant`. No time, or a time more than 3 minutes before the sign-in started, adds nothing: the portal says "Your organization's sign-in didn't ask you to sign in again, so nothing was confirmed", and the server logs `the IdP's answer does not show it authenticated the person again` at WARN.
+
+- **AWS IAM Identity Center.** Identity Center does not sign you in again when asked; it only checks your session. A first passkey then rests on a live Identity Center session. Set its session duration short, as in the last step under [AWS IAM Identity Center](#aws-iam-identity-center).
- **Okta over SAML.** In the app's **General** tab, edit **SAML Settings**, choose **Show Advanced Settings**, and set **Honor Force Authentication** to **Yes**. With **No**, Okta ignores `ForceAuthn`.
+### What members see
+
+Someone who is an owner or admin of neither the server nor a team meets the portal's step-up only when adding or removing a passkey under **Settings**. The Mac asks too: removing a device from **Settings > Account > End-to-End Encryption**, or a key reset that starts empty, opens the browser for a passkey, and someone with none adds a first one through the IdP, as under [What owners and admins see](#what-owners-and-admins-see). See [Sync](/features/sync#end-to-end-encryption).
+
+### Lost passkeys
+
+Another of the account's passkeys still works, and so does a synced copy at its provider. Otherwise, the person who runs the server deletes them all with `passkeys reset`; see [Lost passkeys](/self-hosted/operations#lost-passkeys). The person adds a new one at their next step-up, after the IdP signs them in again. With an [SMTP relay](/self-hosted/settings#email), the server emails the person whenever a passkey is added, removed or reset.
+
-After the owner's first sign-in, change someone's role or remove someone once, and sign in again when the portal asks. The change goes through.
+After the owner's first sign-in, change someone's role once. The portal asks to sign in again, then to add a passkey, then for that passkey, and the change goes through.
diff --git a/self-hosted/sync.mdx b/self-hosted/sync.mdx
new file mode 100644
index 00000000..4f466825
--- /dev/null
+++ b/self-hosted/sync.mdx
@@ -0,0 +1,91 @@
+---
+title: Personal sync and Team Library
+description: What a self-hosted server keeps for each person and each team, which of it is end-to-end encrypted, the switches that limit it, and what to tell people about their keys before they turn on TablePro Sync
+---
+
+Team Library is shared by a team; TablePro Sync is each person's own. Both go through your server once the Macs sign in to it. Team Library needs nothing more. TablePro Sync starts when a person chooses it under **Settings > Sync**, or when a configuration profile chooses it for them, and each person then holds end-to-end keys that nobody running the server can recover.
+
+## What the server keeps
+
+| Data | Comes from | On the server |
+|---|---|---|
+| Team Library: the connections and saved queries a team publishes | The team's owners, admins and editors | Readable records |
+| Team Library passwords: the password, SSH password and TOTP secret of each published connection | The team's owners, admins and editors, with **Saved passwords** on | End-to-end encrypted with the team's key |
+| Connections, groups and tags, projects, SSH and credential profiles, saved queries and their folders, table and database favorites, table folders, and settings | Each person on TablePro Sync, by the categories they choose | Readable records |
+| Saved passwords, key passphrases and TOTP secrets of each person's connections and profiles | Each person on TablePro Sync, with **Passwords** on | End-to-end encrypted |
+| Query history | Each person on TablePro Sync | End-to-end encrypted |
+
+End-to-end encrypted means the Mac seals the value before it sends it: a person's own data with that person's keys, which only their approved devices open, and Team Library passwords with the team's key, which only members an owner or admin confirmed open. The server, its database and its backups hold ciphertext. The readable records are protected by TLS and by your database's own access controls, as Team Library always was: anyone who reads the database or a dump reads them.
+
+The server cannot change where a connection signs in on someone's Mac by itself. A changed host, user, SSH route, SSL setting or startup command, a lower Safe Mode, and a new connection [wait for the person's approval](/features/sync#changes-that-wait-for-your-approval) on each Mac.
+
+Connections a person marks **Local only**, and the sample connections, stay on their Mac. [Sync](/features/sync) covers the Mac's side.
+
+## Before you roll it out
+
+- **The license.** TablePro Sync needs `service_sync` among the license file's features, and Team Library `team_library`. `license status` lists them; ask TablePro for a new file if one is missing.
+- **The Macs.** TablePro Sync needs a TablePro release with **Settings > Sync**. Earlier releases sync Team Library through the server as before.
+- **The switches.** Decide what the server keeps under **Server > Sync**; see [Sync switches](#sync-switches). Every switch starts on.
+- **Team passwords.** A member's Macs open a team's passwords only once an owner or admin of the team confirms that member's keys in the Mac app; see [Passwords in Team Library](/features/team#passwords-in-team-library).
+- **Passkeys.** Removing a lost device, and a key reset that starts empty, ask the person for a passkey in the browser. Someone without one adds their first then, after the IdP signs them in again; see [Step-up](/self-hosted/sign-in#step-up).
+- **The provider, for every Mac.** `PersonalSyncProvider` set to `tablepro-sync` in a configuration profile picks TablePro Sync and locks the choice; see [Company server](/features/company-server#set-the-server-for-every-mac). Nothing uploads before the person reviews it: the Mac shows **Your Organization Uses TablePro Sync** with **Review Upload…**.
+
+## Sync switches
+
+**Server > Sync** in the portal holds three switches, for the owner and admins. Each change is in **Server > Audit log**.
+
+| Switch | Covers | Turned off |
+|---|---|---|
+| **Personal sync** | Each person's own connections, settings, saved passwords and query history | The server deletes everyone's personal data and query history, and takes no more. Each Mac keeps what it has. Team Library keeps working |
+| **Saved passwords** | Passwords saved on personal and team connections | The server deletes every saved password it holds, personal and team. Each Mac keeps its own |
+| **Query history** | Each person's query history | The server deletes the history it holds. Each Mac keeps its own |
+
+Turning a switch off asks first, then for your passkey if you have not used it in the last 5 minutes. Turning it on again needs neither, and the Macs send their copies back up.
+
+A Mac on TablePro Sync says under **Settings > Sync** what the server leaves out:
+
+| Off | The Mac says |
+|---|---|
+| **Personal sync** | "Your server does not keep personal data, so this Mac keeps its own. Team Library goes on syncing." It is the only notice then, and **Passwords** under **What Syncs** shows off and dimmed |
+| **Saved passwords** | "Your server does not sync passwords. Each one stays on this Mac." **Passwords** shows off and dimmed |
+| **Query history** | "Your server does not sync query history. It stays on this Mac." |
+
+Each person's own **Passwords** choice is kept on their Mac, and the switch shows it again once the server syncs passwords.
+
+With **Personal sync** off, **TablePro Sync** is no longer offered to a Mac that is not on it yet. A Mac already on it stays there and keeps its own data.
+
+## Keys
+
+Each person's keys are their own. The server stores public keys and ciphertext, never a key that opens them, so nobody who runs it can recover a person's passwords or history. These are the four things to tell people. [End-to-end encryption](/features/sync#end-to-end-encryption) has the steps.
+
+### The recovery key
+
+The first Mac a person moves to TablePro Sync sets up a recovery key before it uploads anything. The Mac shows it once, with **Copy** and **Print…**, and asks for part of it back before it goes on. It belongs in a password manager or on paper.
+
+The recovery key removes a lost device and approves a Mac when no other device is at hand. **Replace…** under **Settings > Account > End-to-End Encryption** swaps it for a new one, given the current one. Someone who loses it while a Mac still holds the keys resets them from that Mac with **Reset Keys…**: after a wait in which any of their devices can cancel it, **Finish Reset…** on that Mac signs their other devices out to join again from it. Passwords and query history stay. Someone with no device and no recovery key starts over with **Reset and Start Empty…**, which needs their passkey and the same wait; **Finish Reset…** then deletes everything they synced, passwords and query history included. Team libraries stay. [Lost the recovery key](/features/sync#lost-the-recovery-key) has the wait and the steps.
+
+### A new Mac
+
+A Mac signed in to an account that already has keys gets nothing personal until another device or the recovery key approves it. On the new Mac, **Ask Another Device…**. On a Mac that has the keys, **Approve…** under **Waiting for Approval**, then **Approve**. Both show the same five words. When they match in the same order, **The Words Match** on each Mac finishes it; see [Approve another device](/features/sync#approve-another-device).
+
+Words that differ mean someone else may be asking for the keys: **They Don't Match** approves nothing. Tell people to approve only a device they are signing in to right now.
+
+### A lost Mac
+
+From any other approved device, **Remove…** beside the lost Mac under **Devices With Your Keys**. The browser opens for the person's passkey, then the recovery key changes their keys. Before the keys change, the person picks which of their devices keep them and checks the teammates they confirmed while the lost Mac had the keys. Only a device they compared words with that is still signed in can keep them; a removed or signed-out device's keys show **Removed**.
+
+The lost Mac reads nothing synced after that. It signs itself out once the server tells it, and **Settings > Account** there says "This Mac was removed from your account. Sign in again to use it here." Signed in again, it is a new device and waits for approval from another device or the recovery key.
+
+An account with end-to-end keys removes its devices only in the app. On the portal's **Devices** page, server 0.3.0 still shows such an account **Remove device…** and refuses it; see [Self-hosted releases](/self-hosted/releases). The release after it shows no **Remove device…** there, and says the devices are removed in the app on one of the account's approved devices. An account without keys removes a device on that page.
+
+Removing a person from the server signs out every one of their devices, and the server deletes what they synced 30 days later; see [Remove someone](/self-hosted/roles#remove-someone).
+
+### Signing out
+
+**Sign Out** under **Settings > Account** erases that Mac's keys and its Team Library data. After the next sign-in, the Mac waits for approval like a new one.
+
+## When the license ends
+
+Through the grace, the Macs show **Your Server's License Has Expired** with the date sync stops taking changes. Past it they show **Uploads Paused**: they still download, changes wait on each Mac, and Sign Out and approving and removing devices still work. A new license file starts the uploads again. See [When a license ends](/self-hosted/operations#when-a-license-ends).
+
+After a database restore, every Mac takes a fresh copy and sends back what it still holds, with the exceptions under [Restore a backup](/self-hosted/operations#restore-a-backup).
diff --git a/snippets/local-credential-consent.mdx b/snippets/local-credential-consent.mdx
index 88643e58..54ffc1f3 100644
--- a/snippets/local-credential-consent.mdx
+++ b/snippets/local-credential-consent.mdx
@@ -3,6 +3,10 @@ review **Sign In with Credentials from This Mac?**. The dialog names the destina
method. Click **Sign In** to approve that use. Links, Linked Folders and Team Library connections
follow the same rule.
+A Linked Folders or Team Library connection also asks before it uses this Mac's SSH agent, an SSH
+key file, an SSH profile or a database file on this Mac. The same dialog lists each, with the SSH
+server it signs in to, hops from `~/.ssh/config` included.
+
Approval stays on this Mac and covers the connection, destination and sign-in settings shown.
A new destination or added credential use asks again. A background reconnect cannot grant approval:
open the connection yourself to review it.