> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Personal sync and Team Library

> 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](https://docs.tablepro.app/features/sync.md#changes-that-wait-for-your-approval) on each Mac.

Connections a person marks **Local only**, and the sample connections, stay on their Mac. [Sync](https://docs.tablepro.app/features/sync.md) 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](https://docs.tablepro.app/features/team.md#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](https://docs.tablepro.app/self-hosted/sign-in.md#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](https://docs.tablepro.app/features/company-server.md#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](https://docs.tablepro.app/features/sync.md#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](https://docs.tablepro.app/features/sync.md#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](https://docs.tablepro.app/features/sync.md#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 Mac with more than one user account

Each user account on a Mac that signs in is a device of its own, with its own keys, approved like [a new Mac](#a-new-mac). With an earlier server or Mac version, everyone signed in on one Mac shares one device, and each approval locks the others out. Once both are updated, the first user account to open TablePro keeps that device; each other one is signed out once, signs in again and is approved as a new device.

### 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. From server 0.4.0, the portal's **Devices** page shows such an account no **Remove device…**, and says the devices are removed in the app on one of the account's approved devices. Server 0.3.0 still shows **Remove device…** there and refuses it; see [Self-hosted releases](https://docs.tablepro.app/self-hosted/releases.md). 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](https://docs.tablepro.app/self-hosted/roles.md#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](https://docs.tablepro.app/self-hosted/operations.md#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](https://docs.tablepro.app/self-hosted/operations.md#restore-a-backup).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.