• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Add-ons
  1. MDN
  2. Mozilla
  3. Add-ons
  4. Installing extensions

Installing extensions

In This Article
    1. Windows
    2. macOS
    3. Linux
    4. Example
    5. Disabling install locations
  1. Preventing automatic install from specific locations
    1. Bundling extensions with a custom Firefox

Add-ons using the techniques described in this document are considered a legacy technology in Firefox. Don't use these techniques to develop new add-ons. Use WebExtensions instead. If you maintain an add-on which uses the techniques described here, consider migrating it to use WebExtensions.

From Firefox 53 onwards, no new legacy add-ons will be accepted on addons.mozilla.org (AMO).

From Firefox 57 onwards, WebExtensions will be the only supported extension type, and Firefox will not load other types.

Even before Firefox 57, changes coming up in the Firefox platform will break many legacy extensions. These changes include multiprocess Firefox (e10s), sandboxing, and multiple content processes. Legacy extensions that are affected by these changes should migrate to WebExtensions if they can. See the "Compatibility Milestones" document for more.

A wiki page containing resources, migration paths, office hours, and more, is available to help developers transition to the new technologies.

If you are developing a native tool or application which ships with an associated extension for toolkit-based application, such as Firefox, your native tool can initiate the extension installation by copying the extension into a predefined directory on the user's computer.  The next time that the toolkit-based application (Firefox) is launched, the user will be asked to approve of the installation, and if the user approves, the extension will be automatically loaded for subsequent launches.  If the user has more than one profile, the approval and installation will occur on the next launch of each profile.

Important: No automatic updates will be performed for extensions installed in this way.  Since the extension's files are installed by an native tool, the application expects the native tool to handle performing updates. However, automatic compatibility checks are still performed. 

You must know and use your extension's ID.  For WebExtensions based add-ons, the ID is the value of the applications.gecko.id property within the manifest.json file.  For legacy extensions, the ID is defined in the install.rdf of the extension, between the <em:id></em:id> tags.  Example: {2947c399-a811-3902-82a6-b02634837f8e}

If the extension does not require extraction to work correctly, you may simply copy the extension's xpi to one of the destination folders described below.  All WebExtensions based add-ons do not require being unpacked.  The name of the copied file must be the extension's ID, including the curly brackets, followed by .xpi.   Example filename: {2947c399-a811-3902-82a6-b02634837f8e}.xpi

If your extension needs to be extracted/unpacked,  you should extract the extension to a directory with the same name as the the extension's ID, including the curly brackets, and copy that directory.  Example directory name: {2947c399-a811-3902-82a6-b02634837f8e}  In addition, you must find a line in the install.rdf file that defines unpack as true (e.g. <em:unpack>true</em:unpack>).

If you are developing an extension for Firefox you can use an extension proxy file, which you can use to install an extension without copying the files over to the folders below.

In what follows,

  • <appname> is the name of the application you're installing the extension for.  Example: Firefox
  • <appid> is the ID of the application you're installing the extension for.  Example (for Firefox): {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 
  • <vendor> is the provider of the application you're installing the extension for.  Example:  Mozilla
  • <extensionId> is the ID of your extension, including the curly brackets.  Example: {2947c399-a811-3902-82a6-b02634837f8e}

Windows

Note: Extensions installed to this location will be disabled by default and will be available for all applications with the <appid>.

To install an extension to this location, create a folder with the <appid> in the Extensions folder if it doesn't exist and put your extension folder with the extension's id or proxy file in that folder:

%appdata%\<vendor>\Extensions\<appid>\

For example, for a Firefox extension, that means:

%appdata%\Mozilla\Extensions\{ec8030f7-c20a-464f-9b0e-13a3a9e97384}\<extensionid>\

%appdata% is a system variable pointing to C:\Documents and Settings\Dave\Application Data\ or C:\Users\Dave\AppData\Roaming\, depending on the Windows version.

macOS

To install an extension to be used by all profiles of all users on macOS, copy it to:

/Library/Application Support/<vendor>/Extensions/<appid>/

To install an extension for all profiles of a specific user, copy it to:

