Merge remote-tracking branch 'parkervcp/master'

This commit is contained in:
Michael (Parker) Parker 2018-10-28 21:10:29 -04:00
commit dbbfd921e7
16 changed files with 828 additions and 11 deletions

View File

@ -0,0 +1,14 @@
[pterodactyl]
user = nginx
group = nginx
listen = /var/run/php-fpm/pterodactyl.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0750
pm = ondemand
pm.max_children = 9
pm.process_idle_timeout = 10s
pm.max_requests = 200

View File

@ -0,0 +1,66 @@
server_tokens off;
server {
listen 80;
server_name <domain>;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name <domain>;
root /var/www/pterodactyl/public;
index index.php;
access_log /var/log/nginx/pterodactyl.app-access.log;
error_log /var/log/nginx/pterodactyl.app-error.log error;
# allow larger file uploads and longer script runtimes
client_max_body_size 100m;
client_body_timeout 120s;
sendfile off;
# SSL Configuration
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_prefer_server_ciphers on;
# See https://hstspreload.org/ before uncommenting the line below.
# add_header Strict-Transport-Security "max-age=15768000; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header X-Frame-Options DENY;
add_header Referrer-Policy same-origin;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/pterodactyl.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
include /etc/nginx/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}

View File

@ -24,7 +24,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";

View File

@ -45,7 +45,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";

View File

