Installation
There are several ways to install moonlight: through the GUI installer, the CLI installer, or manually building it yourself. If you do not plan to develop on the moonlight codebase itself, it is suggested to use the GUI installer.
moonlight installer
The moonlight installer automates the installation process for you. To use it, download and run the installer, download moonlight through it, and then patch a Discord installation. Discord installations are autodetected on your machine.
Keep the installer in the event that a Discord update breaks moonlight, so you can unpatch Discord or update moonlight.
moonlight-cli
A command line installer can be compiled from source manually and used to patch moonlight:
You can specify a custom moonlight dist
directory with moonlight-cli patch -m /path/to/moonlight/dist
.
Manual installations
- Build moonlight.
- Go to your Discord install’s
resources
folder. - Rename the
app.asar
to_app.asar
, and create anapp
folder. Discord will load the folder instead of the.asar
now that it has been renamed. - Create the following files in
resources/app
:
Adjust the /path/to/moonlight/dist
to point to the dist
folder in your locally cloned moonlight install.
You should have the following structure:
Directoryresources
- _app.asar
Directoryapp
- injector.js
- package.json
After first launch, moonlight will create a config directory in the Electron appData
path named moonlight-mod
. Each Discord branch has its own .json
file for configuration.
Browser
moonlight optionally runs in the browser. To use it, build moonlight, and then build the browser extension:
- Manifest v3 (Chrome):
pnpm run browser
- Manifest v2 (Firefox):
pnpm run browser-mv2
The output extension will be at dist/browser
. Chrome users can check “Developer mode” and click “Load unpacked” in chrome://extensions
, and Firefox users can click “Load Temporary Add-on” in about:debugging
.
Browser support is experimental and may be unreliable. Developing extensions or using custom repositories is not supported with the browser extension.
rocketship
Linux users can install a custom Discord build with rocketship and then install moonlight into it. Enable the rocketship extension after installation.