Skip to content
Terndesk

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

LinuxmacOSWindows
Data folder~/.local/share/com.terndesk.mail/~/Library/Application Support/com.terndesk.mail/%LOCALAPPDATA%\com.terndesk.mail\
Mail databasetern.db in the data folder, with tern.db-wal and tern.db-shm beside it while it is in usesamesame
Log~/.local/share/com.terndesk.mail/logs/tern.log~/Library/Logs/com.terndesk.mail/tern.log%LOCALAPPDATA%\com.terndesk.mail\logs\tern.log
Keyring entriesSecret Service, service com.terndesk.maillogin keychain, service com.terndesk.mailCredential 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:

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).

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:

  1. 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.
  2. Before uninstalling, in Settings: turn off Start at login (General), remove tern-cli if 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.)
  3. Delete the data folder and the log folder from the table above (and a dev.tern.mail folder 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.
  4. Delete the keyring entries for com.terndesk.mail, and for dev.tern.mail if you used 0.2.8 or earlier (Linux: Seahorse "Passwords and Keys", or secret-tool; macOS: Keychain Access; Windows: Credential Manager → Windows Credentials, the entries named after either). Homebrew's brew uninstall --zap --cask terndesk removes the macOS folders but leaves the keychain entries.
  5. 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.