@ -36,12 +36,17 @@ module.exports = {
// text: 'API Reference',
// link: '/api/'
// },
{
text: 'Community Guides',
link: '/community/about.md',
},
{
text: 'Get Help',
link: 'https://pterodactyl.io/discord'
}
],
sidebar: [
sidebar: {
'/project/': [
{
title: 'Project Information',
collapsable: false,
@ -95,7 +100,200 @@ module.exports = {
// '/',
// ]
// }
],
'/panel/': [
{
title: 'Project Information',
collapsable: false,
children: [
'/project/introduction.md',
'/project/about.md',
'/project/terms.md',
]
},
{
title: 'Panel',
collapsable: false,
children: [
'/panel/getting_started',
'/panel/webserver_configuration',
'/panel/upgrading',
'/panel/configuration',
'/panel/troubleshooting',
]
},
{
title: 'Daemon',
collapsable: false,
children: [
'/daemon/installing',
'/daemon/upgrading',
'/daemon/configuration',
'/daemon/kernel_modifications',
'/daemon/debian_8_docker',
]
},
{
title: 'Tutorials',
collapsable: false,
children: [
'/tutorials/mysql_setup.md',
'/tutorials/creating_ssl_certificates.md',
],
},
{
title: 'Development & Ops',
collapsable: true,
children: [
'/ops/publish_release.md',
],
},
// {
// title: 'API Reference',
// collapsable: true,
// children: [
// '/',
// ]
// }
],
'/daemon/': [
{
title: 'Project Information',
collapsable: false,
children: [
'/project/introduction.md',
'/project/about.md',
'/project/terms.md',
]
},
{
title: 'Panel',
collapsable: false,
children: [
'/panel/getting_started',
'/panel/webserver_configuration',
'/panel/upgrading',
'/panel/configuration',
'/panel/troubleshooting',
]
},
{
title: 'Daemon',
collapsable: false,
children: [
'/daemon/installing',
'/daemon/upgrading',
'/daemon/configuration',
'/daemon/kernel_modifications',
'/daemon/debian_8_docker',
]
},
{
title: 'Tutorials',
collapsable: false,
children: [
'/tutorials/mysql_setup.md',
'/tutorials/creating_ssl_certificates.md',
],
},
{
title: 'Development & Ops',
collapsable: true,
children: [
'/ops/publish_release.md',
],
},
// {
// title: 'API Reference',
// collapsable: true,
// children: [
// '/',
// ]
// }
],
'/tutorials/': [
{
title: 'Project Information',
collapsable: false,
children: [
'/project/introduction.md',
'/project/about.md',
'/project/terms.md',
]
},
{
title: 'Panel',
collapsable: false,
children: [
'/panel/getting_started',
'/panel/webserver_configuration',
'/panel/upgrading',
'/panel/configuration',
'/panel/troubleshooting',
]
},
{
title: 'Daemon',
collapsable: false,
children: [
'/daemon/installing',
'/daemon/upgrading',
'/daemon/configuration',
'/daemon/kernel_modifications',
'/daemon/debian_8_docker',
]
},
{
title: 'Tutorials',
collapsable: false,
children: [
'/tutorials/mysql_setup.md',
'/tutorials/creating_ssl_certificates.md',
],
},
{
title: 'Development & Ops',
collapsable: true,
children: [
'/ops/publish_release.md',
],
},
// {
// title: 'API Reference',
// collapsable: true,
// children: [
// '/',
// ]
// }
],
'/community/':[
{
title: 'Community Guides',
collapsable: false,
children: [
'/community/about.md',
]
},
{
title: 'Install Panel',
collapsable: false,
children: [
'/community/install/panel/centos7.md',
'/community/install/panel/ubuntu1804.md',
'/community/install/panel/debian9.md',
]
},
{
title: 'Install Daemon',
collapsable: false,
children: [
'/community/install/daemon/centos7.md',
'/community/install/daemon/ubuntu1804.md',
'/community/install/daemon/debian9.md',
]
},
]
}
},
postcss: {
plugins: [

5
community/about.md Normal file
View File

@ -0,0 +1,5 @@
# Introduction
This is the community guide section of the site.
##
This is the area for community maintained guides that have been validated before being added.

View File

@ -0,0 +1,46 @@
# Install wings on CentOS 7
This guide covers the installation of the requirements for a daemon with SSL enabled.
[[toc]]
## Install Requirements
The daemon requirements can be found [here](/daemon/installing.md#system-requirements)
### General Requirements
```bash
yum install -y tar unzip make gcc gcc-c++ python
```
### Docker
```bash
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
systemctl enable docker
systemctl start docker
```
### nodejs
```bash
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
yum install -y nodejs
```
### server ports
```bash
firewall-cmd --add-port 8080/tcp --permanent
firewall-cmd --add-port 2022/tcp --permanent
firewall-cmd --permanent --zone=trusted --change-interface=docker0
firewall-cmd --reload
```
## Installing the daemon
Follow the regular guide to install the [daemon](/daemon/installing.md#installing-daemon-software)

View File

@ -0,0 +1,47 @@
# Install wings on Debian 9
This guide covers the installation of the requirements for a daemon with SSL enabled.
[[toc]]
## Install Requirements
The daemon requirements can be found [here](/daemon/installing.md#system-requirements)
### General Requirements
```bash
apt install -y zip unzip tar make gcc g++ python curl gnupg
```
### Docker
```bash
## install apt tools
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
## Import the docker gpg key
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
## Add the docker stable repo
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
## Install docker
apt update
apt install docker-ce
systemctl enable docker
systemctl start docker
```
### nodejs
```bash
## Install nodejs repo
curl -sL https://deb.nodesource.com/setup_8.x | bash -
## Install nodejs
apt install -y nodejs
```
## Installing the daemon
Follow the regular guide to install the [daemon](/daemon/installing.md#installing-daemon-software)

View File

@ -0,0 +1,32 @@
# Install wings on Ubuntu 18.04
This guide covers the installation of the requirements for a daemon with SSL enabled.
[[toc]]
## Install Requirements
The daemon requirements can be found [here](/daemon/installing.md#system-requirements)
### General Requirements
```bash
apt install -y zip unzip tar make gcc g++ python
```
### Docker
```bash
apt install -y docker.io
systemctl enable docker
systemctl start docker
```
### nodejs
```bash
apt install -y nodejs npm
```
## Installing the daemon
Follow the regular guide to install the [daemon](/daemon/installing.md#installing-daemon-software)

View File

@ -0,0 +1,143 @@
# Install pterodactyl on CentOS 7
This guide covers the installation of the requirements for a panel with SSL enabled.
[[toc]]
## Install Requirements
The panel requirements can be found [here](/panel/getting_started.md#dependencies)
### MariaDB
```bash
## Install Repos
cat <<EOF > /etc/yum.repos.d/mariadb.repo
# MariaDB 10.2 CentOS repository list - created 2017-07-14 12:40 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
## Get yum updates
yum update -y
## Install MariaDB 10.2
yum install -y MariaDB-common MariaDB-server
## Start maraidb
systemctl start mariadb
systemctl enable mariadb
```
### PHP 7.2
We recommend the ius repo to get the latest php packages.
```bash
## Install Repos
yum install -y epel-release https://centos7.iuscommunity.org/ius-release.rpm
## Get yum updates
yum update -y
## Install PHP 7.2
yum install -y php72u-php php72u-common php72u-fpm php72u-cli php72u-json php72u-mysqlnd php72u-mcrypt php72u-gd php72u-mbstring php72u-pdo php72u-zip php72u-bcmath php72u-dom php72u-opcache
```
### nginx
```bash
yum install -y nginx
firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload
```
### Redis
```bash
yum install -y redis40u
systemctl start redis
systemctl enable redis
```
### utilities
#### certbot
```bash
yum install -y certbot
```
#### composer
```bash
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
```
## Server Configuriation
This following section covers the configuration of parts of the server to run the panel.
### MariaDB
The fastest way to set up mariadb is to use the `mysql_secure_installation` command and follow prompts
```bash
mysql_secure_installation
```
The following are safe defaults.
Change to your own secure password
`Set root password? [Y/n] Y`
Get rid of users that could access the db by default
`Remove anonymous users? [Y/n] Y`
Keep root off the external interfaces
`Disallow root login remotely? [Y/n] Y`
Extra databases that aren't needed
`Remove test database and access to it? [Y/n] Y`
Clears and sets all the changes made
`Reload privilege tables now? [Y/n] Y`
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
#### Adding MariaDB user
We have a tutorial in the tutorial section
[Setting up MySQL](/tutorials/mysql_setup.md)
### PHP
The default php-fpm configuration is good to use but you need to edit the nginx config to use the ip address.
The following config is the one that will match the nginx config later in the guide.
<<< @/.snippets/php-fpm/pterodactyl-centos.conf
Start and enable php-fpm on the system.
```bash
systemctl enable php-fpm
systemctl start php-fpm
```
### nginx
follow the [tutorial](/tutorials/creating_ssl_certificates.md) on generating an SSL cert to use.
#### ssl config
<<< @/.snippets/webservers/nginx-centos.conf{5,11,26-27}
### Redis
The default Redis install is perfectly fine for the panel.
If you have Redis already in use you may want to look into running another Redis instance similar to [this guide](https://community.pivotal.io/s/article/How-to-setup-and-run-multiple-Redis-server-instances-on-a-Linux-host)
## Installing the panel
Follow the regular guide to install the [panel](/panel/getting_started.md#installation)

View File

@ -0,0 +1,134 @@
# Install pterodactyl on Debian 9
This guide covers the installation of the requirements for a panel with SSL enabled.
[[toc]]
## Install Requirements
The panel requirements can be found [here](/panel/getting_started.md#dependencies)
### MariaDB
```bash
apt install -y software-properties-common dirmngr
## get MariaDB gpg keys
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
## install the MariaDB repo
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.jaleco.com/mariadb/repo/10.1/debian stretch main'
## Get apt updates
apt update
## Install MariaDB 10.1
apt install -y mariadb-common mariadb-server mariadb-client
## Start maraidb
systemctl start mariadb
systemctl enable mariadb
```
### PHP 7.2
```bash
## Install the PHP 7.2 repo for debian
apt install -y ca-certificates apt-transport-https
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
## Get apt updates
apt update
## Install PHP 7.2
apt install -y php7.2 php7.2-cli php7.2-gd php7.2-mysql php7.2-pdo php7.2-mbstring php7.2-tokenizer php7.2-bcmath php7.2-xml php7.2-fpm php7.2-curl php7.2-zip
```
### nginx
```bash
apt install -y nginx
```
### Redis
```bash
apt install -y redis-server
systemctl start redis-server
systemctl enable redis-server
```
### utilities
#### certbot
```bash
apt install -y certbot curl
```
#### composer
```bash
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
```
## Server Configuriation
This following section covers the configuration of parts of the server to run the panel.
### MariaDB
The fastest way to set up mariadb is to use the `mysql_secure_installation` command and follow prompts
```bash
mysql_secure_installation
```
The following are safe defaults.
Change to your own secure password
`Set root password? [Y/n] Y`
Get rid of users that could access the db by default
`Remove anonymous users? [Y/n] Y`
Keep root off the external interfaces
`Disallow root login remotely? [Y/n] Y`
Extra databases that aren't needed
`Remove test database and access to it? [Y/n] Y`
Clears and sets all the changes made
`Reload privilege tables now? [Y/n] Y`
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
#### Adding MariaDB user
We have a tutorial in the tutorial section
[Setting up MySQL](/tutorials/mysql_setup.md)
### PHP
The default php-fpm configuration is good to use.
Start and enable php-fpm on the system.
```bash
systemctl enable php-fpm
systemctl start php-fpm
```
### nginx
follow the [tutorial](/tutorials/creating_ssl_certificates.md) on generating an SSL cert to use.
#### ssl config
<<< @/.snippets/webservers/nginx.conf{5,11,26-27}
### Redis
The default Redis install is perfectly fine for the panel.
If you have Redis already in use you may want to look into running another Redis instance similar to [this guide](https://community.pivotal.io/s/article/How-to-setup-and-run-multiple-Redis-server-instances-on-a-Linux-host)
## Installing the panel
Follow the regular guide to install the [panel](/panel/getting_started.md#installation)

View File

@ -0,0 +1,121 @@
# Install pterodactyl on Ubuntu 18.04
This guide covers the installation of the requirements for a panel with SSL enabled.
[[toc]]
## Install Requirements
The panel requirements can be found [here](/panel/getting_started.md#dependencies)
### MariaDB
```bash
## Get apt updates
apt update -y
## Install MariaDB 10.1
apt install -y mariadb-common mariadb-server mariadb-client
## Start MariaDB
systemctl start mariadb
systemctl enable mariadb
```
### PHP 7.2
```bash
## Get apt updates
apt update -y
## Install PHP 7.2
apt install -y php7.2 php7.2-cli php7.2-gd php7.2-mysql php7.2-pdo php7.2-mbstring php7.2-tokenizer php7.2-bcmath php7.2-xml php7.2-fpm php7.2-curl php7.2-zip
```
### nginx
```bash
apt install -y nginx
```
### Redis
```bash
apt install -y redis-server
systemctl start redis-server
systemctl enable redis-server
```
### utilities
#### certbot
```bash
yuaptm install -y certbot
```
#### composer
```bash
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
```
## Server Configuration
This following section covers the configuration of parts of the server to run the panel.
### MariaDB
The fastest way to set up MariaDB is to use the `mysql_secure_installation` command and follow prompts
```bash
mysql_secure_installation
```
The following are safe defaults.
Change to your own secure password
`Set root password? [Y/n] Y`
Get rid of users that could access the db by default
`Remove anonymous users? [Y/n] Y`
Keep root off the external interfaces
`Disallow root login remotely? [Y/n] Y`
Extra databases that aren't needed
`Remove test database and access to it? [Y/n] Y`
Clears and sets all the changes made
`Reload privilege tables now? [Y/n] Y`
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
#### Adding MariaDB user
We have a tutorial in the tutorial section
[Setting up MySQL](/tutorials/mysql_setup.md)
### PHP
The default php-fpm configuration is good to use.
Start and enable php-fpm on the system.
```bash
systemctl enable php-fpm
systemctl start php-fpm
```
### nginx
follow the [tutorial](/tutorials/creating_ssl_certificates.md) on generating an SSL cert to use.
#### ssl config
<<< @/.snippets/webservers/nginx.conf{5,11,26-27}
### Redis
The default Redis install is perfectly fine for the panel.
If you have Redis already in use you may want to look into running another Redis instance similar to [this guide](https://community.pivotal.io/s/article/How-to-setup-and-run-multiple-Redis-server-instances-on-a-Linux-host)
## Installing the panel
Follow the regular guide to install the [panel](/panel/getting_started.md#installation)

View File

@ -56,6 +56,13 @@ Using the `host` stack removes many network specific protections afforded by Doc
to access anything on the host, as well as bind to any IP or Port they wish.
:::
::: danger
Any changes to the network after the daemon has been started will require you to remove the docker network and restart the daemon. Any servers on the host need to be stopped before and most likely rebuilt.
The following will stop the daemon, remove the network, and start the daemon again. Run at your own risk.
`systemctl stop wings && docker network rm pterodactyl_nw && systemctl start wings`
:::
``` json{5}
"docker": {
"socket": "/var/run/docker.sock",

View File

@ -2,7 +2,7 @@
"dependencies": {
"jquery": "^3.3.1",
"slick-carousel": "^1.8.1",
"vuepress": "^0.13.1"
"vuepress": "^0.14.3"
},
"scripts": {
"build": "./node_modules/vuepress/bin/vuepress.js build",

View File

@ -198,6 +198,10 @@ ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,stan
WantedBy=multi-user.target
```
::: tip Redis on CentOS
If you are using CentOS, you will need to replace `redis-server.service` with `redis.service` at the `After=` line in order to ensure `redis` starts before the queue worker.
:::
::: tip
If you are not using `redis` for anything you should remove the `After=` line, otherwise you will encounter errors
when the service starts.

View File

@ -5612,9 +5612,9 @@ regexpu-core@^4.1.3, regexpu-core@^4.1.4:
unicode-match-property-ecmascript "^1.0.4"
unicode-match-property-value-ecmascript "^1.0.2"
register-service-worker@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/register-service-worker/-/register-service-worker-1.4.1.tgz#4b4c9b4200fc697942c6ae7d611349587b992b2f"
register-service-worker@^1.5.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/register-service-worker/-/register-service-worker-1.5.2.tgz#a4631896c38d6ec5597358f44988cc46a911912d"
registry-auth-token@^3.0.1:
version "3.3.2"
@ -6653,9 +6653,9 @@ vuepress-html-webpack-plugin@^3.2.0:
toposort "^1.0.0"
util.promisify "1.0.0"
vuepress@^0.13.1:
version "0.13.1"
resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-0.13.1.tgz#73178d58f5b0660f7dbbdd4172b0170051eb1ea9"
vuepress@^0.14.3:
version "0.14.3"
resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-0.14.3.tgz#ed20ab490967e5e4247577e9e2bd8b4506a3635f"
dependencies:
"@babel/core" "7.0.0-beta.47"
"@vue/babel-preset-app" "3.0.0-beta.11"
@ -6695,7 +6695,7 @@ vuepress@^0.13.1:
portfinder "^1.0.13"
postcss-loader "^2.1.5"
prismjs "^1.13.0"
register-service-worker "^1.4.1"
register-service-worker "^1.5.1"
semver "^5.5.0"
stylus "^0.54.5"
stylus-loader "^3.0.2"