Your data
From the Terndesk user guide. For anything it doesn't answer, see Help or write to hello@terndesk.com.
Everything Terndesk knows is on your computer: your mail, the search index, settings, rules, snippets, drafts, and scheduled sends, snoozes and reminders. Nothing goes to a Terndesk server (there is none). Secrets (sign-ins, passwords, an AI key) are in the system keyring instead, see Accounts → The system keyring.
Where it is
| Linux | macOS | Windows | |
|---|---|---|---|
| Data folder | ~/.local/share/com.terndesk.mail/ | ~/Library/Application Support/com.terndesk.mail/ | %LOCALAPPDATA%\com.terndesk.mail\ |
| Mail database | tern.db in the data folder, with tern.db-wal and tern.db-shm beside it while it is in use | same | same |
| Log | ~/.local/share/com.terndesk.mail/logs/tern.log | ~/Library/Logs/com.terndesk.mail/tern.log | %LOCALAPPDATA%\com.terndesk.mail\logs\tern.log |
| Keyring entries | Secret Service, service com.terndesk.mail | login keychain, service com.terndesk.mail | Credential Manager, entries for com.terndesk.mail |
Settings file (tern.env, only if you made one) | ~/.config/tern/ | ~/Library/Application Support/tern/ | %APPDATA%\tern\ |
On Windows, paste %LOCALAPPDATA% into File Explorer's address bar to get to the folder. On Linux the data folder follows $XDG_DATA_HOME if you set it. The data folder is readable only by you. Settings → Storage shows the database's size and path, with Open folder and Copy path, and the log's path, with Open log. Paths there start from your home folder, written ~ (on Windows from %LOCALAPPDATA%), so your user name isn't on screen; Copy path copies the whole path.
Versions up to 0.2.8 kept everything under the name dev.tern.mail (~/.local/share/dev.tern.mail/ and so on, and keyring entries under that service). The first start of a later version moves the folder to the name above by itself, and copies each sign-in the first time it is read (the old entries stay for now, so 0.2.8 still finds them). If an older Terndesk is still running, Terndesk says so and doesn't start until you quit it. If the folder can't be moved now (an AI assistant has the mail open through tern-mcp, a file is in use), Terndesk uses the old folder, says why in the log and tries again at the next start; nothing is deleted before its copy is checked. To go back to 0.2.8, rename the folder back to dev.tern.mail first.
The data folder also holds tern.sock (how tern-cli reaches the running app) and tern.opened-files/ (private copies of attachments you opened in another app, cleared when Terndesk quits).
The log records what Terndesk did: account addresses and errors, never the content of your mail. A key or click that took the window longer than a tenth of a second to answer is noted too, with how long it took, but never what you typed. It is kept under 4 MB (tern.log and the previous tern.log.1) and is sent nowhere.
How much mail is kept
Settings → General → Keep mail offline for sets the period (1 month, 3 months, 6 months, 1 year, 2 years, 5 years or all mail; 1 year by default). "Download large attachments automatically" (on by default) downloads every attachment of that mail, so files open without a connection; when it is off, large messages arrive with their text and the names of their files only, and the files download when you open them.
Settings → General → Background work says what happens to that downloading, and to automatic AI categories, on battery and on a metered connection. Automatic (the default) runs them less often on battery and pauses the downloads on a metered connection (Linux, as NetworkManager reports it; on a Mac, a phone's hotspot or a Wi-Fi network with Low Data Mode turned on). It notices as soon as you plug in, unplug or change networks. Always run ignores both; Pause background work stops them until you change it. While they are paused Settings says why, with Resume once, which lets them run until your power or network next changes. New mail, sending, undo, snoozes, reminders and scheduled sends are never delayed, and a conversation or file you open downloads at once in every mode.
Settings → General → Search inside PDF and text attachments (off by default) reads the text of the PDFs and plain-text, CSV and JSON files that are already on this computer, so Files can search inside them (press T there). It runs in the background under the same Background work setting, keeps a search index of that text in the same database as your mail, downloads nothing and sends nothing anywhere. Turning it off deletes that index; a deleted message, mail cleared by Free up space and a removed account take their files' text with them.
Shortening the period limits future downloads; it doesn't delete mail already downloaded. In Settings → Storage:
- Free up space… (per account) clears the text and attachments of mail older than the period, except mail in the inbox, unread, starred or with a draft. The conversations stay in their lists and search still finds them by their words; one downloads again when you open it. Nothing changes on the server, and nothing is cleared automatically.
- Re-sync this account… deletes the mail stored for that account and downloads it again, for when a mailbox looks wrong or incomplete. Settings, drafts, snoozes, reminders and unsent messages are kept.
- Make the file smaller… shows when your mail database was created by an earlier version of Terndesk and has a lot of free room inside it. Such a file keeps its size when you free up space or remove an account. Terndesk restarts, rewrites the file without the free room (about two minutes for 7 GB; it opens by itself when done), and from then on freed room goes back to the disk by itself. Your mail, settings and drafts stay as they are. It needs about twice the remaining size free on the disk while it runs.
Backing up
Your mail itself is on your mail provider's servers; what exists only on this computer is your settings and local work (drafts not yet synced, scheduled sends, snoozes, reminders, follow-ups).
- Settings: Settings → Backup & sync → Export settings to a file saves
terndesk-settings-<date>.jsonin your Downloads folder: rules, splits and their order, saved searches, snippets, sender moves, VIPs, senders you know, signatures and identities, keyboard shortcuts, AI labels and "About me", and preferences. It never contains passwords, sign-ins or API keys, the AI provider and model, knowledge files, the zoom, how much mail is kept offline, or whether large attachments download by themselves. Import settings from a file… restores one and keeps everything else. - Settings in your mailbox: "Keep my settings in this mailbox" (same tab) keeps the same settings in a hidden message in your own mailbox (a
Tern/Settingslabel in Gmail, aTerndeskfolder in a Microsoft mailbox and on other servers), so every computer that turns it on stays in step, and signing in on a new computer offers Restore. Your snoozes, "remind me if no reply" reminders and muted conversations go with it (in a hidden message of their own), so a snoozed conversation comes back on every computer at the same time and a muted one stays muted everywhere. Scheduled sends and follow-ups stay on the computer that has the message. In Gmail, some changes that come from the copy wait under Waiting for you in the same tab until you allow them, because Gmail can't tell Terndesk who put a message under the label: VIPs, "I know this sender" (no phishing warnings), "always load images", a sender moved to Important, Other or Notifications, notification settings that silence alerts (off, quiet hours with no day, delivery times), a rule that keeps mail in the inbox, and an edit or the removal of a rule that blocks mail or skips the inbox. This includes what you changed yourself on another computer, and everything after Restore on a new computer. If you didn't add them, don't allow them: Don't allow removes the change from the copy and from your other computers. Everything else, signatures and snippets included, applies at once; Microsoft and other mail servers are checked differently and apply everything at once. - Everything: quit Terndesk (
Ctrl+Q, or Quit in the tray: closing the window may only hide it), then copy the whole data folder, including anytern.db-walandtern.db-shmfiles. Copying onlytern.dbwhile Terndesk runs can miss the latest changes.
Moving to another computer
The simplest way: install Terndesk there, turn on "Keep my settings in this mailbox" on the old computer (or export a settings file and copy it over), add your accounts on the new one and choose Restore (or import the file). Mail downloads again from the server.
A licence covers a number of computers, and the old one keeps its place until you free it: on the old computer, remove the licence first (Settings → Licence → Remove from this computer…), then enter your key on the new one. A computer that is gone for good (a dead disk, a reinstall) can't do that: write to hello@terndesk.com with your key and ask for its place to be freed.
To bring everything, including local drafts, scheduled sends, snoozes and reminders: quit Terndesk on both computers, copy the old data folder to the same place on the new one (see the table above; the folder differs between Linux, macOS and Windows), and start Terndesk. Passwords and sign-ins are in the old computer's keyring and don't come along, so sign in to each account again (the warning at the top of the window, or Settings → Accounts).
Uninstalling
Removing the app (with your package manager, by deleting the AppImage or the Mac app, or with Settings → Apps → Terndesk → Uninstall on Windows) leaves your data in place, so a reinstall picks up where you were. To remove everything:
- Remove the licence first: Settings → Licence → Remove from this computer…. That frees this computer's place for another one. Uninstalling doesn't, and a licence left on a computer that is gone keeps its place until you write to hello@terndesk.com.
- Before uninstalling, in Settings: turn off Start at login (General), remove
tern-cliif you installed it (Command line), turn off "Keep my settings in this mailbox" with Remove the copy from this mailbox and "Run my rules as Gmail filters" if you use them. (Remove each account from Settings → Accounts too if you want Google to forget Terndesk's access.) - Delete the data folder and the log folder from the table above (and a
dev.tern.mailfolder beside it, if one is left from 0.2.8 or earlier; on Windows the uninstaller deletes that too). On Windows the uninstaller does this for you when you tick Delete app data and sign-ins (that also removes the Credential Manager entries, step 4); left unticked, your mail data stays. - Delete the keyring entries for
com.terndesk.mail, and fordev.tern.mailif you used 0.2.8 or earlier (Linux: Seahorse "Passwords and Keys", orsecret-tool; macOS: Keychain Access; Windows: Credential Manager → Windows Credentials, the entries named after either). Homebrew'sbrew uninstall --zap --cask terndeskremoves the macOS folders but leaves the keychain entries. - Delete
~/.config/tern/(Linux),~/Library/Application Support/tern/(macOS) or%APPDATA%\tern\(Windows) if it exists.
The guide
This is the user guide built into Terndesk, as of version 0.2.21 (f66f67b3). In the app, it's Help: the user guide in the command palette, and it reads offline.