Skip to content

Manage whitelisting the same users on multiple Pterodactyl servers using this simple webui with an administrator backend

License

Notifications You must be signed in to change notification settings

Jthiess/PterodactylWhitelister

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pterodactyl Minecraft Whitelist Manager

A Flask-based web application to collect Minecraft and Discord usernames, convert them to Mojang UUIDs, and manage server whitelist files directly on Pterodactyl-managed Minecraft servers.

Features

  • Public Signup: Users submit their Minecraft and Discord usernames for approval.

  • Admin Panel: HTTP Basic Auth–protected dashboard to:

    • View, enable/disable, or delete whitelist requests.
    • Automatically discover all Pterodactyl servers under your API key.
    • Toggle whitelist syncing for individual servers.
  • Automated Sync: Regenerate and push /whitelist.json and run whitelist reload every 10 minutes or immediately upon changes.

Tech Stack

  • Python 3.8+
  • Flask
  • SQLite (default; easily switchable to MySQL/PostgreSQL)
  • Pterodactyl API via pydactyl
  • APScheduler for background tasks
  • Flask-HTTPAuth for admin authentication
  • python-dotenv for environment variable management

Installation

  1. Clone the repo

    git clone https://github.com/NerdAler1/PterodactylWhitelister.git
    cd pterodactyl-whitelist-manager
  2. Create a virtual environment and install dependencies

    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Environment Variables Copy the example file and fill in your values:

    cp .env.example .env

    Edit .env:

    FLASK_SECRET=your_flask_secret_key
    ADMIN_CREDS={"alice":"password1","bob":"password2"}
    PTERO_API_URL=https://panel.yourdomain.com
    PTERO_API_KEY=your_pterodactyl_api_key
    SYNC_INTERVAL=10
  4. Run the app

    flask run

    By default, the app listens on http://127.0.0.1:5000/.

Usage

  • Public Form: Visit / to submit a Minecraft username and Discord tag.

  • Admin Dashboard: Visit /admin and authenticate with one of the credentials in ADMIN_CREDS.

    • View all pending and approved requests.
    • Enable/disable or delete entries.
    • Toggle whitelist syncing for each Pterodactyl server.

Database Schema

  • whitelist

    Column Type Description
    id INTEGER Auto-increment primary key
    mc_username TEXT Submitted Minecraft username
    mc_uuid TEXT Mojang UUID
    discord_username TEXT Submitted Discord username
    approved INTEGER 0 = pending, 1 = approved
    created_at DATETIME Timestamp of submission
  • ptero_servers

    Column Type Description
    id INTEGER Auto-increment primary key
    name TEXT Server name from Pterodactyl API
    server_id TEXT Unique Pterodactyl server identifier
    enabled INTEGER 0 = syncing disabled, 1 = syncing enabled

 Possible Future Plans

  • Discord Verifier I would like the discord username field to actually check if users are in a discord server, that way only discord server members can actually sign up (obviously this would not be foolproof, but its possible to cut down on spam.)

License

MIT © Jack Thiess

AI Disclaimer

This README, as well a lot of the web UIs, were created using the assistance of AI. Additionally AI autocomplete was used during the creation of the entire project.

About

Manage whitelisting the same users on multiple Pterodactyl servers using this simple webui with an administrator backend

Resources

License

Stars

Watchers

Forks

Packages

No packages published