Automatic Installation

Guide to installing PteroCA using an automated Bash script that downloads and configures all required components.

To facilitate a seamless installation of PteroCA, we've developed an automated Bash script that streamlines the setup process. This script is designed to detect your operating system, install necessary dependencies, configure your environment, and deploy the PteroCA panel with minimal user intervention.

1. Execute the installer

bash -c "$(wget -qO- https://pteroca.com/installer.sh)"
Requirements & Supported OS

Operating System: Ensure your server is running a supported OS:

  • Ubuntu 22.04 (Jammy)

  • Ubuntu 24.04 (Noble)

  • Debian 11 (Bullseye)

  • Debian 12 (Bookworm)

  • Rocky Linux 8

  • Rocky Linux 9

  • AlmaLinux 8

  • AlmaLinux 9

  • CentOS Stream 9

Root Access: The installation must be executed with root privileges.


2. Automatic Installation Process

The script will guide you through the installation process, allowing you to choose between two configuration methods:

  • Web Wizard – A user-friendly web-based setup wizard that simplifies the configuration process.

  • CLI Wizard – A fully interactive command-line setup for users who prefer a terminal-based approach.

Both methods will prompt you to enter essential details, including PHP version selection, domain configuration, Pterodactyl API credentials, and admin account credentials for PteroCA.

Example installation process workflow with Web Wizard
  1. Run the installer:

root@test:~# bash -c "$(wget -qO- https://pteroca.com/installer.sh)"

Starting PteroCA installation... 
Detected OS: ubuntu 22.04 (jammy)

Available PHP versions:
1. PHP 8.2
2. PHP 8.3
3. PHP 8.4 

Select PHP version [1-3]: 1 
Selected PHP version: 8.2

Basic Configuration 
Enter your domain (e.g., panel.example.com): test.pteroca.com

Adding PHP repository... [...]
Adding MariaDB repository... [...]
Updating package manager... [...]
Installing dependencies... [...]
Installing Composer... [...]
Configuring services... [...]
Running mysql_secure_installation... [...]
Setting up database... [...]
Setting up PteroCA application... [...]
Cloning PteroCA repository... [...]
Installing Composer dependencies... [...]
Creating environment configuration... [...]
Verifying database connection... [...]
Executing PteroCA Database Migrations... [...]
Configuring PHP-FPM... [...]
Looking for PHP-FPM configuration... [...]
Configuring NGINX... [...]
Setting up SSL certificate... [...]
Setting up CRON jobs... [...]
Configuring PteroCA application... [...]

Select the initial configuration method:
1) Web Wizard (recommended)
2) CLI
Enter your choice [1-2]: 1

Web Wizard selected. Please complete the configuration via the web interface.
Open your browser and navigate to: https://test.pteroca.com/first-configuration}
 
Performing final checks...

PteroCA installation completed successfully!

Installation Summary:
Domain: test.pteroca.com
PHP Version: 8.2
OS: ubuntu 22.04
Panel URL: https://test.pteroca.com

Database Credentials:
Database Name: pteroca
Database User: pteroca
Database Password: [database password]
Database Host: localhost
MySQL Root Password: [mysql root password]

Credential Files:
MySQL Root Password: /root/.pteroca_mysql
Environment File: /var/www/pteroca/.env

Next Steps: Complete the Initial Configuration
The installation is complete, but you still need to configure your PteroCA instance.
To finalize the setup, please visit the Web Wizard and follow the instructions:
Open your browser and go to: https://test.pteroca.com/first-configuration


Important:
1. Save these credentials in a secure location
2. Configure your firewall to allow ports 80 and 443 (if needed)

Thank you for installing PteroCA!
  1. Navigate to [yourdomain]/first-configuration in your browser. Select your preferred language and click "Start" to begin the setup process.

    Welcome page of web wizard
  2. Follow the guided steps to complete the configuration, providing details such as site settings, Pterodactyl API credentials, email configuration, and the credentials for the first admin account. If you encounter any issues filling in the required information, refer to the Basic Configuration guide for assistance.

