Skip to content

Run multiple Discord instances simultaneously with persistent logins. Windows GUI/CLI manager supporting Discord stable, PTB, and Canary with isolated profiles and BetterDiscord integration.

License

Notifications You must be signed in to change notification settings

CerealsDev/DiscordMulticlient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Multiclient Manager

A Windows Rust application for managing multiple Discord instances (Discord, PTB, Canary) with persistent logins, automatic cache management, BetterDiscord patching, system startup integration, and easy switching between accounts.

Rust License: MIT Platform

The Problem

Discord supports running multiple instances with the --multi-instance flag, but this comes with two major issues:

  1. You have to log in again every time you restart Discord
  2. Managing multiple instances manually is cumbersome and error-prone

The Solution

Discord Multiclient Manager solves both problems by:

  • Creating persistent profile directories for each instance - your login sessions are saved and persist across restarts
  • Providing both GUI and CLI interfaces for easy management of multiple Discord accounts
  • Supporting all Discord variants - Discord stable, PTB, and Canary
  • Auto-starting instances with program launch or system startup
  • Quick-switching between running instances
  • Automatic cache management to keep your profiles clean

✨ Features

Core Features

  • 🖥️ Dual Interface - Intuitive GUI and powerful CLI
  • 🔐 Persistent Logins - Login once, stay logged in across restarts
  • 🎭 Multiple Variants - Support for Discord stable, PTB, and Canary
  • 🚀 Smart Auto-Start - Two autostart modes:
    • Launch with program - Start instances when the manager launches
    • Launch on system startup - Start instances when Windows boots (creates startup shortcuts)
  • 🔄 Quick Switch - Instantly focus between running Discord windows
  • 💾 Profile Management - Each instance gets its own isolated profile directory

Advanced Features

  • 🧹 Cache Management - Manual and automatic cache clearing
    • Clear cache on demand with one click
    • Auto-clear cache on launch (optional per-instance setting)
    • Works with both custom and default profiles
  • 🎨 BetterDiscord Integration - Install and manage BetterDiscord
    • One-click install/repair/uninstall per Discord variant
    • Automatic instance restart after BD operations
    • Variant-level management (affects all instances of a variant)
    • Backup and restore BetterDiscord data with timestamped archives
  • 📊 Installation Overview - Visual dashboard showing which Discord variants are installed
    • Shows BetterDiscord installation status per variant
    • Direct download links for uninstalled Discord variants
  • ⚙️ Settings Dialog - Configure profile storage location through GUI
  • 🎨 Visual Status Indicators - Color-coded status display
    • Green = Running, Gray = Stopped, Red = Discord not installed
    • Real-time status updates every 2 seconds
    • Detailed autostart mode labels ([AUTO-START: With Program] / [AUTO-START: With Windows])
  • ⚠️ Smart Warnings - Alerts for uninstalled variants with direct download links
  • 🎯 Default Profile Support - Option to use Discord's standard installation

Platform Support

  • Windows - Full support with Windows API window management & startup shortcuts
  • 🔧 Linux - Partial implementation (currently non-functional, in development)

📸 Screenshots

Discord Clone UI Discord Clone UI Discord Clone UI


🚀 Installation

Option 1: Download Pre-built Binary (Recommended)

  1. Go to the Releases page
  2. Download the latest DiscordMulticlient.exe
  3. Run DiscordMulticlient.exe

Option 2: Build from Source

Requirements: Rust 1.91 or later (Install Rust)

# Clone the repository
git clone https://github.com/CerealsDev/DiscordMulticlient.git
cd DiscordMulticlient

# Build with optimizations
cargo build --release

# Run the application
.\target\release\DiscordMulticlient.exe

📖 Usage Guide

GUI Mode (Default)

Launch the application without any arguments:

DiscordMulticlient.exe

The GUI provides:

  • Visual instance list with status indicators (green = running, gray = stopped, red = Discord not installed)
  • Launch/Stop/Focus buttons for each instance
  • Add/Edit/Remove instance management with:
    • Autostart configuration (program launch or system startup)
    • Profile type selection (custom or default)
    • Discord variant selection
    • Cache management options
  • Clear Cache button for manual cache clearing (per instance)
  • Discord Installations - Check which Discord variants are installed
    • BetterDiscord installation status and controls
    • Install/Repair/Uninstall BetterDiscord per variant
    • Backup and restore BetterDiscord data to/from timestamped ZIP files
    • Automatic restart of affected instances after BD operations
  • Settings - Configure profile storage location
  • Launch All / Stop All - Bulk operations
  • Auto-refresh - Status updates every 2 seconds

CLI Mode

The CLI provides full control for automation and scripting with support for all features:

Instance Management

# List all configured instances
DiscordMulticlient list

# Show status of running instances
DiscordMulticlient status

