How to Set a Default Nextcloud Server URL for Thunderbird Users
As an administrator, you can push your organization's Nextcloud server address to every Thunderbird user. Users then only need to log in with their own Nextcloud account; they do not have to type, or know, the server address.
When the policy is active:
The Nextcloud Server URL field on the settings page is filled in and cannot be changed.
The notice Managed by your organization is shown below the field.
Users still log in with their own Nextcloud credentials.
The address stays filled in after a user clicks Disconnect.
The policy uses the add-on ID thunderbird@sendent.com and the setting serverUrl. Choose the method that fits your platform.
Windows and Linux: policies.json
Create a file called
policies.jsonin Thunderbird'sdistributionfolder. Create the folder if it does not exist.OS
Path
Windows
C:\Program Files\Mozilla Thunderbird\distribution\policies.jsonLinux (deb/rpm)
/usr/lib/thunderbird/distribution/policies.jsonLinux (snap)
/snap/thunderbird/current/distribution/policies.jsonAdd the following content, and replace
https://cloud.example.comwith the address of your Nextcloud server:{"policies": {"3rdparty": {"Extensions": {"thunderbird@sendent.com": {"serverUrl": "https://cloud.example.com"}}}}}Save the file as UTF-8 and restart Thunderbird completely (close all windows).
If you already have a policies.json, add the 3rdparty section to it instead of creating a second file. Each Thunderbird installation needs its own file.
Install the add-on and set the server URL in one file
You can combine this policy with the policy that installs the add-on (see How to Install Nextcloud for Thunderbird):
{ "policies": { "ExtensionSettings": { "thunderbird@sendent.com": { "installation_mode": "force_installed", "install_url": "https://addons.thunderbird.net/thunderbird/downloads/latest/nextcloud-for-thunderbird/latest.xpi" } }, "3rdparty": { "Extensions": { "thunderbird@sendent.com": { "serverUrl": "https://cloud.example.com" } } } }}
Windows: Group Policy (registry)
For domain-joined Windows computers you can set the policy in the registry instead:
Create the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird\3rdparty\Extensions\thunderbird@sendent.comAdd a string value (
REG_SZ) namedserverUrlwith your Nextcloud address as its data, for examplehttps://cloud.example.com.
To roll this out with Group Policy: open the Group Policy Management Console, edit a GPO linked to the right OU, go to Computer Configuration > Preferences > Windows Settings > Registry, and create a registry item with the key and value above.
If both the registry and policies.json contain a policy, the registry policy is used.
macOS: preferences or configuration profile
On macOS, Thunderbird reads policies from the preferences domain org.mozilla.thunderbird. Do not place a policies.json inside Thunderbird.app: macOS blocks changes to the app, and a Thunderbird update would remove the file.
Single Mac (Terminal)
Run these commands, replacing https://cloud.example.com with your Nextcloud address:
sudo defaults write /Library/Preferences/org.mozilla.thunderbird EnterprisePoliciesEnabled -bool TRUEsudo defaults write /Library/Preferences/org.mozilla.thunderbird 3rdparty '{ Extensions = { "thunderbird@sendent.com" = { serverUrl = "https://cloud.example.com"; }; }; }'
Then quit Thunderbird completely (⌘Q) and open it again.
Managed Macs (MDM)
With an MDM solution such as Jamf, Intune or Kandji, deploy a configuration profile with a custom settings payload for the preference domain org.mozilla.thunderbird containing:
<key>EnterprisePoliciesEnabled</key><true/><key>3rdparty</key><dict> <key>Extensions</key> <dict> <key>thunderbird@sendent.com</key> <dict> <key>serverUrl</key> <string>https://cloud.example.com</string> </dict> </dict></dict>
Check that the policy works
Restart Thunderbird completely.
Open the add-on's settings page (see How to Connect Nextcloud for Thunderbird to Nextcloud).
The Nextcloud Server URL field shows your address, is greyed out, and has the notice Managed by your organization below it.
Troubleshooting
The field is empty or can still be edited. On Windows and Linux, check that
policies.jsonis in the correctdistributionfolder, is valid JSON (no trailing commas) and is saved as UTF-8. On macOS, check thatEnterprisePoliciesEnabledis set to true. Then restart Thunderbird completely. Errors are shown in Tools > Developer Tools > Error Console.A user is already connected to another server. The policy only affects the login form. The user must click Disconnect first; the managed address then appears in the field.
Linux Flatpak. The Flatpak version of Thunderbird does not read this
distributionfolder. Use Thunderbird's AutoConfig instead.