mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-11 05:44:45 -06:00
1 line
9.8 KiB
JavaScript
1 line
9.8 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{401:function(e,t,a){"use strict";a.r(t);var o=a(48),n=Object(o.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"environment-configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#environment-configuration"}},[e._v("#")]),e._v(" Environment Configuration")]),e._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#reporting-all-exceptions"}},[e._v("Reporting All Exceptions")])]),a("li",[a("a",{attrs:{href:"#client-databases"}},[e._v("Client Databases")])]),a("li",[a("a",{attrs:{href:"#reverse-proxy-setup"}},[e._v("Reverse Proxy Setup")]),a("ul",[a("li",[a("a",{attrs:{href:"#nginx-specific-configuration"}},[e._v("NGINX Specific Configuration")])]),a("li",[a("a",{attrs:{href:"#cloudflare-specific-configuration"}},[e._v("Cloudflare Specific Configuration")])])])]),a("li",[a("a",{attrs:{href:"#increasing-the-editable-file-size"}},[e._v("Increasing the Editable File Size")])]),a("li",[a("a",{attrs:{href:"#disable-or-modify-recaptcha"}},[e._v("Disable or Modify ReCaptcha")]),a("ul",[a("li",[a("a",{attrs:{href:"#using-your-own-keys"}},[e._v("Using Your Own Keys")])])])])])]),a("p"),e._v(" "),a("p",[e._v("Pterodactyl's environment settings are configured and stored in an environment file — "),a("code",[e._v(".env")]),e._v(" — located in the\ninstallation root directory — generally "),a("code",[e._v("/var/www/pterodactyl")]),e._v(". Some of these settings are also stored in the database\nand will override settings found in the environment file.")]),e._v(" "),a("p",[e._v("To change this behavior you can edit the "),a("code",[e._v(".env")]),e._v(" file and change the setting "),a("code",[e._v("APP_ENVIRONMENT_ONLY=false")]),e._v(" to\n"),a("code",[e._v("APP_ENVIRONMENT_ONLY=true")]),e._v(" which will take effect the next time you refresh a page on the Panel. Generally you will\nonly need to do this if you severly corrupt a setting in the Panel or are deep in development with the software.")]),e._v(" "),a("h2",{attrs:{id:"reporting-all-exceptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reporting-all-exceptions"}},[e._v("#")]),e._v(" Reporting All Exceptions")]),e._v(" "),a("p",[e._v("By default Pterodactyl only logs and reports exceptions that are, well, exceptional by nature. There are some exceptions\nthat we expect to occur such as authentication failures or validation issues. However, in rare instances when developing,\nor even on production servers, you might need to have all exceptions logged to detect inconsistent behavior.")]),e._v(" "),a("p",[e._v("To do this, simply set "),a("code",[e._v("APP_REPORT_ALL_EXCEPTIONS=true")]),e._v(" in your "),a("code",[e._v(".env")]),e._v(" file. You'll want to turn this off once you've\ncompleted whatever it is you're needing the exceptions for, otherwise your logs will become very large, very quickly.")]),e._v(" "),a("h2",{attrs:{id:"client-databases"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-databases"}},[e._v("#")]),e._v(" Client Databases")]),e._v(" "),a("p",[e._v("By default Pterodactyl ships with the ability for clients to have their own per-server databases. If you wish to disable\nthis ability, set "),a("code",[e._v("PTERODACTYL_CLIENT_DATABASES_ENABLED")]),e._v(" to be "),a("code",[e._v("false")]),e._v(". Pterodactyl also attempts to create databases\non a database host assigned to the current server's node but will use any host if one can't be found. If you would like\nto force a database to be created only on a host belonging to that server's node, set "),a("code",[e._v("PTERODACTYL_CLIENT_DATABASES_ALLOW_RANDOM")]),e._v("\nto be "),a("code",[e._v("false")]),e._v(".")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("PTERODACTYL_CLIENT_DATABASES_ENABLED=true\nPTERODACTYL_CLIENT_DATABASES_ALLOW_RANDOM=true\n")])])]),a("h2",{attrs:{id:"reverse-proxy-setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reverse-proxy-setup"}},[e._v("#")]),e._v(" Reverse Proxy Setup")]),e._v(" "),a("p",[e._v("If you are planning on running Pterodactyl behind a reverse proxy, either using NGINX or because you are using\n"),a("a",{attrs:{href:"https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-mean-",target:"_blank",rel:"noopener noreferrer"}},[e._v("Cloudflare's Flexible SSL"),a("OutboundLink")],1),e._v(",\nyou will need to make a quick modification to the Panel to ensure things continue to work as expected. By default when\nyou are using these reverse proxies your Panel will not understand how to properly handle requests and you'll most likely\nbe unable to login, or will see security warnings in your browser console as it attempts to load insecure assets. This\nis because the internal logic the Panel is using to determine how links should be generated thinks it is running over\nHTTP, and not over HTTPS.")]),e._v(" "),a("p",[e._v("You will need to edit the "),a("code",[e._v(".env")]),e._v(" file in the Panel's root directory to contain "),a("code",[e._v("TRUSTED_PROXIES=*")]),e._v(" at minimum. We\nhighly suggest providing a specific IP address (or comma separated list of IPs) rather than allowing "),a("code",[e._v("*")]),e._v(". For example,\nif your proxy is running on the same machine as the server, chances are that something like "),a("code",[e._v("TRUSTED_PROXIES=127.0.0.1")]),e._v("\nwill work for you.")]),e._v(" "),a("h3",{attrs:{id:"nginx-specific-configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#nginx-specific-configuration"}},[e._v("#")]),e._v(" NGINX Specific Configuration")]),e._v(" "),a("p",[e._v("For Pterodactyl to properly respond to an NGINX reverse proxy, the NGINX "),a("code",[e._v("location")]),e._v(" config must contain the following lines:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("proxy_set_header X-Real-IP $remote_addr;\nproxy_set_header Host $host;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\nproxy_set_header X-Forwarded-Proto $scheme;\nproxy_redirect off;\nproxy_buffering off;\nproxy_request_buffering off;\n")])])]),a("h3",{attrs:{id:"cloudflare-specific-configuration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cloudflare-specific-configuration"}},[e._v("#")]),e._v(" Cloudflare Specific Configuration")]),e._v(" "),a("p",[e._v("If you're using Cloudflare's Flexible SSL you should set "),a("code",[e._v("TRUSTED_PROXIES")]),e._v(" to contain "),a("a",{attrs:{href:"https://www.cloudflare.com/ips/",target:"_blank",rel:"noopener noreferrer"}},[e._v("their IP addresses"),a("OutboundLink")],1),e._v(".\nBelow is an example of how to set this.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("TRUSTED_PROXIES=103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,104.16.0.0/12,108.162.192.0/18,131.0.72.0/22,141.101.64.0/18,162.158.0.0/15,172.64.0.0/13,173.245.48.0/20,188.114.96.0/20,190.93.240.0/20,197.234.240.0/22,198.41.128.0/17\n")])])]),a("h2",{attrs:{id:"increasing-the-editable-file-size"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#increasing-the-editable-file-size"}},[e._v("#")]),e._v(" Increasing the Editable File Size")]),e._v(" "),a("p",[e._v("By default the Panel attempts to set a reasonable limit for editing files through the web based file manager. However,\nsome users find it too restrictive and wish to increase the size. This is controlled by a configuration value that can\nalso be set using the "),a("code",[e._v(".env")]),e._v(" file. The default value is "),a("code",[e._v("50,000")]),e._v(" bytes but this can be increased as you see fit.")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("PTERODACTYL_FILES_MAX_EDIT_SIZE=50000\n")])])]),a("h2",{attrs:{id:"disable-or-modify-recaptcha"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#disable-or-modify-recaptcha"}},[e._v("#")]),e._v(" Disable or Modify ReCaptcha")]),e._v(" "),a("p",[e._v("To disable reCAPTCHA on login or password reset, simply set "),a("code",[e._v("RECAPTCHA_ENABLED=false")]),e._v(" in the environment file. This\nchange will take effect immediately.")]),e._v(" "),a("h3",{attrs:{id:"using-your-own-keys"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-your-own-keys"}},[e._v("#")]),e._v(" Using Your Own Keys")]),e._v(" "),a("p",[e._v("Pterodactyl comes preconfigured using a public set of reCAPTCHA keys but you may wish to use your own site\nspecific keys. To do so, follow the instructions below.")]),e._v(" "),a("ol",[a("li",[e._v("Visit "),a("a",{attrs:{href:"https://www.google.com/recaptcha/admin#list",target:"_blank",rel:"noopener noreferrer"}},[e._v("Google's reCAPTCHA Admin Console"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("li",[e._v('Click "Register New Site" and fill in a name for your keys.')]),e._v(" "),a("li",[e._v("Choose "),a("code",[e._v("reCAPTCHA v2")]),e._v(" and ensure that the option for "),a("code",[e._v("Invisible")]),e._v(" is selected.")]),e._v(" "),a("li",[e._v("Include the domain that your panel is located on.")]),e._v(" "),a("li",[e._v('On the next page displayed, locate the "Site Key" and "Secret Key". In Pterodactyl\'s control panel click on "Settings" and then the "Advanced" tab. Enter the keys in the boxes "Site Key" and "Secret Key", respectively.')])]),e._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[e._v("Disabling Domain Verification")]),e._v(" "),a("p",[e._v('If you do not want reCAPTCHA to verify the domain making the validation request you can uncheck "Verify the origin of reCaptcha solution" under "Advanced Settings" after generating your key.')])])])}),[],!1,null,null,null);t.default=n.exports}}]); |