How to Install Pterodactyl on OpenBSD

Pterodactyl is an open-source game server controller panel that simplifies the management of game servers. In this tutorial, we will walk you through the installation of Pterodactyl on OpenBSD.

Prerequisites

Before we start, ensure that your OpenBSD server meets the following requirements:

Step 1: Install Dependencies

OpenBSD's packaging system (pkg_add) can automatically install most of the dependencies required by Pterodactyl. Run the following command to install the required dependencies:

$ sudo pkg_add -v php php-curl php-mbstring php-pdo_mysql php-posix \
  php-xml php-zip redis supervisor unzip

Step 2: Install Node.js

Install Node.js from the NodeSource repository. Run the following commands to add the NodeSource repository and install Node.js.

$ sudo pkg_add -v curl 
$ curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E sh -
$ sudo pkg_add -v nodejs yarn

Step 3: Install the Pterodactyl Panel

  1. Navigate to the directory where you want to download Pterodactyl:
$ cd /var/www
  1. Download the latest Pterodactyl panel release (0.7.x) with the following command:
$ sudo curl -Lo Panel.tar.gz https://github.com/pterodactyl/panel/releases/download/v0.7.19/panel.tar.gz
  1. Extract the compressed file:
$ sudo tar -xzvf Panel.tar.gz
  1. Remove the compressed file:
$ sudo rm Panel.tar.gz
  1. Using a web browser, navigate to your server's IP address and port (https://SERVER_IP_ADDRESS:8080) to complete the installation wizard.

Step 4: Install the Pterodactyl Wings Daemon

  1. Download the Wings Daemon:
$ sudo curl -Lo wings https://github.com/pterodactyl/wings/releases/download/v1.3.3/wings_openbsd_amd64
  1. Make the Wings Daemon file executable:
$ sudo chmod +x wings
  1. Create the systemd service file for the Wings daemon:
$ sudo nano /etc/rc.d/wings

Copy and paste the following configuration into the file:

#!/bin/sh

daemon="/usr/local/bin/wings"
daemon_args="--config /etc/pterodactyl/config.yml"
daemon_user="pterodactyl"
daemon_dir="/var/lib/pterodactyl"

. /etc/rc.d/rc.subr

rc_cmd $1

Save and exit the file.

  1. Create the Pterodactyl service user:
$ sudo useradd -m -d /var/lib/pterodactyl -s /bin/bash pterodactyl
  1. Create the Pterodactyl directory:
$ sudo mkdir -p /var/lib/pterodactyl
  1. Change the owner of the Pterodactyl directory to the Pterodactyl service user:
$ sudo chown -R pterodactyl:pterodactyl /var/lib/pterodactyl
  1. Create the Pterodactyl configuration file:
$ sudo mkdir -p /etc/pterodactyl
$ sudo nano /etc/pterodactyl/config.yml 

Copy and paste the following configuration into the file:

# Pterodactyl Wings Configuration
#
# This file configures the core Wings settings such as the token and SSL
# certificates required for secure connections.

debug: false
token: "GENERATE_A_TOKEN"
sftp:
  path: "/usr/bin/sftp"
  url: "http://example.com"
  access_token: ""
   cache:
          path: "/var/cache/wings"
  certificates:
    key: ""
    cert: ""

Substitute the fictional url (http://example.com) with your instance's url.

  1. Enable and start the Pterodactyl Wings daemon:
$ sudo rcctl enable wings
$ sudo rcctl start wings

With the wings daemon started, you should be able to manage game servers from Pterodactyl panel.

Congratulations, you have successfully installed Pterodactyl on OpenBSD!

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!