Supervise N isolated Apollo / Sunshine instances on a single Windows host so multiple Moonlight clients can connect to the same machine as if it were several hosts.
Each "seat" advertises itself in Moonlight with its own mDNS name, port range, state directory, and audio sink. Pair each Moonlight client to the seat it should use.
Written in Rust (single static .exe, ~3 MB) using the official windows-rs bindings, tray-icon from the Tauri ecosystem, and winit for the event loop. No Python, no PyInstaller bundle, no AV false-positives.
apollo-fleet/
├── src/
│ ├── main.rs # CLI dispatch (tray, --launch, --list-sinks, --dry-run)
│ ├── config.rs # TOML loading + validation
│ ├── seat.rs # generates sunshine.conf + apps.json, spawn/stop
│ ├── fleet.rs # supervisor loop, lazy spawn, circuit breaker
│ ├── launcher.rs # --launch mode (called by Apollo's apps.json)
│ ├── tray.rs # tray-icon menu + actions
│ ├── shared_state.rs # JSON state in %APPDATA%/apollo-fleet
│ ├── singleton.rs # bind 127.0.0.1:47999 to enforce single instance
│ ├── paths.rs # %APPDATA% / %TEMP% helpers
│ └── win/ # Win32 calls (windows-rs)
├── resources/
│ └── seats.toml.example
├── config/
│ └── seats.toml.example # mirrored for hand-editing without rebuilding
├── scripts/
│ └── check-audio-sinks.ps1
└── .github/workflows/release.yml
cargo build --release
.\target\release\apollo-fleet.exe # tray mode
.\target\release\apollo-fleet.exe --list-sinks # audio endpoints
.\target\release\apollo-fleet.exe --supervisor # CLI supervisor (no tray)
.\target\release\apollo-fleet.exe --dry-run # generate per-seat configs onlyOn first run the binary copies seats.toml.example to %APPDATA%\apollo-fleet\seats.toml. Edit that file:
apollo_path: full path tosunshine.exestate_dir: where per-seat state goes (keep it on a fast disk)- One
[[seat]]per Moonlight client, each with a uniqueport(40+ apart) and ideally a distinctaudio_sink
Run as Administrator so Apollo can create virtual displays.
CI builds a Windows binary on every v* tag and attaches ApolloFleet.exe to the resulting GitHub release. Local cut:
git tag -a v0.2.0 -m "v0.2.0"
git push origin v0.2.0Apollo limits 4 simultaneous instances. Each seat should capture from a distinct virtual playback sink so clients don't share audio.
- Steam Streaming Speakers (bundled with Steam)
- VB-Cable — 1 extra sink (free)
- Voicemeeter Potato — 3 extra sinks (free)
- Starts the first seat eagerly. Spawns the next seat only when every currently-spawned seat has an active client (debounced). The fleet always has exactly one idle seat ready, never more.
- Restarts a seat if Apollo exits unexpectedly. After 3 exits in 30 seconds the seat is marked dead (circuit breaker).
- Suppresses Apollo's own tray icon by locating its zserge/tray hidden window via
EnumWindows/GetClassNameWand callingShell_NotifyIconW(NIM_DELETE). - Detects active clients via
GetTcpTable2(no shelling tonetstat). - When a client connects, identifies the newly-created virtual display (set difference vs. baseline) and moves the host's foreground window onto it.
The first seat in seats.toml is the master. Its Apollo web UI at https://localhost:{port+1}/ is the source of truth for shared settings (encoder, bitrate, fps, etc.). When you save changes there, Apollo Fleet:
- Detects the change to the master's
sunshine.confvia a file watcher. - Rewrites every non-master seat's
sunshine.conf: master's keys, except per-seat ones (port,sunshine_name,audio_sink, paths, gamepad-only flags), which are preserved from the seat's existing conf. - Restarts the affected non-master seats (master stays running).
So one save in the master web UI propagates to the whole fleet. Per-seat customizations stay isolated.
- USAGE.md — full installation, configuration, troubleshooting, FAQ
- SECURITY.md — how to report security issues
- LICENSE — GPL-3.0-or-later
Apollo Fleet is released under the GNU General Public License v3.0 or later. You may use, modify, and redistribute it — including commercially — but any distributed copy or derivative work must also be GPL-licensed and ship with corresponding source. See LICENSE for the full text.