Launch & Stop

# Launch auto-start instances (WithProgram type)
DiscordMulticlient launch

# Launch specific instance
DiscordMulticlient launch "Main Account"

# Launch all instances
DiscordMulticlient launch --all

# Stop specific instance
DiscordMulticlient stop "Main Account"

# Stop all instances
DiscordMulticlient stop --all

# Focus/switch to instance window
DiscordMulticlient focus "Main Account"

Add Instances

# Add instance with all options
DiscordMulticlient add "Work Account" \
  --description "Work Discord account" \
  --data-dir work_profile \
  --variant DiscordPTB \
  --autostart WithWindows \
  --clear-cache

# Add instance with default profile
DiscordMulticlient add "Discord Main" \
  --variant Discord \
  --use-default

# Simple add (uses defaults: DiscordPTB, custom profile, no autostart)
DiscordMulticlient add "Gaming Account"

Options:

  • --description / -D: Description for the instance
  • --data-dir / -d: Custom data directory name (defaults to lowercase instance name)
  • --variant / -v: Discord variant (Discord, DiscordPTB, DiscordCanary) - Default: DiscordPTB
  • --autostart / -a: Autostart mode (None, WithProgram, WithWindows) - Default: None
  • --use-default: Use Discord's default profile instead of custom profile
  • --clear-cache / -c: Automatically clear cache on launch

Edit Instances

# Change autostart mode
DiscordMulticlient edit "Main Account" --autostart WithWindows

# Change Discord variant
DiscordMulticlient edit "Main Account" --variant DiscordCanary

# Rename instance
DiscordMulticlient edit "Main Account" --new-name "Primary Account"

# Enable clear cache on launch
DiscordMulticlient edit "Main Account" --clear-cache true

# Change to default profile
DiscordMulticlient edit "Main Account" --use-default true

# Update description
DiscordMulticlient edit "Main Account" --description "Updated description"

Options:

  • --new-name: New instance name
  • --description: New description
  • --variant: Change Discord variant (Discord, DiscordPTB, DiscordCanary)
  • --autostart: Change autostart mode (None, WithProgram, WithWindows)
  • --use-default: Switch between custom/default profile (true/false)
  • --clear-cache: Enable/disable auto-clear cache (true/false)

Remove Instances

# Remove instance (also removes autostart entries)
DiscordMulticlient remove "Work Account"

Cache Management

# Clear cache for specific instance
DiscordMulticlient clear-cache "Main Account"

BetterDiscord Management

# Install BetterDiscord for a variant
DiscordMulticlient bd install DiscordPTB

# Repair BetterDiscord (re-download and re-patch)
DiscordMulticlient bd repair DiscordPTB

# Uninstall BetterDiscord
DiscordMulticlient bd uninstall DiscordPTB

# Check BetterDiscord status for all variants
DiscordMulticlient bd status

Note: BetterDiscord operations automatically restart affected instances.

Backup Management

# Create BetterDiscord data backup
DiscordMulticlient backup create

# List available backups
DiscordMulticlient backup list

# Restore from backup
DiscordMulticlient backup restore BetterDiscord_Backup_2024-01-15_14-30-45.zip

Backup Location: Backups are saved to your Documents folder with timestamp.

Discord Installations

# Check which Discord variants are installed
DiscordMulticlient installations

Shows installation status and BetterDiscord status for each Discord variant.

Configuration

# Show config file path and profiles directory
DiscordMulticlient config-path

# Edit config in default editor (Notepad)
DiscordMulticlient config-edit

# Launch GUI (same as running without arguments)
DiscordMulticlient gui

⚙️ Configuration

Configuration File Location

%LOCALAPPDATA%\DiscordMulticlient\config.toml

Profile Data Location

%LOCALAPPDATA%\DiscordMulticlient\profiles\*

Autostart Files Location

%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\DiscordMulticlient_*.lnk

Example Configuration

instances_base_dir = "C:\\Users\\YourName\\AppData\\Local\\DiscordMulticlient\\profiles"

[[instances]]
name = "Discord Main Installation"
description = "Default Discord installation"
data_dir = "discord_default"
extra_flags = []
auto_start = false
autostart_type = "None"
use_default_profile = true
variant = "Discord"
clear_cache_on_launch = true

[[instances]]
name = "Main Account"
description = "Primary Discord account"
data_dir = "main"
extra_flags = []
auto_start = false
autostart_type = "WithProgram"
use_default_profile = false
variant = "DiscordPTB"
clear_cache_on_launch = false

[[instances]]
name = "Work"
description = "Work Discord account"
data_dir = "work"
extra_flags = []
auto_start = false
autostart_type = "WithWindows"
use_default_profile = false
variant = "Discord"
clear_cache_on_launch = true