~/Library/Application Support/<vendor>/Extensions/<appid>/

Linux

To install an extension to be used by all users on Linux, copy it to:

/usr/lib/<vendor>/extensions/<appid>/

Or...

/usr/lib64/<vendor>/extensions/<appid>/

Or...

/usr/share/<vendor>/extensions/<appid>/

To install an extension just for a specific user:

~/.<vendor>/extensions/<appid>/

Example

For example, if you've created a standalone application for macOS that includes a plugin for Firefox, and you want your extension installed for all Firefox profiles of all macOS user accounts, your installer would extract its extensions files to the following folder:

/Library/Application Support/Mozilla/Extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{dba45d40-f69e-11dc-95ff-0800200c9a66}

"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" is Firefox's application ID, "{dba45d40-f69e-11dc-95ff-0800200c9a66}" is the extension's ID.

In Firefox 4 if the extension can be installed unpacked then you can just copy the XPI to the directory rather than extracting it:

/Library/Application Support/Mozilla/Extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{dba45d40-f69e-11dc-95ff-0800200c9a66}.xpi

Disabling install locations

In some circumstances you may want Firefox to ignore the additional install locations listed above. In this case you can set the preference extensions.enabledScopes to a value that defines which locations Firefox will use. Add up the values for the different locations listed below and set the preference to that (note that it is impossible to disable loading add-ons from the profile directory):

Value Install scope
1 The current users's profile.
2 All profiles of the logged-in user.
4 Installed and owned by Firefox.
8 Installed for all users of the computer.
15 The combination of all scopes.

Preventing automatic install from specific locations

Requires Gecko 8.0(Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)

Starting in Firefox 8 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), you can configure Firefox to not automatically install add-ons from the add-on scopes listed in the table in Disabling install locations. Simply set the value of the preference extensions.autoDisableScopes to the sum of the values for each of the scopes you wish to disable. Setting the value to 0 disables this feature.

Bundling extensions with a custom Firefox

Starting with Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1), you can bundle extensions within a customized Firefox, and they will be installed automatically when the user starts up the application for the first time. See Customizing Firefox for details.

Document Tags and Contributors

Tags: 
  • Add-ons
  • Extensions
  • Guide
 Contributors to this page: bunnybooboo, Mossop, jerrykrinock, Sheppy, Makyen, wbamberg, kaecy, trevorh, xfq, kscarfone, sachin.hosmani, Allasso, Wladimir_Palant, MKaply, Steffen, jswisher, Piro, Mgjbot, Dietrich
 Last updated by: bunnybooboo, Apr 20, 2017, 5:06:12 PM
