How to Install Pterodactyl on macOS

Pterodactyl is a free, open-source game server management panel that allows you to host and manage game servers on your own hardware or in the cloud. In this tutorial, we will be covering how to install Pterodactyl on macOS.

Prerequisites

Before we get started, ensure that you have the following prerequisites:

Step 1: Install Required Dependencies

The first step in the installation process is to install the required dependencies. To install the dependencies, open Terminal and execute the following command:

brew install git zip unzip tar openssl mariadb

This command will install git, zip, unzip, tar, OpenSSL, and MariaDB.

Step 2: Install Node.js

After installing the dependencies, the next step is to install Node.js. To install Node.js, open Terminal and execute the following command:

brew install node

This command will install Node.js and its package manager, npm.

Step 3: Download and Install Pterodactyl

Next, we will download and install Pterodactyl. To download and install Pterodactyl, open Terminal and execute the following commands:

cd ~
git clone https://github.com/pterodactyl/panel.git
cd panel
npm install
npm run build:production

This will download and install Pterodactyl in the ~/panel directory.

Step 4: Install Pterodactyl's Dependencies

After installing Pterodactyl, we need to install its dependencies. To install Pterodactyl's dependencies, open Terminal and execute the following commands:

cd ~
git clone https://github.com/pterodactyl/wings.git
cd wings
npm install
npm run build

This will download and install Pterodactyl's dependencies in the ~/wings directory.

Step 5: Configure Pterodactyl

Now, we need to configure Pterodactyl. To configure Pterodactyl, open Terminal and execute the following command:

cd ~/panel
cp .env.example .env

This will create a copy of the .env.example file and name it .env. Next, we need to edit the .env file and configure it with our details. Open the .env file using a text editor and update the following fields:

APP_URL=http://your-domain.com
APP_KEY=

DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pterodactyl
DB_USERNAME=pterodactyl
DB_PASSWORD=your-db-password

MAIL_DRIVER=smtp
MAIL_HOST=your-smtp-host
MAIL_PORT=587
MAIL_USERNAME=your-smtp-username
MAIL_PASSWORD=your-smtp-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your-email@example.com
MAIL_FROM_NAME="Pterodactyl Panel"

SESSION_DRIVER=database
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

Save and close the file after making the changes.

Step 6: Setup MariaDB

Now that we have configured Pterodactyl, we need to setup MariaDB. To setup MariaDB, open Terminal and execute the following commands:

brew services start mariadb

This command will start MariaDB.

mysql -u root

This command will start the MySQL client.

CREATE DATABASE pterodactyl;
GRANT ALL ON pterodactyl.* to 'pterodactyl' IDENTIFIED BY 'your-db-password';
FLUSH PRIVILEGES;
exit

These commands will create the Pterodactyl database, create a user, and grant necessary permissions.

Step 7: Start Pterodactyl Wings

The final step is to start Pterodactyl Wings. To start Pterodactyl Wings, open Terminal and execute the following commands:

cd ~/wings
chmod +x wings
./wings

This command will start Pterodactyl Wings.

That's it! You have successfully installed Pterodactyl on macOS. You can access the Pterodactyl panel by visiting http://your-domain.com in your web browser.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!