Starting with Firefox 64 and Firefox ESR 60.4, Firefox supports configuration files on macOS.
An example plist file with all options is available here: https://github.com/mozilla/policy-templates/blob/master/mac/org.mozilla.firefox.plist
Setting policies from the command line
If you want to set specific options from the command line, we also provide flattened shortcuts to any item that is nested in the plist file.
For example, this policy:
Would be set in the plist file like this:
<key>Homepage</key> <dict> <key>URL</key> <string>http://example.com</string> </dict>
Correctly writing the nested value with the defaults command can be hard, so you can flatten the keys by separating them with __, like this:
sudo defaults write /Library/Preferences/org.mozilla.firefox Homepage__URL -string "http://example.com"
Enable policies from the command line
Before any command line policies will work, you need to enable policies like this:
sudo defaults write /Library/Preferences/org.mozilla.firefox EnterprisePoliciesEnabled -bool TRUE