See also
  1. WebExtensions
  2. Getting started
    1. What are WebExtensions?
    2. Your first WebExtension
    3. Your second WebExtension
    4. Anatomy of a WebExtension
    5. Example WebExtensions
  3. How to
    1. Intercept HTTP requests
    2. Modify a web page
    3. Add a button to the toolbar
    4. Implement a settings page
  4. User interface
    1. Toolbar button
    2. Address bar button
    3. Sidebar
    4. Context menu
    5. Options page
    6. Notifications
  5. Concepts
    1. Using the JavaScript APIs
    2. User interface components
    3. Content scripts
    4. Match patterns
    5. Internationalization
    6. Content Security Policy
    7. Native messaging
  6. Porting
    1. Porting a Google Chrome extension
    2. Porting a legacy Firefox add-on
    3. Embedded WebExtensions
    4. Comparison with the Add-on SDK
    5. Comparison with XUL/XPCOM extensions
    6. Chrome incompatibilities
  7. Firefox workflow
    1. Temporary Installation in Firefox
    2. Debugging
    3. Getting started with web-ext
    4. web-ext command reference
    5. WebExtensions and the Add-on ID
    6. Publishing your WebExtension
  8. JavaScript APIs
    1. Browser support for JavaScript APIs
    2. alarms
    3. bookmarks
    4. browserAction
    5. browsingData
    6. commands
    7. contextMenus
    8. contextualIdentities
    9. cookies
    10. devtools.inspectedWindow
    11. devtools.network
    12. devtools.panels
    13. downloads
    14. events
    15. extension
    16. extensionTypes
    17. history
    18. i18n
    19. identity
    20. idle
    21. management
    22. notifications
    23. omnibox
    24. pageAction
    25. privacy
    26. runtime
    27. sessions
    28. sidebarAction
    29. storage
    30. tabs
    31. topSites
    32. types
    33. webNavigation
    34. webRequest
    35. windows
  9. Manifest keys
    1. applications
    2. author
    3. background
    4. browser_action
    5. chrome_settings_overrides
    6. chrome_url_overrides
    7. commands
    8. content_scripts
    9. content_security_policy
    10. default_locale
    11. description
    12. developer
    13. devtools_page
    14. homepage_url
    15. icons
    16. manifest_version
    17. name
    18. omnibox
    19. options_ui
    20. page_action
    21. permissions
    22. protocol_handlers
    23. short_name
    24. sidebar_action
    25. version
    26. web_accessible_resources
  10. Add-on SDK
  11. Getting started
    1. Installation
    2. Getting started
    3. Troubleshooting
  12. High-Level APIs
    1. addon-page
    2. base64
    3. clipboard
    4. context-menu
    5. hotkeys
    6. indexed-db
    7. l10n
    8. notifications
    9. page-mod
    10. page-worker
    11. panel
    12. passwords
    13. private-browsing
    14. querystring
    15. request
    16. selection
    17. self
    18. simple-prefs
    19. simple-storage
    20. system
    21. tabs
    22. timers
    23. ui
    24. url
    25. webextension
    26. widget
    27. windows
  13. Low-Level APIs
    1. /loader
    2. chrome
    3. console/plain-text
    4. console/traceback
    5. content/content
    6. content/loader
    7. content/mod
    8. content/symbiont
    9. content/worker
    10. core/heritage
    11. core/namespace
    12. core/promise
    13. dev/panel
    14. event/core
    15. event/target
    16. frame/hidden-frame
    17. frame/utils
    18. fs/path
    19. io/byte-streams
    20. io/file
    21. io/text-streams
    22. lang/functional
    23. lang/type
    24. loader/cuddlefish
    25. loader/sandbox
    26. net/url
    27. net/xhr
    28. places/bookmarks
    29. places/favicon
    30. places/history
    31. platform/xpcom
    32. preferences/event-target
    33. preferences/service
    34. remote/child
    35. remote/parent
    36. stylesheet/style
    37. stylesheet/utils
    38. system/child_process
    39. system/environment
    40. system/events
    41. system/runtime
    42. system/unload
    43. system/xul-app
    44. tabs/utils
    45. test/assert
    46. test/harness
    47. test/httpd
    48. test/runner
    49. test/utils
    50. ui/button/action
    51. ui/button/toggle
    52. ui/frame
    53. ui/id
    54. ui/sidebar
    55. ui/toolbar
    56. util/array
    57. util/collection
    58. util/deprecate
    59. util/list
    60. util/match-pattern
    61. util/object
    62. util/uuid
    63. window/utils
  14. Firefox for Android
  15. Getting started
    1. Walkthrough
    2. Debugging
    3. Code snippets
  16. APIs
    1. Accounts.jsm
    2. BrowserApp
    3. HelperApps.jsm
    4. Home.jsm
    5. HomeProvider.jsm
    6. NativeWindow
    7. Notifications.jsm
    8. PageActions.jsm
    9. Prompt.jsm
    10. RuntimePermissions.jsm
    11. Snackbars.jsm
    12. Sound.jsm
    13. Tab
  17. Legacy
  18. Restartless extensions
    1. Overview
  19. Overlay extensions
    1. Overview
  20. Themes
  21. Lightweight themes
    1. Overview
  22. Complete themes
    1. Overview
  23. Publishing add-ons
  24. Guides
    1. Signing and distribution overview
    2. Submit an add-on
    3. Review policies
    4. Developer agreement
    5. Featured add-ons
    6. Contact addons.mozilla.org
  25. Community and support
  26. Channels
    1. Add-ons blog
    2. Add-on forums
    3. Stack Overflow
    4. Development newsgroup
    5. IRC Channel