From 66eedf4042c0e60a7a91d2995a9d2663ec50efd0 Mon Sep 17 00:00:00 2001 From: Dominika Jadowska Date: Fri, 11 Dec 2020 15:24:17 +0100 Subject: [PATCH] Add part of pterodox --- .vuepress/config.js | 9 ++++++ guides/disabling-reCAPTCHA.md | 58 +++++++++++++++++++++++++++++++++++ guides/mounts.md | 51 ++++++++++++++++++++++++++++++ guides/s3-backups.md | 23 ++++++++++++++ 4 files changed, 141 insertions(+) create mode 100644 guides/disabling-reCAPTCHA.md create mode 100644 guides/mounts.md create mode 100644 guides/s3-backups.md diff --git a/.vuepress/config.js b/.vuepress/config.js index 3ff4a2c9..ed7e8e78 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -204,6 +204,15 @@ module.exports = { '/community/about.md', ], }, + { + title: 'Guides', + collapsable: false, + children: [ + '/guides/disabling-reCAPTCHA.md', + '/guides/mounts.md', + '/guides/s3-backups.md' + ], + }, { title: 'Development & Ops', collapsable: true, diff --git a/guides/disabling-reCAPTCHA.md b/guides/disabling-reCAPTCHA.md new file mode 100644 index 00000000..b08ecd3c --- /dev/null +++ b/guides/disabling-reCAPTCHA.md @@ -0,0 +1,58 @@ +# Disabling reCAPTCHA + +:::warning SECURITY WARNING +It is highly reccomended to keep reCAPTCHA enabled, as reCAPTCHA is a security method that can protect your site from some methods of attack! +Only continue if you intend to re-enable reCAPTCHA after fixing whatever issue you may have! +::: + +## Disabling via .env + +In order to disable reCAPTCHA using this method, you need to find and edit your `.env` file, It is usually located at `/var/www/pterodactyl/.env` + +:::tip Hidden Files +In linux, files starting with a `.` are considered to be hidden, so most FTP software may not show it by default. You can see the file by using `ls -a` +::: + +First, lets back up the `.env` file. If you are not already, now is a good time to make sure you are in the `/var/www/pterodactyl` directory + +```bash +cp .env .env.bkp +``` + +You can now edit the `.env` file using your favorite editor to set the fields below + +```bash +# Ignores database settings +APP_ENVIRONMENT_ONLY=true + +# Disable reCAPTCHA. You may need to add this to the end of your file. +RECAPTCHA_ENABLED=false +``` + +### Restoring Functionality + +After fixing your issue, it is **Highly** recommended to re-enable reCAPTCHA in order to protect your panel. This is achived by restoring the previous settings in the `.env` as follows + +```bash +# Allows updating panel configuration via the panel (optional) +APP_ENVIRONMENT_ONLY=false + +# Ensures reCAPTCHA is enabled +RECAPTCHA_ENABLED=true +``` + +## Editing your database + +:::danger DANGEROUS: Not Recommended +While faster, this method should only be used if the `.env` method fails or you know what you are doing! We do not take responsibility if you manage to corrupt your database using this method! +::: + +```sql +mysql -u root -p +USE panel; +UPDATE settings SET value = 'false' WHERE 'key' = 'settings::recaptcha:enabled'; +``` + +If the command returns with `Query OK, 0 rows affected (0.000 sec)` you need to use the `.env` method to disable reCAPTCHA + +Again, it is **Highly** recommended to re-enable reCAPTCHA after you fix your issue, whether through the `.env` above or in the panel! diff --git a/guides/mounts.md b/guides/mounts.md new file mode 100644 index 00000000..d957c07e --- /dev/null +++ b/guides/mounts.md @@ -0,0 +1,51 @@ +# Using Mounts + +A mount in pterodactyl follows similar principles to a docker mount. Pterodactyl already uses the `/home/container` mount thus it or any of it's sub directories can not be used as a different or nested mount. + +## Wings Configuration + +In order to use a mount you need to permit wings to use the selected mount path, this is done by editing mounts in `/etc/pterodactyl/config.yml` + +```yml +allowed_mounts: +- /example +``` + +where `example` is a path on your system, Mounts allow anything within that path to be used as a mount. + +## Panel Configuration + +In the pterodactyl panel you need to create and assign a mount. + +### Creating a mount + +:::tip Mount Paths +Mounts can not use any path or subpath of `/home/container` due to docker limitations +::: + +1. In the admin panel go to **Mounts** +2. Use the create mount option +3. Fill in the details as required + - **Name**: Name for your mount + - **Description**:Description for your mount + - **Source**:File path on your system to where mount files should be stored + - **Target**: File path where the mount will be placed inside of your server, Can NOT be `/home/container` + - **Read Only**: Whether to allow servers to write to the directory + - **User Mountable**: Whether to allow users to self mount this mount +4. After creating the mount you are required to add **Eggs** and **Nodes** that this mount may be used on +:::danger Mount Logic +Mounts do not share data across servers, They only can share paths not files! +::: + +### Assigning a mount + +1. In the admin panel go to the server you would like to use a mount with +2. Go to the mounts page +3. Click the ➕ button +4. Restart the server + +The files of the mount should become available in the target path in the container. + +:::warning Disclaimer +Mounts do not show in the panel's file manager, nor will they be accessible via sFTP +::: diff --git a/guides/s3-backups.md b/guides/s3-backups.md new file mode 100644 index 00000000..9d66f083 --- /dev/null +++ b/guides/s3-backups.md @@ -0,0 +1,23 @@ +# Using S3 Backups + + +To use S3 backups you may use the following `.env` variables +```bash +# Sets your panel to use s3 for backups +APP_BACKUP_DRIVER=s3 + +# Info to actually use s3 +AWS_DEFAULT_REGION= + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= + +AWS_BACKUPS_BUCKET= + +AWS_ENDPOINT= + +# Dunno what these are but maybe you do? +AWS_USE_PATH_STYLE_ENDPOINT=false +AWS_BACKUPS_USE_ACCELERATE=false +``` +