From dda3c2d9495341abe9508753eba6ee18b6c1da17 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Sat, 15 Oct 2022 22:02:09 +0100 Subject: [PATCH 1/9] feat: add env vars page --- .vuepress/config.js | 1 + panel/1.0/environment_variables.md | 35 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 panel/1.0/environment_variables.md diff --git a/.vuepress/config.js b/.vuepress/config.js index f605f5fe2..7be6a2b63 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -148,6 +148,7 @@ module.exports = { '/getting_started', '/webserver_configuration', '/additional_configuration', + '/environment_variables', '/updating', '/troubleshooting', '/legacy_upgrade', diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md new file mode 100644 index 000000000..a265339bc --- /dev/null +++ b/panel/1.0/environment_variables.md @@ -0,0 +1,35 @@ +# Environment Variables + +[[toc]] + +## Application Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `APP_NAME` | "Pterodactyl" | Any | The name of your panel, this is shown in the header of pages in the panel. | +| `APP_ENV` | "production" | Any | The environment your panel is currently running in. | +| `APP_DEBUG` | false | true, false | When in debug mode, more detailed information including stack traces will be logged from the panel. | +| `APP_URL` | "http://localhost" | Any | The URL your panel is running on, this is used for generating URLs for other services. | +| `APP_TIMEZONE` | "UTC" | [Supported Timezones](https://www.php.net/manual/en/timezones.php) | The timezone for the panel, used for date-time functions and services. | +| `APP_LOCALE` | "en" | Any | The locale for the panel used for translations. Note that the panel **does not** have a translations system yet, so it is recommended to keep the value as "en". | +| `APP_KEY` | | Any | The encryption key for the panel, see [Getting Started](/panel/1.0/getting_started.md#installation). | +| `APP_REPORT_ALL_EXCEPTIONS` | false | true, false | Logs all exceptions reported by the panel. | + +## Backups Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `APP_BACKUP_DRIVER` | "wings" | "wings", "s3" | The driver to use for managing server backups. | +| `BACKUP_PRESIGNED_URL_LIFESPAN` | 60 | Any Number | The time in minutes for the lifespan of presigned URLs used for uploading backups to S3 storage. | +| `BACKUP_MAX_PART_SIZE` | 5368709120 | Any Number | The maximum size in bytes of a single upload part for S3 storage. | +| `BACKUP_PRUNE_AGE` | 360 | Any Number | The time in minutes to wait before automatically failing an incomplete backup. Set to `0` to disable. | +| `BACKUP_THROTTLE_LIMIT` | 2 | Any Number | The number of backups that can be created within the backup throttle period, this includes deleted backups. Set to `0` to disable. | +| `BACKUP_THROTTLE_PERIOD` | 600 | Any Number | The time period in seconds to allow backups to be created in. | +| `AWS_DEFAULT_REGION` | | Any | The region of the S3 storage. | +| `AWS_ACCESS_KEY_ID` | | Any | | +| `AWS_SECRET_ACCESS_KEY` | | Any | | +| `AWS_BACKUPS_BUCKET` | | Any | | +| `AWS_ENDPOINT` | | Any | | +| `AWS_USE_PATH_STYLE_ENDPOINT` | false | true, false | | +| `AWS_BACKUPS_USE_ACCELERATE` | false | true, false | | +| `AWS_BACKUPS_STORAGE_CLASS` | | Any | | From 25b1acb60f8983bc23f52d7f8f21db1fbf1b5bc1 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 00:03:10 +0000 Subject: [PATCH 2/9] feat: add broadcasting variables --- panel/1.0/environment_variables.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index a265339bc..769c1e596 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -33,3 +33,16 @@ | `AWS_USE_PATH_STYLE_ENDPOINT` | false | true, false | | | `AWS_BACKUPS_USE_ACCELERATE` | false | true, false | | | `AWS_BACKUPS_STORAGE_CLASS` | | Any | | + +## Broadcasting Variables + +| Name | Default Value | Allowed Values | Description | +| `BROADCAST_DRIVER` | "null" | "ably", "log", "null", "pusher", "redis" | The broadcaster to use for events. | +| `PUSHER_APP_KEY` | | Any | The connection key for the Pusher driver. | +| `PUSHER_APP_SECRET` | | Any | | +| `PUSHER_APP_ID` | | Any | | +| `PUSHER_HOST` | "api-mt1.pusher.com" | URL | | +| `PUSHER_CLUSTER` | "mt1" | Cluster ID | The ID of the pusher cluster. | +| `PUSHER_PORT` | 443 | Any Port | The port to listen on. | +| `PUSHER_SCHEME` | "https" | "http", "https" | The HTTP scheme to use. | +| `ABLY_KEY` | | Any | The key for the Ably driver. | From 9260b6af5101aee1c419d738406b0c7484fa0c60 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 00:05:07 +0000 Subject: [PATCH 3/9] feat: add cors variables --- panel/1.0/environment_variables.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index 769c1e596..f9b23f143 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -46,3 +46,8 @@ | `PUSHER_PORT` | 443 | Any Port | The port to listen on. | | `PUSHER_SCHEME` | "https" | "http", "https" | The HTTP scheme to use. | | `ABLY_KEY` | | Any | The key for the Ably driver. | + +## CORS Variables + +| Name | Default Value | Allowed Values | Description | +| `APP_CORS_ALLOWED_ORIGINS` | "" | Any URI | The allowed origins for CORS, separated by commas. | From 7d403aaee351db50d64b6c731d80056a028e6f47 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 00:38:18 +0000 Subject: [PATCH 4/9] feat: add filesystem variables --- panel/1.0/environment_variables.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index f9b23f143..cc4ca4fd3 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -51,3 +51,15 @@ | Name | Default Value | Allowed Values | Description | | `APP_CORS_ALLOWED_ORIGINS` | "" | Any URI | The allowed origins for CORS, separated by commas. | + +## Filesystem Variables + +| Name | Default Value | Allowed Values | Description | +| `FILESYSTEM_DISK` | "local" | "local", "ftp", "sftp", "s3" | The default filesystem disk to use. | +| `AWS_ACCESS_KEY_ID` | | Any | The access key ID for the AWS driver. | +| `AWS_SECRET_ACCESS_KEY` | | Any | The secret key for the AWS driver. | +| `AWS_DEFAULT_REGION` | | Any | The default region of the AWS driver. | +| `AWS_BUCKET` | | Any | The name of the AWS bucket. | +| `AWS_URL` | | URL | The URL to the AWS bucket. | +| `AWS_ENDPOINT` | | URI | The endpoint to the AWS bucket. | +| `AWS_USE_PATH_STYLE_ENDPOINT` | false | true, false | Whether to use the path style endpoint. | From 14eeb5540c502b7a688e7d2ad06dd8e295981bbd Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 00:53:43 +0000 Subject: [PATCH 5/9] feat: add hashids variables --- panel/1.0/environment_variables.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index cc4ca4fd3..458671a74 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -37,6 +37,7 @@ ## Broadcasting Variables | Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| | `BROADCAST_DRIVER` | "null" | "ably", "log", "null", "pusher", "redis" | The broadcaster to use for events. | | `PUSHER_APP_KEY` | | Any | The connection key for the Pusher driver. | | `PUSHER_APP_SECRET` | | Any | | @@ -50,11 +51,13 @@ ## CORS Variables | Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| | `APP_CORS_ALLOWED_ORIGINS` | "" | Any URI | The allowed origins for CORS, separated by commas. | ## Filesystem Variables | Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| | `FILESYSTEM_DISK` | "local" | "local", "ftp", "sftp", "s3" | The default filesystem disk to use. | | `AWS_ACCESS_KEY_ID` | | Any | The access key ID for the AWS driver. | | `AWS_SECRET_ACCESS_KEY` | | Any | The secret key for the AWS driver. | @@ -63,3 +66,11 @@ | `AWS_URL` | | URL | The URL to the AWS bucket. | | `AWS_ENDPOINT` | | URI | The endpoint to the AWS bucket. | | `AWS_USE_PATH_STYLE_ENDPOINT` | false | true, false | Whether to use the path style endpoint. | + +## Hashids Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `HASHIDS_SALT` | | Any | The salt to use for hashing. | +| `HASHIDS_LENGTH` 8 | Number | The length of the hash. | +| `HASHIDS_ALPHABET` | abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 | Any | The character range to use for hashing. | From aaaa3f6f77986114a96fe83c436aa5a1cf9efb66 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 00:55:03 +0000 Subject: [PATCH 6/9] feat: add hashing variable --- panel/1.0/environment_variables.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index 458671a74..33bae38a4 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -74,3 +74,9 @@ | `HASHIDS_SALT` | | Any | The salt to use for hashing. | | `HASHIDS_LENGTH` 8 | Number | The length of the hash. | | `HASHIDS_ALPHABET` | abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 | Any | The character range to use for hashing. | + +## Hasing Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `BCRYPT_ROUNDS` | 10 | Number | The number of rounds to perform when hashing. | From 42ff085bf2104867fd9aefb89e53e72cf573ca79 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 00:57:12 +0000 Subject: [PATCH 7/9] feat: add HTTP variables --- panel/1.0/environment_variables.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index 33bae38a4..12fa22576 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -80,3 +80,10 @@ | Name | Default Value | Allowed Values | Description | |------|---------------|----------------|-------------| | `BCRYPT_ROUNDS` | 10 | Number | The number of rounds to perform when hashing. | + +## HTTP Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `APP_API_CLIENT_RATELIMIT` | 720 | Number | The number of requests to allow per minute for the client API. | +| `APP_API_APPLICATION_RATELIMIT` | 240 | Number | The number of requests to allow per minute for the application API. | From e739454a7b6acf329289d9f8cd1377036398bfc5 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 01:02:19 +0000 Subject: [PATCH 8/9] feat: add recaptcha variables --- panel/1.0/environment_variables.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index 12fa22576..ab0a87518 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -87,3 +87,12 @@ |------|---------------|----------------|-------------| | `APP_API_CLIENT_RATELIMIT` | 720 | Number | The number of requests to allow per minute for the client API. | | `APP_API_APPLICATION_RATELIMIT` | 240 | Number | The number of requests to allow per minute for the application API. | + +## reCAPTCHA Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `RECAPTCHA_ENABLED` | true | true, false | Whether reCAPTCHA should be enabled. | +| `RECAPTCHA_DOMAIN` | "https://www.google.com/recaptcha/api/siteverify" | URL | The API endpoint to use for reCAPTCHA checks. | +| `RECAPTCHA_SECRET_KEY` | "6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5" | Any | The secret key to use for the reCAPTCHA API. | +| `RECAPTCHA_WEBSITE_KEY` | "6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn" | Any | The site key to use for the reCAPTCHA API. | From f0fc8b73735443cb18cff54f65aa8bb42a300fe9 Mon Sep 17 00:00:00 2001 From: devnote-dev Date: Fri, 2 Dec 2022 01:05:06 +0000 Subject: [PATCH 9/9] feat: add trusted proxy variables --- panel/1.0/environment_variables.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panel/1.0/environment_variables.md b/panel/1.0/environment_variables.md index ab0a87518..23ef2eb2d 100644 --- a/panel/1.0/environment_variables.md +++ b/panel/1.0/environment_variables.md @@ -96,3 +96,9 @@ | `RECAPTCHA_DOMAIN` | "https://www.google.com/recaptcha/api/siteverify" | URL | The API endpoint to use for reCAPTCHA checks. | | `RECAPTCHA_SECRET_KEY` | "6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5" | Any | The secret key to use for the reCAPTCHA API. | | `RECAPTCHA_WEBSITE_KEY` | "6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn" | Any | The site key to use for the reCAPTCHA API. | + +## Trusted Proxy Variables + +| Name | Default Value | Allowed Values | Description | +|------|---------------|----------------|-------------| +| `TRUSTED_PROXIES` | | Any | The proxy IP addresses to allow, separated by commas. |