Troy Launcher is a Windows-focused Minecraft launcher written in Python. It provides a modern dashboard similar to Lunar Client with integrated Microsoft authentication, curated servers, Java tuning, and automatic Troy Projects mod deployment before the game starts.
- Version presets for Minecraft 1.21, 1.16.5, 1.12.2, and 1.8.9 (labelled as 1.8 PvP) with automatic asset downloading.
- Microsoft login using your own Azure OAuth application and device-safe PKCE redirects.
- Automatic mod sync that downloads the Troy Projects mod from
https://launcher.troyprojects.com/mod.jarfor the selected version. - Quick join servers that pass
--serverand--portflags directly to the vanilla client. - Java configuration including executable override and min/max RAM allocation sliders.
- Update checking against
https://launcher.troyprojects.com/updates/check.phpwith MSI publishing utilities. - Persistent settings stored under
%APPDATA%/TroyLauncher/config.json(or~/.config/TroyLauncheron non-Windows systems).
- Windows 10/11 with Python 3.10+ installed. (Other platforms work for development but Minecraft Java Edition is supported on Windows for this build.)
- Java runtime compatible with the selected Minecraft versions.
pip install -r requirements.txt- An Azure Active Directory application configured for Microsoft login.
- Create an Azure AD application in the Azure Portal.
- Add a redirect URI of
https://login.microsoftonline.com/common/oauth2/nativeclientor a custom URI you plan to paste back into the launcher. - Copy the Client ID into the launcher settings panel.
- If you use a custom redirect, paste it into the Redirect URI field in settings.
The launcher opens the Microsoft login flow in your default browser. After authenticating, copy the final redirect URL and paste it into the prompt to finish linking your account. Refresh tokens are stored securely in the local config file and refreshed automatically.
python -m venv .venv
.\.venv\Scripts\activate # PowerShell on Windows
pip install -r requirements.txt
python main.pyOn first launch, sign in with Microsoft, pick your preferred version, optionally choose a quick-join server, and hit Launch Minecraft. The launcher will:
- Ensure the requested Minecraft version is installed locally using
minecraft-launcher-lib. - Download the Troy Projects mod JAR into the appropriate
mods/<version>/folder (tracked via ETag/Last-Modified headers to avoid unnecessary downloads). - Launch Minecraft with your configured Java executable and RAM limits.
Note: If the Troy Projects mod targets Forge or Fabric you must install the matching loader for the selected version. The launcher installs vanilla Minecraft builds; drop the appropriate Forge/Fabric libraries into the version folder if required.
The updates directory contains optional PHP tooling for Troy Projects to publish MSI installers:
check.php— returns JSON describing the latest release inupdates/releases/latest.jsonand adds anupdateAvailableflag when the launcher sends its current version.index.php— simple upload form for a new MSI and version number. Successful uploads store the installer inupdates/releases/and refreshlatest.json.
Deploy these scripts to https://launcher.troyprojects.com/updates/ (or adjust UPDATE_ENDPOINT in launcher/updater.py). Protect the upload endpoint behind authentication before going live.
The config file captures:
- Microsoft refresh token, profile ID, and display name
- Java executable path
- Min/max RAM values
- Preferred Minecraft version and quick-join server
- Azure Client ID and redirect URI
- Cached metadata for the Troy Projects mod (to avoid redundant downloads)
You can delete the config file to reset the launcher to defaults.
For distribution, package main.py with tools such as PyInstaller or MSIX Packaging Tool. After building an MSI, upload it via updates/index.php so future clients discover the update.