[[instances]]
name = "Gaming"
description = "Gaming Discord account"
data_dir = "gaming"
extra_flags = []
auto_start = false
autostart_type = "None"
use_default_profile = false
variant = "DiscordCanary"
clear_cache_on_launch = false

Configuration Options

Field Type Description
name string Unique identifier for the instance
description string (optional) Human-readable description
data_dir string Profile directory name (relative to base)
extra_flags array Additional command-line flags for Discord
auto_start boolean (Deprecated) Launch automatically when app starts
autostart_type string Autostart mode: "None", "WithProgram", or "WithWindows"
use_default_profile boolean Use Discord's default profile (only one instance per variant should set this)
variant string Discord variant: "Discord", "DiscordPTB", or "DiscordCanary"
clear_cache_on_launch boolean Automatically clear cache before launching

🎯 How It Works

Implementation

  • Uses Discord's Update.exe --processStart Discord.exe launcher (the official method)
  • Sets DISCORD_USER_DATA_DIR environment variable for custom profiles
  • Window focusing via Windows API (no additional tools required)

Autostart System

  • With Program: Instances marked as WithProgram launch when the manager starts
  • With Windows: Creates .lnk shortcut files in Windows Startup folder
    • Location: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\
    • Uses PowerShell to create proper Windows shortcuts
    • Automatically cleaned up when instance is removed or autostart is disabled

Process Management

  • Uses sysinfo crate for cross-platform process monitoring
  • Tracks all Discord sub-processes (main, renderer, GPU, utility, crashpad)
  • When stopping an instance, kills all related processes for clean shutdown
  • Supports variant-specific default profiles for each Discord type

Cache Management

  • Manual clearing: Delete the Cache directory from instance profile
  • Auto-clear on launch: Optional per-instance setting
  • Cache path format: {profile_dir}/{variant_name}/Cache
  • Works with both custom profiles and default profiles

BetterDiscord Integration

  • Installation Management: Install, repair, or uninstall BetterDiscord for each Discord variant
  • Variant-Level: BetterDiscord affects all instances of a variant (e.g., all PTB instances)
  • Automatic Restart: Affected instances are automatically stopped and restarted after BD operations
  • Backup System: Create timestamped ZIP backups of BetterDiscord data
    • Backup location: Documents folder
    • Filename format: BetterDiscord_Backup_YYYY-MM-DD_HH-MM-SS.zip
    • Includes plugins, themes, and settings
    • Restore functionality with file picker
  • Repair Function: Re-download and re-patch BetterDiscord when Discord updates break it
  • Standard Locations: Uses BetterDiscord's standard data directory (%APPDATA%\BetterDiscord)

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🐛 Known Issues & Limitations

  • Linux Support: Currently partially implemented but non-functional. Linux support is planned for future releases.

💡 FAQ

Q: Why do I need this? Can't I just use Discord's multi-instance flag?

A: Yes, you can use --multi-instance, but you'll have to log in every time you restart Discord. This tool creates persistent profiles so you stay logged in.

Q: Can I run Discord stable and Discord PTB at the same time?

A: Yes! You can run any combination of Discord stable, PTB, and Canary simultaneously, each with multiple instances.

Q: Will my login tokens be safe?

A: Yes. Your login data is stored in the same way Discord normally stores it, just in separate profile directories that Discord Multiclient manages.

Q: Does this work with Discord's official clients only?

A: Yes, this is designed for official Discord clients (stable, PTB, Canary). It uses Discord's own multi-instance support.

Q: What happens if I delete the config file?

A: A new config file with default instances will be created automatically based on which Discord variants you have installed. Your existing profile data won't be deleted.

Q: Can I move my profile directories to a different location?

A: Yes! Use the Settings dialog in the GUI, or manually edit instances_base_dir in the config file.

Q: What is BetterDiscord and how does it work with this tool?

A: BetterDiscord is a client modification that adds themes, plugins, and customization to Discord. This tool makes it easy to install/manage BetterDiscord on any Discord variant. Note that BetterDiscord affects ALL instances of a variant (e.g., installing on PTB affects all PTB instances).

Q: What's the difference between "Launch with program" and "Launch with Windows startup"?

A:

  • Launch with program: Instances start when you manually launch DiscordMulticlient
  • Launch with Windows startup: Creates a system startup entry so instances launch automatically when you log into your computer, without needing to open DiscordMulticlient first

Q: How do I remove system startup entries?

A: Simply edit the instance and change the autostart setting back to "None" or "Launch with program". The startup shortcut will be automatically removed.


🌟 Star History

If you find this project useful, please consider giving it a star! ⭐

Star History Chart


📧 Support


Made with ❤️ and Rust

About

Run multiple Discord instances simultaneously with persistent logins. Windows GUI/CLI manager supporting Discord stable, PTB, and Canary with isolated profiles and BetterDiscord integration.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages