Skip to content

Configuring policies

Firefox enterprise policies can be applied using Group Policy for Active Directory-joined devices, Intune for cloud-based device management, a configuration profile on macOS, or by creating a file called policies.json and setting the contents of the JSON file.

Using a policies.json file is a cross-platform method for configuring the Firefox browser. Firefox checks for the existence of a policies.json file and applies configuration based on its contents. For each operating system, there is a defined location that Firefox will check:

  • On Windows, create a directory called distribution where the Firefox executable is located and place the policies.json file there.
  • On macOS, use a configuration profile instead, see Configuring Firefox on macOS below.
  • On Linux, the policies.json file goes into firefox/distribution, where firefox is the installation directory for firefox, which varies by distribution. Alternatively, you may specify system-wide policy by placing the file in /etc/firefox/policies. For Flatpak, see Configuring a Flatpak package below.

An example policy looks as follows:

policies.json
{
"policies": {
"Homepage": {
"URL": "https://internal.example.com",
"Locked": true
}
}
}

On macOS, deploy policies with a configuration profile for the org.mozilla.firefox preference domain, for example through Jamf or another MDM solution. Set EnterprisePoliciesEnabled to true in the profile, alongside the policies, using the format shown in the macOS section of the policy's reference page.

Install the profile with device scope. A standard user can install user-scope profiles, and policies from them rank below policies from device-scope profiles. To ignore them entirely, set DisableMacOSUserPolicies.

On a Mac without device management, set the same keys system-wide with sudo defaults write:

Terminal window
sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool TRUE
sudo defaults write /Library/Preferences/org.mozilla.firefox DisableAppUpdate -bool TRUE

Nested values are easier to set by joining the keys with __, for example Homepage__URL. See the macOS policy templates for more examples.

The Flatpak build of Firefox runs in a sandbox and cannot read the host's /etc/firefox/policies directory. It reads system-wide policies from an Flatpak extension named org.mozilla.firefox.systemconfig in the sandbox at /app/etc/firefox. Nothing needs to be installed with flatpak install, admins create the directory structure on the host and place policies.json inside it.

To get started, place a policies.json file in a policies subdirectory of the extension directory on the host:

Terminal window
/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/<arch>/<branch>/policies/policies.json

Replace <arch> with the Flatpak architecture of the installed app, such as x86_64 or aarch64, and <branch> with its branch, which is typically stable. Run flatpak list --app --columns=application,arch,branch to check which values apply to a given machine.

For example, on an x86-64 machine running the release channel:

Terminal window
sudo mkdir -p /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/policies
sudo cp policies.json /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/policies/

Restart Firefox for the policies to take effect, then open about:policies to confirm that they were applied.

JSON does not support comments, but it is possible to add extra members to JSON which can serve as comments or annotations. For example, Authentication_Comment is an internal value used for documentation in the following policy:

{
"policies": {
"Authentication": {
"SPNEGO": ["mydomain.com", "https://myotherdomain.com"]
}
"Authentication_Comment": "These domains are required for us"
}
}