Utilities Licensing

Deploy with MDM

If you manage Macs or Windows PCs with a device management (MDM) tool such as Jamf Pro, Kandji or Microsoft Intune, you can activate TablePlus on them with a license key file. TablePlus reads the file when it starts and activates the key on its own. You can also require your organization's key, so that TablePlus can't be used without it.

License key files work in the latest versions of TablePlus for macOS and TablePlus for Windows. The Setapp version doesn't read them.

Create the key file

The key file is a plain text file named .tplicensekey. Put your license key on the first line:

TP-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
require: true

The require line is optional:

  • require: true: TablePlus can't be used until the key is activated, and users can't activate a different key.
  • require: false, or no require line, activates the key but lets users keep or activate their own license when yours can't be activated.

A few details:

  • Keep the key on the first line. You can also write it as key: TP-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.
  • require also accepts yes and no, 1 and 0, or on and off, and require = true works too. Any other value counts as true.
  • Lines that start with # are comments.

Install the key file on a Mac

Install the file at /Users/Shared/.tplicensekey, owned by root and writable only by root (owner root:wheel, mode 0644). TablePlus then activates the key for every user of the Mac, using one seat for the Mac.

Run this script as root, for example as a script in your MDM policy:

#!/bin/sh
set -e
KEY_FILE="/Users/Shared/.tplicensekey"

# Any user can create files in /Users/Shared: remove whatever is there first
rm -rf "$KEY_FILE"
printf '%s\n' "TP-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" "require: true" > "$KEY_FILE"
chown root:wheel "$KEY_FILE"
chmod 0644 "$KEY_FILE"

Keep the file owned by root and writable only by root, as the script does. TablePlus applies any key file in /Users/Shared, whoever owns it, so a file a user can change or remove lets them get around require.

TablePlus saves the activated license next to the key file, in /Users/Shared/.licensemac. If you create that file in advance, make it writable by every user (mode 0666). If it exists and users can't write to it, activation fails with "TablePlus couldn't save the license in /Users/Shared."

You can also install a key file for a single user, at ~/Library/Application Support/com.tinyapp.TablePlus/.tplicensekey. Users can delete files in their own folder, so TablePlus ignores require there.

Install the key file on Windows

Install the file at C:\ProgramData\TablePlus\.tplicensekey, created by an administrator and read-only for users. TablePlus then activates the key for every user of the PC, using one seat for the PC.

Run this PowerShell script as an administrator or as SYSTEM, for example as a platform script in Intune:

$folder = Join-Path $env:ProgramData "TablePlus"
$file = Join-Path $folder ".tplicensekey"

New-Item -ItemType Directory -Force -Path $folder | Out-Null
# A user may have created the folder first: it becomes the administrators' again, with the default permissions
icacls $folder /setowner "*S-1-5-32-544" | Out-Null
icacls $folder /reset | Out-Null

Remove-Item -Force -ErrorAction SilentlyContinue $file
Set-Content -Path $file -Encoding ASCII -Value "TP-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "require: true"
# Users can read the key file, but not change or remove it
icacls $file /inheritance:r /grant:r "*S-1-5-18:F" "*S-1-5-32-544:F" "*S-1-5-32-545:R" | Out-Null

Keep the folder owned by the administrators and the key file read-only for users, as the script does. TablePlus applies any key file in C:\ProgramData\TablePlus, whoever created it, so a file a user can change or remove lets them get around require.

TablePlus saves the activated license next to the key file, in C:\ProgramData\TablePlus\.licensewindows, and lets every user of the PC change it. Users need to be able to create files in C:\ProgramData\TablePlus, which the default permissions allow. Once a key file is there, every user's TablePlus uses the same device ID, so the PC takes one seat however many users it has.

You can also install a key file for a single user, at %LOCALAPPDATA%\com.tinyapp.TablePlus\.tplicensekey. Users can delete files in their own folder, so TablePlus ignores require there.

What users see

On the Mac or PC What TablePlus does at launch
No license Activates your key without asking.
A license the user entered Tells the user that your organization manages TablePlus on this Mac (or PC), then activates your key in place of theirs. Their seat is freed for another device.
Already activated with your key Nothing. Unlink This Mac (Unlink This Device on Windows) is hidden from the license window.

With require: true:

  • Until your key is activated, TablePlus shows "Activating license key" before it opens any window or connection. If the activation fails, it says why and offers Try Again, Email License Owner when seats run out or updates have ended, Download the Old Build when the version is too new for the license, Download TablePlus when the build was withdrawn, and Quit. It also tries again on its own: every minute while it can't reach the license server, and every 15 minutes otherwise.
  • Users can't activate a different key. When the license window (TablePlus > Register license... on a Mac, Preferences > License on Windows) asks for a key, it shows yours, masked, and activates only that.
  • TablePlus never stops working in the middle of a session. If the Mac or PC loses its license while TablePlus is open, TablePlus tries to activate your key again and shows a notice if it can't. TablePlus is then blocked from its next launch.
  • The first launch needs to reach tableplus.com.

With require: false, if your key can't be activated, users keep their own license, or can activate one, and TablePlus tries your key again at the next launch.

Restrict features and updates

In the License Manager, the TablePlus policy section of a license key applies to every Mac and Windows PC activated with that key:

  • Disable MCP Server, Disable AI Chat and Disable crash reports turn those features off. Users see "Disabled by the license owner" in their place.
  • Disable query history stops TablePlus from recording query history. The History tab shows "Disabled by the license owner", and MCP clients can't read the history. History recorded before stays on the Mac.
  • Updates - macOS keeps the Macs on the version you choose, and Updates - Windows the Windows PCs. Auto updates them to the newest version the license allows.

TablePlus picks up a change at launch and every 6 hours. A Mac or PC that loses its license keeps the last policy for as long as the key file is installed. If you don't see the policy section, ask us to turn it on for your license key.

License Manager: https://tableplus.com/license-manager/access-link

If your MDM tool installs TablePlus updates itself, install only versions your license covers, or the version you chose in Updates - macOS or Updates - Windows. A version released after the license's updates ended can't be activated, and with require: true TablePlus is blocked until an older build is installed.

Change or remove the key

  • Change the key: replace the file. At its next launch, or within 6 hours, TablePlus activates the new key. The old license keeps working until the new key is activated.
  • Rotate the key in the License Manager: update the key file with the new key too. Macs and PCs that are already activated keep working, but one that needs to activate can't use the old key, and with require: true it's blocked.
  • Release a Mac or PC: delete the key file, or empty it. At its next launch or check, TablePlus unregisters it, which frees the seat, and lifts the restrictions.

Troubleshooting

Message What to do
All seats on this license are in use. Remove devices you no longer use in the License Manager, or add seats.
This license key isn't valid. Check the key in the file, especially after you rotate the key.
This version of TablePlus was released after the license's updates ended. Install an older build, or renew the license.
TablePlus couldn't reach the license server. Make sure the Mac or PC can reach tableplus.com.
TablePlus couldn't save the license in /Users/Shared. Remove /Users/Shared/.licensemac, or make it writable by every user.
TablePlus couldn't save the license in C:\ProgramData\TablePlus. Make sure users can create files in C:\ProgramData\TablePlus, and remove a .licensewindows there that users can't change.

A local administrator can still remove the key file. To keep every Mac and PC on a version that supports key files, manage TablePlus updates with your MDM tool.