PteroCA.com
v0.5.1
  • Introduction
  • Getting Started
    • Installation
      • Automatic Installation
      • Manual Installation
      • Basic configuration
    • Updating
    • Troubleshooting
  • Frequently Asked Questions (FAQ)
  • Guidebook
    • Features Overview
    • Product Configuration
    • Customization
    • Themes
    • CLI Commands
    • PteroCA Pterodactyl Addon
    • Enable Pterodactyl SSO Login
  • Contributing
    • Translations
Powered by GitBook
On this page
  • Dependencies
  • Composer
  • Download files
  • Clone repository
  • Set permissions
  • Crontab configuration
  • Next step
  1. Getting Started
  2. Installation

Manual Installation

Step-by-step instructions for manually installing PteroCA, including server setup, dependencies, and panel deployment.

Please note, this project is currently in an early version (0.x.x) and may contain bugs. Use it at your own risk.

It is beneficial to have some prior knowledge of Linux and MariaDB before starting this installation, as this will help ensure a smoother setup process.

To manually install PteroCA, follow the instructions below.


Dependencies

To install and run PteroCA.com, you'll need to have the following dependencies installed on your system:

PHP and Extensions

  • PHP 8.2 or higher

  • Required PHP extensions: cli, ctype, iconv, mysql, pdo, mbstring, tokenizer, bcmath, xml, curl, zip, intl, fpm (if using NGINX)

Database

  • MySQL 5.7.22 or higher (MySQL 8 recommended) OR

  • MariaDB 10.2 or higher

Additional Tools

  • Git

  • Composer v2 (Dependency Manager for PHP)

  • Curl

  • Tar

  • Unzip

Example Dependency Installation

Below is an example of how you might install the required dependencies on a Debian or Ubuntu-based system. These commands assume you're using PHP 8.2 and installing MariaDB and NGINX:

# Add "add-apt-repository" command
apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg

# Add additional repositories for PHP and MariaDB (for Debian 11 and Ubuntu 22.04)
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

# Update repositories list
apt update

# Add universe repository if you are on Ubuntu 18.04
apt-add-repository universe

# Install Dependencies
apt -y install php8.2 php8.2-{cli,ctype,iconv,mysql,pdo,mbstring,tokenizer,bcmath,xml,intl,fpm,curl,zip} mariadb-server nginx tar unzip git

Composer

If you already have Composer installed, you can skip this step!

Composer is a powerful dependency manager for PHP. It allows us to handle and install all the necessary libraries and packages that your project needs. Before proceeding, make sure you have Composer installed on your server.

To install Composer globally, run the following command:

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

This will install Composer globally on your machine, making it accessible from anywhere by running the composer command.

Once installed, verify it by running:

composer -v

This should print the installed Composer version.


Download files

The first step to getting PteroCA.com running is to set up the directory where the panel will be installed. You will then clone the repository directly from our GitHub and install required composer dependencies.

Clone repository

Here’s an example of how to create a directory for the panel and navigate into it:

# Create a directory for PteroCA and move into it
mkdir -p /var/www/pteroca && cd /var/www/pteroca

# Clone the PteroCA repository into the newly created directory
git clone https://github.com/pteroca-com/panel.git ./

# Install composer dependecies
composer install --no-dev --optimize-autoloader

This command will create a new folder at /var/www/pteroca, clone the PteroCA codebase, and place all the necessary files into this directory.

Once the repository is cloned, you're ready to proceed with the setup process.

Set permissions

The final step in the installation process is to set the correct permissions on project files. This ensures that the web server can properly read and write to the necessary directories, such as logs, cache, and file uploads.

Set ownership

You should restrict web server ownership only to the directories that require write access, such as var/ and public/uploads/. This helps to avoid exposing sensitive files to unnecessary access.

# NGINX or Apache on Ubuntu/Debian (or similar):
chown -R www-data:www-data /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

# NGINX on CentOS:
chown -R nginx:nginx /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

# Apache on CentOS:
chown -R apache:apache /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

This ensures that only the directories requiring write access (var/ and public/uploads/) are owned by the web server user, while the rest of the project remains protected.

Set permissions

Now, set the correct permissions for these directories, allowing the web server to write to them.

chmod -R 775 /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

This ensures that the web server user can read, write, and execute in these directories, while other users can only read and execute.


Crontab configuration

To ensure that critical tasks, such as billing users hourly or suspending unpaid servers, are processed correctly, you need to set up a cron job that runs every minute. This cron job will automatically execute the necessary commands for maintaining your Dashboard.

Open Crontab

Run the following command to edit your crontab configuration:

crontab -e

If prompted to select a text editor, choose your preferred option (typically option 1).

Add the cron job

Scroll to an empty line without a # at the beginning, then add the following entry:

* * * * * php /var/www/pteroca/bin/console app:cron-job-schedule >> /dev/null 2>&1

Save the changes in your editor and close it. The cron job is now active and will run automatically every minute.


Next step

PreviousAutomatic InstallationNextBasic configuration

Last updated 2 months ago

Once the installation is complete, proceed to the section to set up your PteroCA environment and integrate it with your Pterodactyl panel.

Basic Configuration