documentation/assets/js/60.4717e9d0.js

1 line
28 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{321:function(e,t,a){"use strict";a.r(t);var s=a(15),r=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#picking-a-server-os"}},[e._v("Picking a Server OS")])]),t("li",[t("a",{attrs:{href:"#dependencies"}},[e._v("Dependencies")]),t("ul",[t("li",[t("a",{attrs:{href:"#example-dependency-installation"}},[e._v("Example Dependency Installation")])]),t("li",[t("a",{attrs:{href:"#installing-composer"}},[e._v("Installing Composer")])])])]),t("li",[t("a",{attrs:{href:"#download-files"}},[e._v("Download Files")])]),t("li",[t("a",{attrs:{href:"#installation"}},[e._v("Installation")]),t("ul",[t("li",[t("a",{attrs:{href:"#environment-configuration"}},[e._v("Environment Configuration")])]),t("li",[t("a",{attrs:{href:"#database-setup"}},[e._v("Database Setup")])]),t("li",[t("a",{attrs:{href:"#add-the-first-user"}},[e._v("Add The First User")])]),t("li",[t("a",{attrs:{href:"#set-permissions"}},[e._v("Set Permissions")])])])]),t("li",[t("a",{attrs:{href:"#queue-listeners"}},[e._v("Queue Listeners")]),t("ul",[t("li",[t("a",{attrs:{href:"#crontab-configuration"}},[e._v("Crontab Configuration")])]),t("li",[t("a",{attrs:{href:"#create-queue-worker"}},[e._v("Create Queue Worker")])]),t("li",[t("a",{attrs:{href:"#telemetry"}},[e._v("Telemetry")])])])])])]),t("p"),e._v(" "),t("p",[e._v("Pterodactyl Panel is designed to run on your own web server. You will need to have root access to your server in order to run and use this panel.")]),e._v(" "),t("p",[e._v("You are expected to understand how to read documentation to use this Panel. We have spent many hours detailing how to install or upgrade our\nsoftware; take some time and read rather than copy and pasting and then complaining when things do not work. This panel does\nnot exist as a drag-and-drop service to run your servers. It is a highly complex system requiring multiple dependencies and\nadministrators willing to spend some time learning how to use it. "),t("strong",[e._v("If you expect to be able to install this with no understanding\nof basic linux system administration you should stop and turn around now.")])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Looking for something simple to setup?")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://wisp.gg",target:"_blank",rel:"noopener noreferrer"}},[e._v("WISP"),t("OutboundLink")],1),e._v(" is a Pterodactyl powered SaaS suitable for enterprise and personal use. Offering all the features without the setup hassle, and fully compatible with Pterodactyl eggs. Comparable to MultiCraft or TCAdmin while offering new and unique features. Click here to "),t("a",{attrs:{href:"https://wisp.gg/features",target:"_blank",rel:"noopener noreferrer"}},[e._v("learn more"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"picking-a-server-os"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#picking-a-server-os"}},[e._v("#")]),e._v(" Picking a Server OS")]),e._v(" "),t("p",[e._v("Pterodactyl runs on a wide range of operating systems, so pick whichever you are most comfortable using.")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Pterodactyl does not support most OpenVZ systems due to incompatibilities with Docker. If you are planning on running\nthis software on an OpenVZ based system you will — most likely — not be successful.")])]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Operating System")]),e._v(" "),t("th",[e._v("Version")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("Supported")]),e._v(" "),t("th",[e._v("Notes")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[t("strong",[e._v("Ubuntu")])]),e._v(" "),t("td",[e._v("22.04")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("✅")]),e._v(" "),t("td",[e._v("Requires additional repositories for PHP")])]),e._v(" "),t("tr",[t("td"),e._v(" "),t("td",[e._v("24.04")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("✅")]),e._v(" "),t("td",[e._v("MariaDB can be installed without the repo setup script.")])]),e._v(" "),t("tr",[t("td",[t("strong",[e._v("RHEL / Rocky Linux / AlmaLinux")])]),e._v(" "),t("td",[e._v("8")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("✅")]),e._v(" "),t("td",[e._v("Extra repos are required.")])]),e._v(" "),t("tr",[t("td"),e._v(" "),t("td",[e._v("9")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("✅")]),e._v(" "),t("td")]),e._v(" "),t("tr",[t("td",[t("strong",[e._v("Debian")])]),e._v(" "),t("td",[e._v("11")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("✅")]),e._v(" "),t("td")]),e._v(" "),t("tr",[t("td"),e._v(" "),t("td",[e._v("12")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[e._v("✅")]),e._v(" "),t("td")])])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("ul",[t("li",[e._v("PHP "),t("code",[e._v("8.2")]),e._v(" or "),t("code",[e._v("8.3")]),e._v(" (recommended) with the following extensions: "),t("code",[e._v("cli")]),e._v(", "),t("code",[e._v("openssl")]),e._v(", "),t("code",[e._v("gd")]),e._v(", "),t("code",[e._v("mysql")]),e._v(", "),t("code",[e._v("PDO")]),e._v(", "),t("code",[e._v("mbstring")]),e._v(", "),t("code",[e._v("tokenizer")]),e._v(", "),t("code",[e._v("bcmath")]),e._v(", "),t("code",[e._v("xml")]),e._v(" or "),t("code",[e._v("dom")]),e._v(", "),t("code",[e._v("curl")]),e._v(", "),t("code",[e._v("zip")]),e._v(", and "),t("code",[e._v("fpm")]),e._v(" if you are planning to use NGINX.")]),e._v(" "),t("li",[e._v("MySQL "),t("code",[e._v("5.7.22")]),e._v(" and higher (MySQL "),t("code",[e._v("8")]),e._v(" recommended) "),t("strong",[e._v("or")]),e._v(" MariaDB "),t("code",[e._v("10.2")]),e._v(" and higher.")]),e._v(" "),t("li",[e._v("Redis ("),t("code",[e._v("redis-server")]),e._v(")")]),e._v(" "),t("li",[e._v("A webserver (Apache, NGINX, Caddy, etc.)")]),e._v(" "),t("li",[t("code",[e._v("curl")])]),e._v(" "),t("li",[t("code",[e._v("tar")])]),e._v(" "),t("li",[t("code",[e._v("unzip")])]),e._v(" "),t("li",[t("code",[e._v("git")])]),e._v(" "),t("li",[t("code",[e._v("composer")]),e._v(" v2")])]),e._v(" "),t("h3",{attrs:{id:"example-dependency-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-dependency-installation"}},[e._v("#")]),e._v(" Example Dependency Installation")]),e._v(" "),t("p",[e._v("The commands below are simply an example of how you might install these dependencies. Please consult with your\noperating system's package manager to determine the correct packages to install.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v('# Add "add-apt-repository" command')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("apt")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-y")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" software-properties-common "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("curl")]),e._v(" apt-transport-https ca-certificates gnupg\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Add additional repositories for PHP (Ubuntu 22.04)")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t("span",{pre:!0,attrs:{class:"token environment constant"}},[e._v("LC_ALL")])]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("C.UTF-8 add-apt-repository "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-y")]),e._v(" ppa:ondrej/php\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Add Redis official APT repository")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("curl")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-fsSL")]),e._v(" https://packages.redis.io/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--dearmor")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-o")]),e._v(" /usr/share/keyrings/redis-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb '),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),e._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(' main"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tee")]),e._v(" /etc/apt/sources.list.d/redis.list\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Update repositories list")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("apt")]),e._v(" update\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Install Dependencies")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("apt")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-y")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" php8.3 php8.3-"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v(" mariadb-server nginx "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tar")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("unzip")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" redis-server\n")])])]),t("h3",{attrs:{id:"installing-composer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installing-composer"}},[e._v("#")]),e._v(" Installing Composer")]),e._v(" "),t("p",[e._v("Composer is a dependency manager for PHP that allows us to ship everything you'll need code wise to operate the Panel. You'll\nneed composer installed before continuing in this process.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("curl")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-sS")]),e._v(" https://getcomposer.org/installer "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" php -- --install-dir"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("/usr/local/bin "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--filename")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("composer\n")])])]),t("h2",{attrs:{id:"download-files"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-files"}},[e._v("#")]),e._v(" Download Files")]),e._v(" "),t("p",[e._v("The first step in this process is to create the folder where the panel will live and then move ourselves into that\nnewly created folder. Below is an example of how to perform this operation.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v(" /var/www/pterodactyl\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" /var/www/pterodactyl\n")])])]),t("p",[e._v("Once you have created a new directory for the Panel and moved into it you'll need to download the Panel files. This\nis as simple as using "),t("code",[e._v("curl")]),e._v(" to download our pre-packaged content. Once it is downloaded you'll need to unpack the archive\nand then set the correct permissions on the "),t("code",[e._v("storage/")]),e._v(" and "),t("code",[e._v("bootstrap/cache/")]),e._v(" directories. These directories\nallow us to store files as well as keep a speedy cache available to reduce load times.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("curl")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-Lo")]),e._v(" panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("tar")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-xzvf")]),e._v(" panel.tar.gz\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("chmod")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-R")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("755")]),e._v(" storage/* bootstrap/cache/\n")])])]),t("h2",{attrs:{id:"installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[e._v("#")]),e._v(" Installation")]),e._v(" "),t("p",[e._v("Now that all of the files have been downloaded we need to configure some core aspects of the Panel.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Database Configuration")]),e._v(" "),t("p",[e._v("You will need a database setup and a user with the correct permissions created for that database before\ncontinuing any further. See below to create a user and database for your Pterodactyl panel quickly. To find more detailed information\nplease have a look at "),t("RouterLink",{attrs:{to:"/tutorials/mysql_setup.html"}},[e._v("Setting up MySQL")]),e._v(".")],1),e._v(" "),t("div",{staticClass:"language-sql extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sql"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# If using MariaDB (v11.0.0+) (This is the default when installing Pterodactyl by following the documentation.)")]),e._v("\nmariadb "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("-")]),e._v("u root "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("-")]),e._v("p\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# If using MySQL")]),e._v("\nmysql "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("-")]),e._v("u root "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("-")]),e._v("p\n")])])]),t("div",{staticClass:"language-sql extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sql"}},[t("code",[e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Remember to change 'yourPassword' below to be a unique password")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("CREATE")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("USER")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'pterodactyl'")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("@'127.0.0.1'")]),e._v(" IDENTIFIED "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("BY")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'yourPassword'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("CREATE")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("DATABASE")]),e._v(" panel"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("GRANT")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ALL")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("PRIVILEGES")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("ON")]),e._v(" panel"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("*")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("TO")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'pterodactyl'")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("@'127.0.0.1'")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("WITH")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("GRANT")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("OPTION")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("exit")]),e._v("\n")])])])]),e._v(" "),t("p",[e._v("First we will copy over our default environment settings file, install core dependencies, and then generate a\nnew application encryption key.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cp")]),e._v(" .env.example .env\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("COMPOSER_ALLOW_SUPERUSER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("composer")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" --no-dev --optimize-autoloader\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Only run the command below if you are installing this Panel for")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# the first time and do not have any Pterodactyl Panel data in the database.")]),e._v("\nphp artisan key:generate "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--force")]),e._v("\n")])])]),t("div",{staticClass:"custom-block danger"},[t("p",{staticClass:"custom-block-title"},[e._v("DANGER")]),e._v(" "),t("p",[e._v("Back up your encryption key ("),t("code",[e._v("APP_KEY")]),e._v(" in the "),t("code",[e._v(".env")]),e._v(" file). It is used as an encryption key for all data that needs to be stored securely (e.g. API keys).\nStore it somewhere safe - not just on your server. If you lose it, all encrypted data is irrecoverable, even with database backups.")]),e._v(" "),t("p",[e._v("To grab your "),t("code",[e._v("APP_KEY")]),e._v(", open a terminal and run the following in your panel directory:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" APP_KEY /var/www/pterodactyl/.env\n")])])]),t("p",[e._v("You should see something like:")]),e._v(" "),t("div",{staticClass:"language-text extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("APP_KEY=base64:YOUR_LONG_RANDOM_STRING\n")])])]),t("p",[e._v("Copy that entire line and save it somewhere secure:")]),e._v(" "),t("ul",[t("li",[e._v("A password manager")]),e._v(" "),t("li",[e._v("An encrypted file on your local machine")]),e._v(" "),t("li",[e._v("A secure USB drive")]),e._v(" "),t("li",[e._v("A trusted cloud vault")])]),e._v(" "),t("p",[e._v("Do not keep it only on the server. If you lose this key, your encrypted data is permanently unrecoverable.")])]),e._v(" "),t("h3",{attrs:{id:"environment-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-configuration"}},[e._v("#")]),e._v(" Environment Configuration")]),e._v(" "),t("p",[e._v("Pterodactyl's core environment is easily configured using a few different CLI commands built into the app. This step\nwill cover setting up things such as sessions, caching, database credentials, and email sending.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("php artisan p:environment:setup\nphp artisan p:environment:database\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v('# To use PHP\'s internal mail sending (not recommended), select "mail". To use a')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v('# custom SMTP server, select "smtp".')]),e._v("\nphp artisan p:environment:mail\n")])])]),t("h3",{attrs:{id:"database-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#database-setup"}},[e._v("#")]),e._v(" Database Setup")]),e._v(" "),t("p",[e._v("Now we need to setup all of the base data for the Panel in the database you created earlier. "),t("strong",[e._v("The command below\nmay take some time to run depending on your machine. Please "),t("em",[e._v("DO NOT")]),e._v(" exit the process until it is completed!")]),e._v(" This\ncommand will setup the database tables and then add all of the Nests & Eggs that power Pterodactyl.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("php artisan migrate "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--seed")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--force")]),e._v("\n")])])]),t("h3",{attrs:{id:"add-the-first-user"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#add-the-first-user"}},[e._v("#")]),e._v(" Add The First User")]),e._v(" "),t("p",[e._v("You'll then need to create an administrative user so that you can log into the panel. To do so, run the command below.\nAt this time passwords "),t("strong",[e._v("must")]),e._v(" meet the following requirements: 8 characters, mixed case, at least one number.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("php artisan p:user:make\n")])])]),t("h3",{attrs:{id:"set-permissions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#set-permissions"}},[e._v("#")]),e._v(" Set Permissions")]),e._v(" "),t("p",[e._v("The last step in the installation process is to set the correct permissions on the Panel files so that the webserver can\nuse them correctly.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# If using NGINX, Apache or Caddy (not on RHEL / Rocky Linux / AlmaLinux)")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("chown")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-R")]),e._v(" www-data:www-data /var/www/pterodactyl/*\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# If using NGINX on RHEL / Rocky Linux / AlmaLinux")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("chown")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-R")]),e._v(" nginx:nginx /var/www/pterodactyl/*\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# If using Apache on RHEL / Rocky Linux / AlmaLinux")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("chown")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-R")]),e._v(" apache:apache /var/www/pterodactyl/*\n")])])]),t("h2",{attrs:{id:"queue-listeners"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#queue-listeners"}},[e._v("#")]),e._v(" Queue Listeners")]),e._v(" "),t("p",[e._v("We make use of queues to make the application faster and handle sending emails and other actions in the background.\nYou will need to setup the queue worker for these actions to be processed.")]),e._v(" "),t("h3",{attrs:{id:"crontab-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#crontab-configuration"}},[e._v("#")]),e._v(" Crontab Configuration")]),e._v(" "),t("p",[e._v("The first thing we need to do is create a new cronjob that runs every minute to process specific Pterodactyl tasks, such\nas session cleanup and sending scheduled tasks to daemons. You'll want to open your crontab using "),t("code",[e._v("sudo crontab -e")]),e._v(" and\nthen paste the line below.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("* * * * * php /var/www/pterodactyl/artisan schedule:run "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">>")]),e._v(" /dev/null "),t("span",{pre:!0,attrs:{class:"token operator"}},[t("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[e._v("2")]),e._v(">")]),t("span",{pre:!0,attrs:{class:"token file-descriptor important"}},[e._v("&1")]),e._v("\n")])])]),t("h3",{attrs:{id:"create-queue-worker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-queue-worker"}},[e._v("#")]),e._v(" Create Queue Worker")]),e._v(" "),t("p",[e._v("Next you need to create a new systemd worker to keep our queue process running in the background. This queue is responsible\nfor sending emails and handling many other background tasks for Pterodactyl.")]),e._v(" "),t("p",[e._v("Create a file called "),t("code",[e._v("pteroq.service")]),e._v(" in "),t("code",[e._v("/etc/systemd/system")]),e._v(" with the contents below.")]),e._v(" "),t("div",{staticClass:"language-text extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("# Pterodactyl Queue Worker File\n# ----------------------------------\n\n[Unit]\nDescription=Pterodactyl Queue Worker\nAfter=redis-server.service\n\n[Service]\n# On some systems the user and group might be different.\n# Some systems use `apache` or `nginx` as the user and group.\nUser=www-data\nGroup=www-data\nRestart=always\nExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3\nStartLimitInterval=180\nStartLimitBurst=30\nRestartSec=5s\n\n[Install]\nWantedBy=multi-user.target\n")])])]),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Redis on RHEL / Rocky Linux / AlmaLinux")]),e._v(" "),t("p",[e._v("If you are using RHEL, Rocky Linux, or AlmaLinux, you will need to replace "),t("code",[e._v("redis-server.service")]),e._v(" with "),t("code",[e._v("redis.service")]),e._v(" at the "),t("code",[e._v("After=")]),e._v(" line in order to ensure "),t("code",[e._v("redis")]),e._v(" starts before the queue worker.")])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("If you are not using "),t("code",[e._v("redis")]),e._v(" for anything you should remove the "),t("code",[e._v("After=")]),e._v(" line, otherwise you will encounter errors\nwhen the service starts.")])]),e._v(" "),t("p",[e._v("If you are using redis for your system, you will want to make sure to enable that it will start on boot. You can do that by running the following command:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" systemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("enable")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--now")]),e._v(" redis-server\n")])])]),t("p",[e._v("Finally, enable the service and set it to boot on machine start.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" systemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("enable")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--now")]),e._v(" pteroq.service\n")])])]),t("h3",{attrs:{id:"telemetry"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#telemetry"}},[e._v("#")]),e._v(" Telemetry")]),e._v(" "),t("p",[e._v("Since 1.11, Pterodactyl will collect anonymous telemetry to help us better understand how the\nsoftware is being used. To learn more about this feature and to opt-out, please see our "),t("RouterLink",{attrs:{to:"/panel/1.0/additional_configuration.html#telemetry"}},[e._v("Telemetry")]),e._v("\ndocumentation. Make sure to continue with the rest of the installation process.")],1),e._v(" "),t("h4",{attrs:{id:"next-step-webserver-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#next-step-webserver-configuration"}},[e._v("#")]),e._v(" Next Step: "),t("a",{attrs:{href:"./webserver_configuration"}},[e._v("Webserver Configuration")])])])}),[],!1,null,null,null);t.default=r.exports}}]);