CLI Commands
A list of CLI commands with descriptions to streamline panel management and configuration.
The Commands section serves as a detailed reference for administrators and advanced users to efficiently manage and configure the PteroCA panel through the command-line interface (CLI). Each command is designed to perform a specific action, such as managing configurations, resetting settings, or troubleshooting issues.
Configuration Commands
Database Configuration
The app:configure-database
command is executed during the initial installation of the panel. It sets up the database connection and configures the necessary settings to enable the panel's functionality.
For a detailed step-by-step guide on using this command, refer to the Basic Configuration section of the documentation.
Example Usage:
This command is a crucial part of the setup process and should be completed before any further configuration.
System Configuration
The app:configure-system
command is used during the initial setup of the panel. It configures key system settings required for the panel to operate seamlessly, such as paths, environment variables, and other foundational options.
For a detailed walkthrough of this command's execution, please refer to the Basic Configuration section of the documentation.
Example Usage:
This command is an essential step in preparing the panel environment and must be run as part of the initial configuration process.
User Management Commands
Create New User
The app:create-new-user
command is used to create a new user in the system by specifying an email, password, and an optional role. While this command is automatically executed during the app:configure-system
process to create the initial administrator account, it can also be run separately to create additional users at any time.
If a connection to the Pterodactyl API is established, this command simultaneously creates a user in Pterodactyl with the same credentials, ensuring seamless integration between the panel and Pterodactyl.
Change User Password
The app:change-user-password
command is used to update the password of an existing user in the system. Like other commands, it integrates with Pterodactyl if an API connection is established, ensuring that the user's password is updated on both the panel and Pterodactyl simultaneously.
If a connection to the Pterodactyl API is established, this command simultaneously changes a user password in Pterodactyl with the same credentials, ensuring seamless integration between the panel and Pterodactyl.
System Commands
Cron Job Schedule
The app:cron-job-schedule
command is a critical system command designed to execute other scheduled commands at defined intervals. It serves as a facade, running specific system maintenance commands that ensure the smooth operation of the panel. This command is intended to be added to a crontab (or a crontab alternative) to automate recurring tasks.
For detailed instructions on adding this command to your crontab, refer to the Crontab Configuration section in the documentation.
Automating with Crontab
To ensure this command runs automatically, add it to your crontab (or an alternative scheduling system). For example, to run this command every hour, use the following crontab configuration:
Refer to the Crontab Configuration section for more details.
Delete Inactive Servers
The app:delete-inactive-servers
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.
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 app:cron-job-schedule
command but can also be run independently when necessary.
Show Missing Translations
The app:show-missing-translations
command is a developer-oriented tool designed to compare two YAML translation files and identify any missing keys in the target file. It is particularly useful in ensuring consistency between translation files during development.
Suspend Unpaid Servers
The app:suspend-unpaid-servers
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.
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 app:delete-inactive-servers
command.
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 app:delete-inactive-servers
command.
Synchronize Data
The app:synchronize-data
command is a utility designed to ensure data consistency between the PteroCA panel and the connected Pterodactyl instance. It is primarily used to synchronize critical data, such as API keys, ensuring seamless integration and communication between the two systems.
At present, this command specifically handles the synchronization of Pterodactyl API keys for users in the PteroCA panel. However, its scope can be extended in the future to include additional synchronization processes as required.
Last updated