Skip to content

PteroServer-Upkeep is a lightweight Python utility that monitors and automatically starts offline servers hosted on Pterodactyl game panels. Designed for 24/7 uptime, it ensures your servers stay online with minimal intervention.

Notifications You must be signed in to change notification settings

4realwilly/PteroServer-Upkeep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦– PteroServer-Upkeep

PteroServer-Upkeep is a lightweight Python utility that monitors and automatically starts offline servers hosted on Pterodactyl game panels. Designed for 24/7 uptime, it ensures your servers stay online with minimal intervention.

πŸš€ Features

  • βœ… Monitors multiple servers across multiple panels
  • πŸ” Automatically starts servers that are offline
  • πŸ”§ Robust retry logic for network resilience
  • 🌈 Color-coded terminal output for easy status tracking
  • 🧡 Multi-threaded for fast concurrent checks

πŸ“¦ Requirements

  • Python 3.7+
  • requests
  • colorama
  • urllib3

Install dependencies with:

pip install -r requirements.txt

βš™οΈ Configuration

Create a config.json file in the root directory with the following structure:

{
  "panels": [
    {
      "url": "https://your-panel-url.com",
      "api_key": "your_api_key_here",
      "servers": ["server_id_1", "server_id_2"]
    }
  ]
}
  • url: Your Pterodactyl panel URL
  • api_key: Your client API key (not admin)
  • servers: List of server UUIDs or identifiers

You can add multiple panel objects to monitor servers across different panels.

πŸ›  Usage

Run the script with:

python main.py

It will continuously monitor and start servers as needed. Press Ctrl+C to stop.

πŸ“‹ Output Example

[https://panel.example.com] Server abc123 is running
[https://panel.example.com] Server def456 is offline, starting...
[https://panel.example.com] Server def456 started!

Errors and recoveries are also logged with color-coded messages.

🧠 How It Works

  • Checks each server’s status via the Pterodactyl API
  • If a server is not running, sends a start signal
  • Uses retry logic to handle temporary API/network failures
  • Runs checks every 5 seconds using a thread pool

About

PteroServer-Upkeep is a lightweight Python utility that monitors and automatically starts offline servers hosted on Pterodactyl game panels. Designed for 24/7 uptime, it ensures your servers stay online with minimal intervention.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages