mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-10 10:44:43 -06:00
Merge branch 'master' of github.com:pterodactyl/documentation
This commit is contained in:
commit
3ca4bfae72
@ -51,9 +51,12 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
title: 'Daemon',
|
||||
collapsable: true,
|
||||
collapsable: false,
|
||||
children: [
|
||||
'/',
|
||||
'/daemon/installing',
|
||||
'/daemon/upgrading',
|
||||
'/daemon/kernel_modifications',
|
||||
'/daemon/debian_8_docker',
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
BIN
.vuepress/public/daemon_configuration_example.png
Normal file
BIN
.vuepress/public/daemon_configuration_example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 382 KiB |
@ -8,7 +8,7 @@
|
||||
@apply .leading-normal .overflow-auto .my-4 .mx-0;
|
||||
|
||||
code {
|
||||
@apply .text-white .p-0 .bg-transparent .border-0;
|
||||
@apply .text-white .p-0 .bg-transparent .border-0 .inline-block;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
@ -28,11 +28,11 @@ div[class*="language-"] {
|
||||
@apply .relative .bg-grey-darkest .rounded .border .border-black .text-sm .my-4;
|
||||
|
||||
.highlight-lines {
|
||||
@apply .absolute .pin-t .pin-l .w-full .leading-normal .select-none;
|
||||
margin-top: .9rem;
|
||||
@apply .absolute .pin-l .w-full .leading-normal .select-none;
|
||||
top: .9rem;
|
||||
|
||||
.highlighted {
|
||||
@apply .bg-grey-darker;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ div[class*="language-"] {
|
||||
|
||||
/* language hints */
|
||||
|
||||
@each $lang in js,ts,html,md,vue,css,sass,scss,less,stylus,go,java,c,sh,yaml,conf {
|
||||
@each $lang in js,ts,html,md,vue,css,sass,scss,less,stylus,go,java,c,sh,yaml,conf,sql {
|
||||
div[class~="language-#{$lang}"]:before {
|
||||
content: '#{$lang}';
|
||||
}
|
||||
|
||||
@ -1,30 +1,70 @@
|
||||
.home {
|
||||
padding-top: $nav-height;
|
||||
@apply .mx-auto;
|
||||
max-width: 960px;
|
||||
|
||||
@screen md {
|
||||
@apply .px-8;
|
||||
}
|
||||
|
||||
.hero {
|
||||
@apply .text-center .mx-auto;
|
||||
max-width: 960px;
|
||||
padding-top: 58px;
|
||||
|
||||
img {
|
||||
@apply .max-w-xs;
|
||||
@apply .my-4;
|
||||
max-height: 20rem;
|
||||
|
||||
@screen smx {
|
||||
max-height: 6rem;
|
||||
}
|
||||
}
|
||||
|
||||
.action-button {
|
||||
@apply .inline-block .bg-blue .text-white .p-4
|
||||
@apply .inline-block .bg-blue .text-white .px-8 .py-4 .rounded .text-lg .font-normal .border .border-blue-dark;
|
||||
transition: background-color 100ms ease;
|
||||
|
||||
&:hover {
|
||||
@apply .no-underline .bg-blue-light .border-blue;
|
||||
transition: background-color 100ms ease;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
@apply .text-5xl .text-black;
|
||||
}
|
||||
|
||||
.description {
|
||||
@apply .text-grey-darkest;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
.features {
|
||||
@apply .border-t .px-2 .mt-8 .flex .flex-wrap .items-start .content-between;
|
||||
@apply .border-t .py-5 .px-4 .mt-10;
|
||||
|
||||
.feature {
|
||||
@apply flex-grow;
|
||||
flex-basis: 30%;
|
||||
max-width: 30%;
|
||||
@screen md {
|
||||
@apply .flex .flex-wrap .items-start .justify-between .px-0;
|
||||
align-content: stretch;
|
||||
|
||||
h2 {
|
||||
@apply border-b-0 pb-0;
|
||||
.feature {
|
||||
@apply .flex-grow ;
|
||||
flex-basis: 30%;
|
||||
max-width: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
.feature {
|
||||
h2 {
|
||||
@apply .border-b-0 .pb-0 .py-4 .font-normal;
|
||||
}
|
||||
|
||||
p {
|
||||
@apply .text-grey-darker;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
@apply .text-center .text-grey .text-sm .pb-8 .px-4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,14 @@
|
||||
.page {
|
||||
padding-top: $nav-height;
|
||||
padding-top: 56px;
|
||||
|
||||
@screen md {
|
||||
padding-left: $sidebar-width;
|
||||
padding-left: 20rem;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
@apply .mx-auto .p-4;
|
||||
max-width: $content-width;
|
||||
max-width: 840px;
|
||||
|
||||
@screen md {
|
||||
@apply .p-8;
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
.page-edit {
|
||||
@apply .mx-auto .px-4 .pb-4;
|
||||
max-width: $content-width;
|
||||
max-width: 840px;
|
||||
|
||||
@screen md {
|
||||
@apply .px-8 .pb-8;
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
.page-nav {
|
||||
@apply .mx-auto .px-4 .pb-4;
|
||||
max-width: $content-width;
|
||||
max-width: 840px;
|
||||
|
||||
@screen md {
|
||||
@apply .px-8 .pb-8;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
@import "tailwindcss/preflight";
|
||||
@import "tailwindcss/components";
|
||||
|
||||
@import "./variables.css";
|
||||
@import "./layout.css";
|
||||
@import "./text.css";
|
||||
@import "./nav.css";
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
.nav {
|
||||
@apply .fixed .w-full .bg-blue .font-sans .border-b .border-t .border-blue-darker .px-6 .text-sm .z-20 .flex;
|
||||
@apply .fixed .w-full .bg-blue .font-sans .border-b .border-t .border-blue-darker .px-2 .text-sm .z-20 .flex;
|
||||
height: 56px;
|
||||
line-height: 54px;
|
||||
|
||||
.sidebar-button {
|
||||
@apply .p-3;
|
||||
|
||||
.icon {
|
||||
@apply .text-white .block h-6;
|
||||
}
|
||||
}
|
||||
|
||||
@screen md {
|
||||
@apply .px-6;
|
||||
|
||||
.logo-container {
|
||||
@apply .flex-no-shrink;
|
||||
width: calc($sidebar-width - 1.5rem); /* sidebar is 20rem + 1.5rem padding on each side for nav */
|
||||
@ -24,6 +18,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-button {
|
||||
@apply .p-3;
|
||||
|
||||
.icon {
|
||||
@apply .text-white .block;
|
||||
height: 1.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.home-link {
|
||||
@apply .text-white .font-light;
|
||||
|
||||
@ -32,7 +35,13 @@
|
||||
}
|
||||
|
||||
.logo {
|
||||
@apply .h-12 .float-left;
|
||||
@apply .hidden;
|
||||
}
|
||||
|
||||
@screen md {
|
||||
.logo {
|
||||
@apply .w-12 .float-left .block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@ $arrow-bg: #000;
|
||||
}
|
||||
|
||||
@apply .fixed .pin-l .pin-b .bg-white .overflow-auto .border-r .border-grey-lighter .py-8;
|
||||
top: $nav-height;
|
||||
width: $sidebar-width;
|
||||
top: 56px;
|
||||
width: 20rem;
|
||||
font-size: 15px;
|
||||
|
||||
ul {
|
||||
@ -118,17 +118,14 @@ $arrow-bg: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mask {
|
||||
@apply .fixed .pin-t .pin-l .h-screen .w-screen .hidden;
|
||||
}
|
||||
|
||||
.theme-container.no-sidebar {
|
||||
.sidebar {
|
||||
@screen md {
|
||||
.no-sidebar > .sidebar {
|
||||
@apply .hidden;
|
||||
}
|
||||
.page {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-mask {
|
||||
@apply .fixed .pin-t .pin-l .h-screen .w-screen .hidden;
|
||||
}
|
||||
|
||||
.sidebar-open > .sidebar {
|
||||
|
||||
@ -37,8 +37,8 @@ a.header-anchor {
|
||||
|
||||
.content:not(.custom) {
|
||||
& > h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: calc(.5rem - $nav-height);
|
||||
padding-top: calc($nav-height + 1rem);
|
||||
margin-top: calc(.5rem - 56px);
|
||||
padding-top: calc(56px + 1rem);
|
||||
|
||||
&:first-child {
|
||||
@apply .my-1 .pt-0;
|
||||
@ -49,11 +49,9 @@ a.header-anchor {
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
@apply .mb-4 .font-semibold;
|
||||
|
||||
&:hover .header-anchor {
|
||||
@apply .visible;
|
||||
|
||||
@screen smx {
|
||||
margin-left: 0 !important;
|
||||
@screen md {
|
||||
&:hover .header-anchor {
|
||||
@apply .visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
$sidebar-width: 20rem;
|
||||
$nav-height: 48px;
|
||||
$content-width: 840px;
|
||||
@ -10,5 +10,5 @@ features:
|
||||
details: Built on a modern stack utilizing the best design practices that make it easy to jump in and make modifications.
|
||||
- title: Docker to the Core
|
||||
details: All servers run in isolated Docker containers that limit attack vectors, provide strict resource limits, and provide environments tailored to each specific game.
|
||||
footer: MIT Licensed | Copyright © 2015 - 2018 Dane Everitt
|
||||
footer: MIT Licensed | Copyright © 2015 - 2018 Dane Everitt & Contributors
|
||||
---
|
||||
|
||||
82
daemon/debian_8_docker.md
Normal file
82
daemon/debian_8_docker.md
Normal file
@ -0,0 +1,82 @@
|
||||
# Docker on Debian 8
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: warning
|
||||
There is a potential for broken software after this upgrade as we are moving to a non-stable kernel (in regards
|
||||
to mainline Debian). Please take backups and only proceed if you are comfortable with this process.
|
||||
:::
|
||||
|
||||
## Install Docker
|
||||
To begin with, we're going to install docker just like we would for any other OS by following Docker's
|
||||
[official documentation for Debian](https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-ce).
|
||||
|
||||
Once you've done that, if you run `docker info` you'll notice some missing features at the bottom, something
|
||||
like the output below.
|
||||
|
||||
``` text
|
||||
WARNING: No memory limit support
|
||||
WARNING: No swap limit support
|
||||
WARNING: No kernel memory limit support
|
||||
WARNING: No oom kill disable support
|
||||
WARNING: No cpu cfs quota support
|
||||
WARNING: No cpu cfs period support
|
||||
```
|
||||
|
||||
## Update GRUB Startup
|
||||
To fix the memory limit support issues, we just need to add two arguments to our default grub startup. Start by
|
||||
opening `/etc/default/grub` and adding the following arguments to `GRUB_CMDLINE_LINUX_DEFAULT`.
|
||||
|
||||
``` text
|
||||
swapaccount=1 cgroup_enable=memory
|
||||
```
|
||||
|
||||
The line should then look like the one below — assuming nothing else was in the quote to begin with.
|
||||
|
||||
``` text
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="swapaccount=1 cgroup_enable=memory"
|
||||
```
|
||||
|
||||
After doing that, run `sudo update-grub` to update our grub configuration.
|
||||
|
||||
## Add Backports Repo
|
||||
We then need to enable the `jessie-backports` apt repository to install a newer kernel. To do this, run the commands below.
|
||||
|
||||
``` bash
|
||||
echo deb http://http.debian.net/debian jessie-backports main > /etc/apt/sources.list.d/jessie-backports.list
|
||||
echo deb http://http.debian.net/debian jessie-backports main contrib non-free > /etc/apt/sources.list.d/jessie-backports.list
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
To find the most recent kernels, run `apt-cache search linux-image` which will list all of the ones available. In this
|
||||
case, we'll install the `4.8.0 `kernel using the command below. Once we've done that, it is time to reboot the server
|
||||
to start using this kernel.
|
||||
|
||||
``` bash
|
||||
apt install -t jessie-backports linux-image-4.9.0-0.bpo.3-amd64
|
||||
reboot
|
||||
```
|
||||
|
||||
## Update Software & Setup Docker
|
||||
Now that we're on the new kernel you probably need to update some software to take advantage of it. To do this,
|
||||
simply run the command below.
|
||||
|
||||
``` bash
|
||||
apt update && apt upgrade
|
||||
```
|
||||
|
||||
Once that is done, we need to make an adjustment to docker to use `overlay2` rather than `aufs` since `aufs` is not
|
||||
supported on this kernel currently. Run the command below to do so.
|
||||
|
||||
``` bash
|
||||
sed -i 's,/usr/bin/dockerd,/usr/bin/dockerd --storage-driver=overlay2,g' /lib/systemd/system/docker.service
|
||||
```
|
||||
|
||||
Finally, update `systemd` and start docker using the following commands.
|
||||
|
||||
``` bash
|
||||
systemctl daemon-reload
|
||||
service docker start
|
||||
```
|
||||
|
||||
Docker should now be running and reporting no errors if you run `docker info`!
|
||||
197
daemon/installing.md
Normal file
197
daemon/installing.md
Normal file
@ -0,0 +1,197 @@
|
||||
# Installation
|
||||
|
||||
[[toc]]
|
||||
|
||||
## Supported Systems
|
||||
| Operating System | Version | Supported | Notes |
|
||||
| ---------------- | ------- | :-------: | ----- |
|
||||
| **Ubuntu** | 14.04 | :warning: | Approaching EOL, not recommended for new installations. |
|
||||
| | 16.04 | :white_check_mark: | |
|
||||
| | 18.04 | :white_check_mark: | |
|
||||
| **CentOS** | 6 | :no_entry_sign: | Does not support all of the required packages. |
|
||||
| | 7 | :white_check_mark: | |
|
||||
| **Debian** | 8 | :warning: | Requires [kernel modifications](debian_8_docker.md) to run Docker. |
|
||||
| | 9 | :white_check_mark: | |
|
||||
| **Alpine Linux** | 3.4+ | :warning: | Not officially supported, but reportedly works. |
|
||||
| **RHEL** | 7 | :no_entry_sign: | Requires daemon modifications, see [this issue](https://github.com/pterodactyl/panel/issues/1062). |
|
||||
|
||||
## System Requirements
|
||||
In order to run the Daemon you will need a system capable of running Docker containers. Most VPS and almost all
|
||||
dedicated servers should be capable of running Docker, but there are edge cases.
|
||||
|
||||
If your provider makes use of `Virtuozzo`, `OpenVZ` (or `OVZ`), or `LXC` then you will most likely be unable to
|
||||
run the Daemon. If you are unsure what your host is using there are a couple of options. The easiest is to check
|
||||
their website, or reach out to their support team.
|
||||
|
||||
If you want to take a different approach, try using `lscpu` and checking what the virtualization type listed is. An
|
||||
example of this is shown below which shows my hypervisor running with full virtualization — this means it will
|
||||
support Docker without issues. If you see `KVM` for the vendor, chances are you're fine as well.
|
||||
|
||||
``` bash
|
||||
dane@daemon:~$ lscpu | grep 'vendor\|type'
|
||||
Hypervisor vendor: VMware
|
||||
Virtualization type: full
|
||||
```
|
||||
|
||||
If that doesn't work for some reason, or you're still unsure, you can also run the command below and as long as it
|
||||
doesn't report `Xen` or `LXC` you're probably okay to continue.
|
||||
|
||||
``` bash
|
||||
dane@daemon:~$ sudo dmidecode -s system-manufacturer
|
||||
VMware, Inc.
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
Pterodactyl's Daemon requires the following dependencies be installed on your system in order for it to operate.
|
||||
|
||||
* Docker
|
||||
* Nodejs (`8.0` or `10.0`)
|
||||
* `tar`
|
||||
* `unzip`
|
||||
* `make`, `gcc` (`gcc-g++` on CentOS), `g++`
|
||||
* `python`
|
||||
|
||||
### Installing Docker
|
||||
Please reference the official Docker documentation for how to install Docker CE on your server. Some quick links
|
||||
are listed below for commonly supported systems.
|
||||
|
||||
* [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce)
|
||||
* [CentOS](https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce)
|
||||
* [Debian](https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-ce)
|
||||
|
||||
::: warning Check your Kernel
|
||||
Please be aware that some hosts install a modified kernel that does not support important docker features. Please
|
||||
check your kernel by running `uname -r`. If your kernel ends in `-xxxx-grs-ipv6-64` or `-xxxx-mod-std-ipv6-64` you're
|
||||
probably using a non-supported kernel. Check our [Kernel Modifications](kernel_modifications.md) guide for details.
|
||||
:::
|
||||
|
||||
#### Start Docker on Boot
|
||||
If you are on Ubuntu 16 or CentOS run the command below to have Docker start when you boot your machine.
|
||||
|
||||
``` bash
|
||||
systemctl enable docker
|
||||
```
|
||||
|
||||
#### Enabling Swap
|
||||
On most systems, docker will be unable to setup swap space, you can check if this is the case by running `docker info`.
|
||||
If it outputs `WARNING: No swap limit support` near the bottom, this is the case. Enabling swap is completely optional,
|
||||
but we recommended doing it if you will be hosting for others, and to prevent OOM errors.
|
||||
|
||||
To do so, open `/etc/default/grub` as a root user, and find the line starting with `GRUB_CMDLINE_LINUX_DEFAULT`. Make
|
||||
sure the line includes `swapaccount=1`.
|
||||
|
||||
After doing that, simply run `sudo update-grub` followed by `sudo reboot` to restart the server and have swap enabled.
|
||||
Below is an example of what the line should look like, _do not copy this line verbatium, it often has additional
|
||||
OS specific parameters._
|
||||
|
||||
``` text
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="swapaccount=1"
|
||||
```
|
||||
|
||||
### Installing Nodejs
|
||||
NodeJS is also super easy to install! Simply run the command below to make the package accessible to your system.
|
||||
|
||||
``` bash
|
||||
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
|
||||
apt -y install nodejs
|
||||
```
|
||||
|
||||
::: tip Other OS Distributions
|
||||
If you are using CentOS, [please follow these instructions](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora). Ubuntu and Debian users may also follow the [official
|
||||
instructions provided by Nodejs](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions).
|
||||
:::
|
||||
|
||||
## Installing Daemon Software
|
||||
The first step for installing the daemon is to make sure we have the required directory structure setup. To do so,
|
||||
run the commands below.
|
||||
|
||||
``` bash
|
||||
mkdir -p /srv/daemon /srv/daemon-data
|
||||
cd /srv/daemon
|
||||
```
|
||||
|
||||
::: warning OVH Servers
|
||||
If you are using a server provided by OVH please be aware that your main drive space is probably allocated to
|
||||
`/home`, and not `/` by default. Please consider using `/home/daemon-data` for server data. This can be easily
|
||||
set when creating the node.
|
||||
:::
|
||||
|
||||
The next step is to download the software and unpack the archive.
|
||||
``` bash
|
||||
curl -L https://github.com/pterodactyl/daemon/releases/download/v0.5.6/daemon.tar.gz | tar --strip-components=1 -xzv
|
||||
```
|
||||
|
||||
Finally, we need to install the dependencies that allow the Daemon to run properly. This command will most likely
|
||||
take a few minutes to run, please do not interrupt it.
|
||||
``` bash
|
||||
npm install --only=production
|
||||
```
|
||||
|
||||
## Configure Daemon
|
||||
Once you have installed the daemon and required components, the next step is to create a node on your installed Panel
|
||||
Once you have done that there will be a tab called Configuration when you view the node.
|
||||
|
||||
Simply copy and paste the code block and paste it into a file called `core.json` in `/srv/daemon/config` and save it.
|
||||
You may also use the Auto-Deployment feature rather than manually creating the files.
|
||||
|
||||

|
||||
|
||||
## Starting the Daemon
|
||||
To start your daemon simply move into the daemon directory and run the command below which will start the daemon in
|
||||
foreground mode. Once you are done, use `CTRL+C` to terminate the process. Depending on your server's internet connection
|
||||
pulling and starting the Daemon for the first time may take a few minutes.
|
||||
|
||||
``` bash
|
||||
sudo npm start
|
||||
```
|
||||
|
||||
### Daemonizing (using systemd)
|
||||
::: warning
|
||||
If you are using Ubuntu 14 you cannot use `systemd` to manage your Daemon. Please see the instructions below on using
|
||||
"forever" to run the daemon.
|
||||
:::
|
||||
|
||||
Running Pterodactyl Daemon in the background is a simple task, just make sure that it runs without errors before doing
|
||||
this. Place the contents below in a file called `wings.service` in the `/etc/systemd/system` directory.
|
||||
|
||||
``` text
|
||||
[Unit]
|
||||
Description=Pterodactyl Wings Daemon
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
#Group=some_group
|
||||
WorkingDirectory=/srv/daemon
|
||||
LimitNOFILE=4096
|
||||
PIDFile=/var/run/wings/daemon.pid
|
||||
ExecStart=/usr/bin/node /srv/daemon/src/index.js
|
||||
Restart=on-failure
|
||||
StartLimitInterval=600
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Then, run the commands below to reload systemd and start the daemon.
|
||||
|
||||
``` bash
|
||||
systemctl daemon-reload
|
||||
systemctl enable wings
|
||||
systemctl start wings
|
||||
```
|
||||
|
||||
### Daemonizing (using Forever)
|
||||
Forever allows us to run the daemon as a pseudo-daemonized application. We can exit our terminal session without
|
||||
killing the process, and we don't have to run it in a screen. Inside the daemon directory, run the commands below which
|
||||
will install forever and then start the process in the background.
|
||||
|
||||
You should use this only if your system does not support systemd.
|
||||
|
||||
``` bash
|
||||
npm install -g forever
|
||||
forever start src/index.js
|
||||
|
||||
# To stop the daemon use:
|
||||
forever stop src/index.js
|
||||
```
|
||||
76
daemon/kernel_modifications.md
Normal file
76
daemon/kernel_modifications.md
Normal file
@ -0,0 +1,76 @@
|
||||
# Kernel Modifications
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: tip
|
||||
In most cases, only users with a server provided by OVH will need to make any modifications to their kernel.
|
||||
:::
|
||||
|
||||
## Update Kernel
|
||||
Install the new kernels using apt-get. In this case we are installing the latest version of the 4.4 kernel,
|
||||
but feel free to browse using apt-cache search linux-image-extra to find all possible image versions you can
|
||||
install. You'll want to install the latest.
|
||||
|
||||
``` bash
|
||||
apt-get install linux-image-4.4.0-72-generic linux-image-extra-4.4.0-72-generic
|
||||
```
|
||||
|
||||
After you've installed the new kernel you'll need to update the grub loader using the command below. After that, a
|
||||
server reboot is in order.
|
||||
|
||||
``` bash
|
||||
sudo chmod -x /etc/grub.d/06_OVHkernel
|
||||
sudo update-grub
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
## Confirm Kernel
|
||||
Once you've rebooted, check that the latest kernel is installed using `uname -r`, it should output `4.4.0-45-generic`
|
||||
(in this case) or similar.
|
||||
|
||||
::: warning
|
||||
If it still includes `-xxxx-grs-ipv6-64` or similar, it didn't work and you should move on top the steps below.
|
||||
:::
|
||||
|
||||
## Set Default Boot
|
||||
Ok, so unfortunately the easiest way didn't work, but don't worry, we can still fix this. Firstly, lets run a quick
|
||||
command to list potential kernels, just look at the output and make sure you see your newly installed kernel listed.
|
||||
|
||||
``` bash
|
||||
grep "menuentry '" /boot/grub/grub.cfg
|
||||
```
|
||||
|
||||
After running that you should see output similar to the example below.
|
||||
|
||||
``` text
|
||||
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
menuentry 'Ubuntu, with Linux 4.4.0-45-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-generic-advanced-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
menuentry 'Ubuntu, with Linux 4.4.0-45-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-generic-recovery-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
menuentry 'Ubuntu, with Linux 4.4.0-31-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-advanced-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
menuentry 'Ubuntu, with Linux 4.4.0-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-31-generic-recovery-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
menuentry 'Ubuntu, with Linux 4.4.0-22-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-22-generic-advanced-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
menuentry 'Ubuntu, with Linux 4.4.0-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-22-generic-recovery-7b66c4ea-6e24-44aa-849d-9411c90b40b6' {
|
||||
```
|
||||
|
||||
As you can see, we have `Ubuntu, with Linux 4.4.0-45-generic` listed as the first indented option. To boot using this
|
||||
specific kernel, we will need to modify our grub file.
|
||||
|
||||
``` bash
|
||||
sudo nano /etc/default/grub
|
||||
```
|
||||
|
||||
Find `GRUB_DEFAULT`, it is most likely set to `GRUB_DEFAULT=0`. We're going to modify it a bit to boot our new kernel.
|
||||
|
||||
``` text
|
||||
GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-45-generic'
|
||||
```
|
||||
|
||||
The only part of the code above that you might need to change is the `4.4.0-45-generic`, which you can find based on
|
||||
the kernel version you install. You might also notice that it matches the first indented entry from the grep menuentry
|
||||
command and also the version of the kernel that we installed above. Once you've done that, run the commands below to
|
||||
update grub and reboot, and you should be set.
|
||||
|
||||
``` bash
|
||||
sudo update-grub
|
||||
sudo reboot
|
||||
```
|
||||
94
daemon/upgrade/0.4_to_0.5.md
Normal file
94
daemon/upgrade/0.4_to_0.5.md
Normal file
@ -0,0 +1,94 @@
|
||||
# Upgrading 0.4.X to 0.5.X
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: danger
|
||||
This upgrade process will require that **all** servers running through the Daemon be offline for a short period
|
||||
of time while data is reorganized and server containers are rebuilt. Please plan accordingly for this.
|
||||
|
||||
You will need to update your Panel to the 0.7.X series in order to complete this process as well.
|
||||
:::
|
||||
|
||||
## Docker Adjustments
|
||||
Previously we provided a quick Docker installation script in our installation instructions. We made the regrettable
|
||||
mistake of not reading deeper into it and realizing it enabled edge release channels for Docker. You'll want to take
|
||||
a look at the official documentation for Docker and change your channel to be a stable release channel.
|
||||
|
||||
Please reference the official Docker documentation for how to install Docker CE on your server. Some quick links
|
||||
are listed below for commonly supported systems.
|
||||
|
||||
* [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce)
|
||||
* [CentOS](https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce)
|
||||
* [Debian](https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-ce)
|
||||
|
||||
## Download Files
|
||||
To upgrade from v0.4.X first switch the directory where you installed your Daemon. If you followed the installation
|
||||
guide your Daemon is most likely located in `/srv/daemon`. Then, download and unpack the archive using the
|
||||
command below.
|
||||
|
||||
``` bash
|
||||
curl -L https://github.com/pterodactyl/daemon/releases/download/v0.5.6/daemon.tar.gz | tar --strip-components=1 -xzv
|
||||
```
|
||||
|
||||
Then, update the core dependencies for the Daemon with the following command.
|
||||
|
||||
``` bash
|
||||
npm update --only=production
|
||||
```
|
||||
|
||||
## SFTP Cleanup
|
||||
This version of the Daemon ships with an internal SFTP subsystem, no more need for a special Docker container or
|
||||
confusing file permissions. For the most part the Daemon can handle all of the internal changes that make this possible,
|
||||
you'll just need to remove the old Docker container for SFTP.
|
||||
|
||||
To do so, simply run the following commands, changing `2022` if you are using a different port.
|
||||
|
||||
``` bash
|
||||
docker rmi -f quay.io/pterodactyl/scrappy
|
||||
sudo kill $( sudo lsof -i:2022 -t )
|
||||
```
|
||||
|
||||
Once you have completed that step, you will need to boot the Daemon in order to have the new system user created
|
||||
automatically. This can be done by running `sudo npm start` in the Daemon directory. You'll want to run it in the
|
||||
foreground in order to monitor progress and make sure it executes without issues. Once it has finished running and
|
||||
the Daemon is up and running, stop it again using `CTRL+C`.
|
||||
|
||||
If for whatever reason you need your user to be named something other than `pterodactyl` you can change that in the
|
||||
`core.json` before booting the Daemon by setting the `docker.container.username` key. 99.9% of users will not need
|
||||
to change the username.
|
||||
|
||||
## File Migration
|
||||
Now for the longest part of the upgrade: data migration. You only need to migrate data once when updating from v0.4.X.
|
||||
|
||||
You'll need all of your servers to be stopped for this part of the migration. All of their containers will also need
|
||||
to be rebuilt, but this will be completed on the Panel with a console command since we also need to update their
|
||||
configurations with some new data. We will run that command after we migrate all of the data.
|
||||
|
||||
To perform this migration, simply run the command below in the Daemon directory and follow its prompts. Be aware it
|
||||
might take a few minutes to run, especially with large volumes of data.
|
||||
|
||||
``` bash
|
||||
sudo npm run migrate
|
||||
docker system prune
|
||||
```
|
||||
|
||||
### Rebuild Containers
|
||||
After migrating your data, you'll also need to run a command on the Panel in order to update all of the configurations
|
||||
for these servers. First, be sure to boot the Daemon in foreground mode (`sudo npm start`). You'll then want to run the
|
||||
following command in the Panel directory, **not the Daemon directory**.
|
||||
|
||||
``` bash
|
||||
php artisan p:server:rebuild --node=###
|
||||
```
|
||||
|
||||
Replace `###` above with the ID of your node that is being updated. This will toggle all servers for a rebuild, as
|
||||
well as push the latest information to their configurations. Once this is done, stop the Daemon, run the command below,
|
||||
and then boot it. If you have all daemons running and wish to update them all at once, remove the `--node` flag.
|
||||
|
||||
Boot the Daemon one last time in the foreground, make sure it completes without errors, and then you can stop it and
|
||||
restart it using your service: `sudo systemctl start wings`.
|
||||
|
||||
::: tip Thanks!
|
||||
You're all finished! Thanks for bearing with us, this update addresses a lot of flaws in the previous implementations
|
||||
of the software, and also prepares your data for the eventual migration to our new daemon — which is still in the works.
|
||||
:::
|
||||
23
daemon/upgrade/0.5.md
Normal file
23
daemon/upgrade/0.5.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Upgrading 0.5 Series
|
||||
|
||||
::: tip
|
||||
Your servers will not go offline during this process thanks to Docker. Clients will briefly lose connection
|
||||
to the Daemon from the Panel, but only during the restart phase.
|
||||
:::
|
||||
|
||||
## Download Newest Release
|
||||
First, ensure you're in the Daemon directory, `/srv/daemon`, before continuing through this process. After you've done
|
||||
that, run the command below to pull down the latest files and unpack them in the daemon directory.
|
||||
|
||||
``` bash
|
||||
curl -L https://github.com/pterodactyl/daemon/releases/download/v0.5.6/daemon.tar.gz | tar --strip-components=1 -xzv
|
||||
```
|
||||
|
||||
## Update Components
|
||||
After you've pulled down the latest files the last thing you need to do is run the commands below to update the
|
||||
components and then restart the daemon.
|
||||
|
||||
``` bash
|
||||
npm update --only=production
|
||||
systemctl restart wings
|
||||
```
|
||||
5
daemon/upgrading.md
Normal file
5
daemon/upgrading.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Upgrading
|
||||
|
||||
## Version Specific Guides
|
||||
* [0.4.X to 0.5.X](upgrade/0.4_to_0.5.md)
|
||||
* [0.5.X series](upgrade/0.5.md) <Badge text="current" vertical="middle"/>
|
||||
Loading…
x
Reference in New Issue
Block a user