Example installation process workflow with CLI wizard
  1. Run the installer:

    root@test:~# bash -c "$(wget -qO- https://pteroca.com/installer.sh)"
    
    Starting PteroCA installation... 
    Detected OS: ubuntu 22.04 (jammy)
    
    Available PHP versions:
    1. PHP 8.2
    2. PHP 8.3
    3. PHP 8.4 
    
    Select PHP version [1-3]: 1 
    Selected PHP version: 8.2
    
    Basic Configuration 
    Enter your domain (e.g., panel.example.com): test.pteroca.com
    
    Adding PHP repository... [...]
    Adding MariaDB repository... [...]
    Updating package manager... [...]
    Installing dependencies... [...]
    Installing Composer... [...]
    Configuring services... [...]
    Running mysql_secure_installation... [...]
    Setting up database... [...]
    Setting up PteroCA application... [...]
    Cloning PteroCA repository... [...]
    Installing Composer dependencies... [...]
    Creating environment configuration... [...]
    Verifying database connection... [...]
    Executing PteroCA Database Migrations... [...]
    Configuring PHP-FPM... [...]
    Looking for PHP-FPM configuration... [...]
    Configuring NGINX... [...]
    Setting up SSL certificate... [...]
    Setting up CRON jobs... [...]
    Configuring PteroCA application... [...]
    
    Select the initial configuration method:
    1) Web Wizard (recommended)
    2) CLI
    Enter your choice [1-2]: 2
    
    Do you want to configure system settings? (yes/no) [yes]:
     > yes
     
    Do you want to set site settings? (yes/no) [yes]:
     > yes
     
    Site URL [http://localhost]:
     > https://test.pteroca.com
     
    Do you want to set email settings? (yes/no) [yes]:
     > no
     
    Do you want to configure pterodactyl panel credentials? (yes/no) [yes]:
     > yes
     
    Pterodactyl Panel URL [http://localhost]:
     > https://pterodactylexampleurl.com
    
    Pterodactyl Panel API Key []:
     > mypterodactylapikey
     
    Do you want to configure payment settings? (yes/no) [yes]:
     > no
     
    Do you want to create user? [yes]:
     > yes
     
    User e-mail []:
     > [email protected]
     
    User password []:
     > TestPassword$
     
    Is user admin? (yes/no) [yes]:
     > yes
     
    Performing final checks...
    
    PteroCA installation completed successfully!
    
    Installation Summary:
    Domain: test.pteroca.com
    PHP Version: 8.2
    OS: ubuntu 22.04
    Panel URL: https://test.pteroca.com
    
    Database Credentials:
    Database Name: pteroca
    Database User: pteroca
    Database Password: [database password]
    Database Host: localhost
    MySQL Root Password: [mysql root password]
    
    Credential Files:
    MySQL Root Password: /root/.pteroca_mysql
    Environment File: /var/www/pteroca/.env
    
    Important:
    1. Save these credentials in a secure location
    2. Configure your firewall to allow ports 80 and 443 (if needed)
    
    Thank you for installing PteroCA!

Based on your inputs, the script will:

  • Install Dependencies: Set up necessary repositories and install required packages, including Nginx, PHP and MariaDB.

  • Configure Services: Set up and secure the database, configure the web server, and ensure all services are running correctly.

  • Deploy PteroCA: Download the latest version of PteroCA, configure environment settings, and set appropriate file permissions.

Upon successful installation, the script will provide: Access URL, Admin Credentials and Database Credentials.

More about the PteroCA configuration process during installation can be found here.

3. Pterodactyl Plugin Installation

Read more about Pterodactyl Configuration and PteroCA Plugin for Pterodactyl here.

Installing the Pterodactyl plugin is recommended, and without it, some PteroCA features will not be available. The PteroCA Plugin for Pterodactyl provides functionalities such as access to the server console, editing server variables directly from the server management panel, SSO Login, and more.

To install the PteroCA Plugin for Pterodactyl, follow these instructions.

Last updated