Server Management
Commands for synchronizing, suspending, and deleting servers in PteroCA.
Sync Servers
The pteroca:server:sync command is a maintenance utility designed to synchronize server records between your Pterodactyl panel and PteroCA.
Its primary function is to detect and remove orphaned servers - those that exist in PteroCA but no longer exist in Pterodactyl.
It iterates over the servers in batches, checks their existence, and removes the missing ones. You can run it interactively, with confirmation prompts for each deletion, or in automatic mode for cron-based cleanups.
Command:
pteroca:server:syncAlias:
pteroca:sync-servers(deprecated, removed in v1.0.0)
Options
--limit[=LIMIT]: Maximum number of servers to check in one run (default: 1000)--dry-run: Show what would be done without making any changes--auto: Automatically delete orphaned servers without asking for confirmation (suitable for cron jobs)
Examples
# Recommended (v0.6+)
docker exec pteroca_web_dev php bin/console pteroca:server:sync --limit=500
# Dry run to see what would be deleted
docker exec pteroca_web_dev php bin/console pteroca:server:sync --dry-run
# Automatic mode for cron jobs
docker exec pteroca_web_dev php bin/console pteroca:server:sync --auto
# Deprecated (still works until v1.0.0)
docker exec pteroca_web_dev php bin/console pteroca:sync-servers --limit=500Interactive Mode
Interactive Mode (when not using --auto):
Confirm Deletion - Prompt:
Do you want to delete server <name>#<identifier> from PteroCA?(Default:yes)
Automatic Mode (--auto):
Deletes orphaned servers immediately without user confirmation
Suitable for scheduled/cron jobs
Finalize Sync:
Removes orphaned servers from PteroCA
Leaves valid servers untouched
Outputs a summary of changes (or actions in
--dry-runmode)
Suspend Unpaid Servers
The pteroca:server:suspend-unpaid command is a critical maintenance utility that automatically suspends servers whose payment obligations have not been met. This ensures proper billing compliance and prevents unpaid servers from utilizing resources.
Command:
pteroca:server:suspend-unpaidAlias:
app:suspend-unpaid-servers(deprecated, removed in v1.0.0)
When a server is suspended, it is flagged as inactive in the PteroCA panel and also suspended in the connected Pterodactyl instance (if the API connection is configured). Suspended servers can be reactivated if the client completes the payment. However, servers that remain suspended for an extended period may eventually be deleted by the pteroca:server:delete-inactive command.
Examples
Important Notes
Payment Reactivation: Clients can reactivate suspended servers by completing their payment. Once payment is verified, the server will automatically resume normal operation.
Prolonged Suspension: Servers that remain unpaid and suspended for a prolonged period are subject to permanent deletion via the pteroca:server:delete-inactive command.
Delete Inactive Servers
The pteroca:server:delete-inactive command is a maintenance utility responsible for removing servers that have been suspended due to non-payment or inactivity for a prolonged period. This ensures that resources are not wasted on servers that are no longer in use.
Command:
pteroca:server:delete-inactiveAlias:
app:delete-inactive-servers(deprecated, removed in v1.0.0)
When executed, this command permanently deletes suspended servers both from the PteroCA panel and the linked Pterodactyl instance (if the API connection to Pterodactyl is configured). It is typically part of the scheduled tasks executed by the pteroca:cron:schedule command but can also be run independently when necessary.
Examples
Automation
These commands are typically automated via the cron scheduler:
pteroca:server:suspend-unpaid- Runs every minutepteroca:server:delete-inactive- Runs hourly (if enabled)
See Cron Scheduler Command for more details on automation.
Related Guides
CLI Commands Overview - Command reference home
Cron Scheduler - Automate server management
User Management Commands - Manage users
Last updated