How to Install Pterodactyl on Linux Mint
Pterodactyl is a free and open-source game control panel that enables you to manage game servers effortlessly. It is written in PHP and Laravel and is widely used in the gaming community. In this tutorial, we will guide you through the process of installing Pterodactyl on Linux Mint.
Prerequisites
- Linux Mint running on your machine.
- A non-root user with
sudoprivileges. - Apache, MySQL, and PHP already installed on your machine.
Step 1: Install NodeJS
Pterodactyl panel requires NodeJS version 10 or above. To install the latest version of NodeJS, you can follow the below steps.
sudo apt-get update
sudo apt-get install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install nodejs
Step 2: Install Composer
Composer is a package manager for PHP. It allows you to manage and install all the required dependencies for the Pterodactyl panel. To install Composer, you can run the following commands.
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Step 3: Install Pterodactyl Panel
Before proceeding with the installation of the Pterodactyl panel, make sure to switch to the non-root user.
su - username
Now, create a new directory where you want to install the Pterodactyl panel.
mkdir -p ~/pterodactyl
cd ~/pterodactyl
Clone the Pterodactyl panel repository from GitHub using the following command.
git clone https://github.com/pterodactyl/panel.git .
Install all the dependencies using Composer.
composer install --no-dev --optimize-autoloader
Set up the configuration file.
cp .env.example .env
php artisan key:generate --force
nano .env
Note: You can edit the .env file according to your server configuration. Update the APP_URL, DB_DATABASE, DB_USERNAME, and DB_PASSWORD with your own values.
Run the installation script.
php artisan pterodactyl:install
It will prompt you for several details like hostname, database details, email, etc. Fill in all the details as per your requirement.
Step 4: Create a Daemon User
Create a new user that will run the daemon process. This user should not have any login shell or home directory.
sudo adduser --system --shell /bin/false daemon
Give ownership of the daemon files to the daemon user.
chown -R daemon:daemon /var/www/pterodactyl/*
Step 5: Install Pterodactyl Daemon
The Pterodactyl daemon runs on each server that you want to manage. It allows you to start/stop/restart game servers, manage backups, and more.
cd /usr/local/bin
sudo curl -Lo daemon.tar.gz https://github.com/pterodactyl/daemon/releases/latest/download/daemon.tar.gz
sudo tar --strip-components=1 -xzvf daemon.tar.gz
sudo chmod ug+x wings
The daemon is now installed on your machine.
Step 6: Start Pterodactyl Daemon
You can start the daemon process by running the following command.
sudo systemctl start wings
You can also add the daemon process to the startup process so that it starts automatically on the system boot.
sudo systemctl enable wings
Step 7: Access Pterodactyl Panel
Now, go to your web browser and enter the URL http://your-ip-address. You will see the login page for the Pterodactyl panel.
Login with the email and password you provided during the installation process.
Conclusion
You have successfully installed Pterodactyl on your Linux Mint machine. You can now start adding game servers to your panel and manage them effortlessly.