documentation/panel/1.0/additional_configuration.html
2022-05-04 14:25:41 +00:00

84 lines
29 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Additional Configuration | Pterodactyl</title>
<meta name="generator" content="VuePress 1.8.2">
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#0e4688">
<link rel="manifest" href="/favicons/site.webmanifest">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<meta name="description" content="Pterodactyl is an open-source game server management panel built with PHP 7, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#0e4688">
<link rel="preload" href="/assets/css/0.styles.b3d0dfa6.css" as="style"><link rel="preload" href="/assets/js/app.560ab58d.js" as="script"><link rel="preload" href="/assets/js/4.babf7215.js" as="script"><link rel="preload" href="/assets/js/1.79a56ae5.js" as="script"><link rel="preload" href="/assets/js/66.2ff8637d.js" as="script"><link rel="prefetch" href="/assets/js/10.27cec751.js"><link rel="prefetch" href="/assets/js/11.27ba30b0.js"><link rel="prefetch" href="/assets/js/12.12802391.js"><link rel="prefetch" href="/assets/js/13.bd04c4ec.js"><link rel="prefetch" href="/assets/js/14.f2be742e.js"><link rel="prefetch" href="/assets/js/15.a6802091.js"><link rel="prefetch" href="/assets/js/16.f2dea920.js"><link rel="prefetch" href="/assets/js/17.e3b378b0.js"><link rel="prefetch" href="/assets/js/18.fcb158a9.js"><link rel="prefetch" href="/assets/js/19.f0fdb6e9.js"><link rel="prefetch" href="/assets/js/2.21e1a937.js"><link rel="prefetch" href="/assets/js/20.a31cd600.js"><link rel="prefetch" href="/assets/js/21.986dab58.js"><link rel="prefetch" href="/assets/js/22.01e99816.js"><link rel="prefetch" href="/assets/js/23.ab477db3.js"><link rel="prefetch" href="/assets/js/24.3db401dc.js"><link rel="prefetch" href="/assets/js/25.fb19183c.js"><link rel="prefetch" href="/assets/js/26.199e42e5.js"><link rel="prefetch" href="/assets/js/27.53b2955f.js"><link rel="prefetch" href="/assets/js/28.b1cca863.js"><link rel="prefetch" href="/assets/js/29.c234f3e0.js"><link rel="prefetch" href="/assets/js/30.61a90133.js"><link rel="prefetch" href="/assets/js/31.6cbb938e.js"><link rel="prefetch" href="/assets/js/32.7effab83.js"><link rel="prefetch" href="/assets/js/33.5cb72a20.js"><link rel="prefetch" href="/assets/js/34.f044669f.js"><link rel="prefetch" href="/assets/js/35.92028599.js"><link rel="prefetch" href="/assets/js/36.a7402f3b.js"><link rel="prefetch" href="/assets/js/37.b81f7a4e.js"><link rel="prefetch" href="/assets/js/38.e385c788.js"><link rel="prefetch" href="/assets/js/39.5d85947d.js"><link rel="prefetch" href="/assets/js/40.6859537a.js"><link rel="prefetch" href="/assets/js/41.8357cc2d.js"><link rel="prefetch" href="/assets/js/42.ed9e1c27.js"><link rel="prefetch" href="/assets/js/43.9fd714d5.js"><link rel="prefetch" href="/assets/js/44.5250ac95.js"><link rel="prefetch" href="/assets/js/45.3ebbab0e.js"><link rel="prefetch" href="/assets/js/46.a3168226.js"><link rel="prefetch" href="/assets/js/47.7a0c0c49.js"><link rel="prefetch" href="/assets/js/48.8b4df094.js"><link rel="prefetch" href="/assets/js/49.1e699f40.js"><link rel="prefetch" href="/assets/js/5.407df260.js"><link rel="prefetch" href="/assets/js/50.fb545b0b.js"><link rel="prefetch" href="/assets/js/51.8bf819d3.js"><link rel="prefetch" href="/assets/js/52.c0fa38e2.js"><link rel="prefetch" href="/assets/js/53.acaa8c4b.js"><link rel="prefetch" href="/assets/js/54.01f718b6.js"><link rel="prefetch" href="/assets/js/55.0c83194a.js"><link rel="prefetch" href="/assets/js/56.488f03fe.js"><link rel="prefetch" href="/assets/js/57.6cdf7d48.js"><link rel="prefetch" href="/assets/js/58.139108d1.js"><link rel="prefetch" href="/assets/js/59.2de63e9e.js"><link rel="prefetch" href="/assets/js/6.8999fd8a.js"><link rel="prefetch" href="/assets/js/60.a35a1994.js"><link rel="prefetch" href="/assets/js/61.c644eb6e.js"><link rel="prefetch" href="/assets/js/62.6d624b0b.js"><link rel="prefetch" href="/assets/js/63.08f06847.js"><link rel="prefetch" href="/assets/js/64.8d69a757.js"><link rel="prefetch" href="/assets/js/65.81003f00.js"><link rel="prefetch" href="/assets/js/67.c7e98a1e.js"><link rel="prefetch" href="/assets/js/68.e7498700.js"><link rel="prefetch" href="/assets/js/69.bb730956.js"><link rel="prefetch" href="/assets/js/7.9f1ce256.js"><link rel="prefetch" href="/assets/js/70.51c1e550.js"><link rel="prefetch" href="/assets/js/71.91217b54.js"><link rel="prefetch" href="/assets/js/72.7f5dd9c7.js"><link rel="prefetch" href="/assets/js/73.3c0e5aad.js"><link rel="prefetch" href="/assets/js/74.3475c032.js"><link rel="prefetch" href="/assets/js/75.6351ca99.js"><link rel="prefetch" href="/assets/js/76.0b5f8895.js"><link rel="prefetch" href="/assets/js/77.54ccbb7a.js"><link rel="prefetch" href="/assets/js/78.8283cd45.js"><link rel="prefetch" href="/assets/js/8.f62ead52.js"><link rel="prefetch" href="/assets/js/9.7af626f7.js">
<link rel="stylesheet" href="/assets/css/0.styles.b3d0dfa6.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div><div class="fixed h-12 w-full z-50 top-0"><div class="h-12 w-full bg-black flex items-center justify-center px-4"><p class="text-grey-lightest font-semibold">
Stand with Ukraine 🇺🇦 
<a href="https://www.savethechildren.org/us/where-we-work/ukraine" target="_blank" rel="noindex nofollow noopener" class="text-blue-lighter">Donate</a> <a href="https://razomforukraine.org/" target="_blank" rel="noindex nofollow noopener" class="text-blue-lighter">Today.</a></p></div></div> <div class="theme-container mt-12"><header class="nav"><div class="sidebar-button block md:hidden flex-no-shrink"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <div class="logo-container"><a href="/" class="home-link router-link-active"><img src="/logos/pterry.svg" class="logo"> <span class="site-name hidden md:inline can-hide">Pterodactyl</span></a></div> <div class="w-full"><div class="flex"><div class="search-box"><input aria-label="Search" placeholder="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links flex-no-shrink hidden md:flex"><div class="nav-item"><a href="/project/introduction.html" class="nav-link">Documentation
</a></div><div class="nav-item"><a href="/community/about.html" class="nav-link">Community Guides
</a></div><div class="nav-item"><a href="https://discord.gg/pterodactyl" target="_blank" rel="noopener noreferrer" class="nav-link external">
Get Help
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://dashflo.net/docs/api/pterodactyl/v1/" target="_blank" rel="noopener noreferrer" class="nav-link external">
API
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <div class="nav-item"><a href="https://github.com/pterodactyl/panel" target="_blank" rel="noopener noreferrer" class="nav-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div></nav></div></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links flex-no-shrink block md:hidden"><div class="nav-item"><a href="/project/introduction.html" class="nav-link">Documentation
</a></div><div class="nav-item"><a href="/community/about.html" class="nav-link">Community Guides
</a></div><div class="nav-item"><a href="https://discord.gg/pterodactyl" target="_blank" rel="noopener noreferrer" class="nav-link external">
Get Help
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://dashflo.net/docs/api/pterodactyl/v1/" target="_blank" rel="noopener noreferrer" class="nav-link external">
API
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <div class="nav-item"><a href="https://github.com/pterodactyl/panel" target="_blank" rel="noopener noreferrer" class="nav-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div></nav> <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>Project Information</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/project/introduction.html" class="sidebar-link">Introduction</a></li><li><a href="/project/about.html" class="sidebar-link">About</a></li><li><a href="/project/terms.html" class="sidebar-link">Terminology</a></li><li><a href="/project/community.html" class="sidebar-link">Community Standards</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Panel</span> <!----> <div tabindex="0" class="version-select custom-select float-right"><div class="selected"><div class="inline-block">
1.7
<span class="rounded-full ml-2 text-green-dark">current</span></div> <span class="arrow"></span></div> <div class="items hidden"><div class="item"><div class="inline-block">
1.7
<span class="rounded-full ml-2 text-green-dark">current</span></div></div></div></div></p> <ul class="sidebar-group-items"><li><a href="/panel/1.0/getting_started.html" class="sidebar-link">Getting Started</a></li><li><a href="/panel/1.0/webserver_configuration.html" class="sidebar-link">Webserver Configuration</a></li><li><a href="/panel/1.0/additional_configuration.html" aria-current="page" class="active sidebar-link">Additional Configuration</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/panel/1.0/additional_configuration.html#backups" class="sidebar-link">Backups</a></li><li class="sidebar-sub-header"><a href="/panel/1.0/additional_configuration.html#reverse-proxy-setup" class="sidebar-link">Reverse Proxy Setup</a></li><li class="sidebar-sub-header"><a href="/panel/1.0/additional_configuration.html#recaptcha" class="sidebar-link">reCAPTCHA</a></li><li class="sidebar-sub-header"><a href="/panel/1.0/additional_configuration.html#_2fa" class="sidebar-link">2FA</a></li></ul></li><li><a href="/panel/1.0/updating.html" class="sidebar-link">Updating the Panel</a></li><li><a href="/panel/1.0/troubleshooting.html" class="sidebar-link">Troubleshooting</a></li><li><a href="/panel/1.0/legacy_upgrade.html" class="sidebar-link">Legacy Upgrades</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Wings</span> <!----> <div tabindex="0" class="version-select custom-select float-right"><div class="selected"><div class="inline-block">
1.6
<span class="rounded-full ml-2 text-green-dark">current</span></div> <span class="arrow"></span></div> <div class="items hidden"><div class="item"><div class="inline-block">
1.6
<span class="rounded-full ml-2 text-green-dark">current</span></div></div></div></div></p> <ul class="sidebar-group-items"><li><a href="/wings/1.0/installing.html" class="sidebar-link">Installing Wings</a></li><li><a href="/wings/1.0/upgrading.html" class="sidebar-link">Upgrading Wings</a></li><li><a href="/wings/1.0/migrating.html" class="sidebar-link">Migrating to Wings</a></li><li><a href="/wings/1.0/configuration.html" class="sidebar-link">Additional Configuration</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Tutorials</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/tutorials/mysql_setup.html" class="sidebar-link">Setting up MySQL</a></li><li><a href="/tutorials/creating_ssl_certificates.html" class="sidebar-link">Creating SSL Certificates</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Guides</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/guides/mounts.html" class="sidebar-link">Using Mounts</a></li></ul></div></li><li><div class="sidebar-group collapsable"><p class="sidebar-heading"><span>Development &amp; Ops</span> <span class="arrow right"></span> <!----></p> <!----></div></li></ul> </div> <div class="page"> <div class="content content__default"><h1 id="additional-configuration"><a href="#additional-configuration" class="header-anchor">#</a> Additional Configuration</h1> <p></p><div class="table-of-contents"><ul><li><a href="#backups">Backups</a><ul><li><a href="#using-local-backups">Using Local Backups</a></li><li><a href="#using-s3-backups">Using S3 Backups</a></li></ul></li><li><a href="#reverse-proxy-setup">Reverse Proxy Setup</a><ul><li><a href="#nginx-specific-configuration">NGINX Specific Configuration</a></li><li><a href="#cloudflare-specific-configuration">Cloudflare Specific Configuration</a></li></ul></li><li><a href="#recaptcha">reCAPTCHA</a><ul><li><a href="#configuring-recaptcha">Configuring reCAPTCHA</a></li><li><a href="#disabling-recaptcha">Disabling reCAPTCHA</a></li></ul></li><li><a href="#_2fa">2FA</a><ul><li><a href="#disable-2fa-requirement">Disable 2FA requirement</a></li><li><a href="#disable-2fa-for-a-specific-user">Disable 2FA for a specific user</a></li></ul></li></ul></div><p></p> <h2 id="backups"><a href="#backups" class="header-anchor">#</a> Backups</h2> <p>Pterodactyl Panel allows users to create backups of their servers. In order to create backups, a backup storage method has to be configured.</p> <p>When changing Pterodactyl Panel's backup storage method, users may still download or delete existing backups from the prior storage driver. In the instance of migrating from S3 to local backups, S3 credentials must remain configured after switching to the local backup storage method.</p> <h3 id="using-local-backups"><a href="#using-local-backups" class="header-anchor">#</a> Using Local Backups</h3> <p>By default, Pterodactyl Panel uses local storage via Wings for backups. That said, this method of backup storage can be explicitly set with the following configuration in the <code>.env</code> file:</p> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># Sets your panel to use local storage via Wings for backups</span>
<span class="token assign-left variable">APP_BACKUP_DRIVER</span><span class="token operator">=</span>wings
</code></pre></div><p>Do note that, when using local storage via Wings, the destination for backups is set in Wings' <code>config.yml</code> with the following setting key:</p> <div class="language-yml extra-class"><pre class="language-yml"><code><span class="token key atrule">system</span><span class="token punctuation">:</span>
<span class="token key atrule">backup_directory</span><span class="token punctuation">:</span> /path/to/backup/storage
</code></pre></div><h3 id="using-s3-backups"><a href="#using-s3-backups" class="header-anchor">#</a> Using S3 Backups</h3> <p>AWS S3 (or compatible storage) can be used to store remote or cloud-based backups. The following configuration options have to be set in the <code>.env</code> file or as environment variables in order to enable it:</p> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment"># Sets your panel to use s3 for backups</span>
<span class="token assign-left variable">APP_BACKUP_DRIVER</span><span class="token operator">=</span>s3
<span class="token comment"># Info to actually use s3</span>
<span class="token assign-left variable">AWS_DEFAULT_REGION</span><span class="token operator">=</span>
<span class="token assign-left variable">AWS_ACCESS_KEY_ID</span><span class="token operator">=</span>
<span class="token assign-left variable">AWS_SECRET_ACCESS_KEY</span><span class="token operator">=</span>
<span class="token assign-left variable">AWS_BACKUPS_BUCKET</span><span class="token operator">=</span>
<span class="token assign-left variable">AWS_ENDPOINT</span><span class="token operator">=</span>
</code></pre></div><p>For some configurations, you might have to change your S3 URL from <code>bucket.domain.com</code> to <code>domain.com/bucket</code>. To accomplish this, add <code>AWS_USE_PATH_STYLE_ENDPOINT=true</code> to your <code>.env</code> file.</p> <h2 id="reverse-proxy-setup"><a href="#reverse-proxy-setup" class="header-anchor">#</a> Reverse Proxy Setup</h2> <p>When running Pterodactyl behind a reverse proxy, such as <a href="https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-mean-" target="_blank" rel="noopener noreferrer">Cloudflare's Flexible SSL<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>
or Nginx/Apache/Caddy, etc., you will need to make a quick modification to the Panel to ensure things continue to work as expected. By default, when using these reverse proxies,
your Panel will not correctly handle requests. You'll most likely be unable to login or see security warnings in your browser console as it attempts to load insecure assets.
This is because the internal logic the Panel uses to determine how links should be generated thinks it is running over HTTP and not over HTTPS.</p> <p>You will need to edit the <code>.env</code> file in the Panel's root directory to contain <code>TRUSTED_PROXIES=*</code> at minimum. We highly suggest providing a specific IP address
(or comma-separated list of IPs) rather than allowing <code>*</code>. For example, if your proxy is running on the same machine as the server,
the chances are that something like <code>TRUSTED_PROXIES=127.0.0.1</code> will work for you.</p> <h3 id="nginx-specific-configuration"><a href="#nginx-specific-configuration" class="header-anchor">#</a> NGINX Specific Configuration</h3> <p>For Pterodactyl to properly respond to an NGINX reverse proxy, the NGINX <code>location</code> config must contain the following lines:</p> <div class="language-Nginx extra-class"><pre class="language-nginx"><code><span class="token keyword">proxy_set_header</span> X<span class="token operator">-</span>Real<span class="token operator">-</span>IP <span class="token variable">$remote_addr</span><span class="token punctuation">;</span>
<span class="token keyword">proxy_set_header</span> Host <span class="token variable">$host</span><span class="token punctuation">;</span>
<span class="token keyword">proxy_set_header</span> X<span class="token operator">-</span>Forwarded<span class="token operator">-</span>For <span class="token variable">$proxy_add_x_forwarded_for</span><span class="token punctuation">;</span>
<span class="token keyword">proxy_set_header</span> X<span class="token operator">-</span>Forwarded<span class="token operator">-</span>Proto <span class="token variable">$scheme</span><span class="token punctuation">;</span>
<span class="token keyword">proxy_redirect</span> off<span class="token punctuation">;</span>
<span class="token keyword">proxy_buffering</span> off<span class="token punctuation">;</span>
proxy_request_buffering off<span class="token punctuation">;</span>
</code></pre></div><h3 id="cloudflare-specific-configuration"><a href="#cloudflare-specific-configuration" class="header-anchor">#</a> Cloudflare Specific Configuration</h3> <p>If you're using Cloudflare's Flexible SSL you should set <code>TRUSTED_PROXIES</code> to contain <a href="https://www.cloudflare.com/ips/" target="_blank" rel="noopener noreferrer">their IP addresses<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
Below is an example of how to set this.</p> <div class="language-text extra-class"><pre class="language-text"><code>TRUSTED_PROXIES=173.245.48.0/20,103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,141.101.64.0/18,108.162.192.0/18,190.93.240.0/20,188.114.96.0/20,197.234.240.0/22,198.41.128.0/17,162.158.0.0/15,104.16.0.0/13,104.24.0.0/14,172.64.0.0/13,131.0.72.0/22
</code></pre></div><h2 id="recaptcha"><a href="#recaptcha" class="header-anchor">#</a> reCAPTCHA</h2> <p>The Panel uses invisible reCAPTCHA to secure the login page from brute-force attacks. If the login attempt is considered suspicious, users may be required to perform a reCAPTCHA challenge.</p> <h3 id="configuring-recaptcha"><a href="#configuring-recaptcha" class="header-anchor">#</a> Configuring reCAPTCHA</h3> <p>While we provide a global Site Key and Secret Key by default, we highly recommend changing it for your own setup.</p> <p>You can generate your own keys in the <a href="https://www.google.com/recaptcha/admin" target="_blank" rel="noopener noreferrer">reCAPTCHA Admin Console<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <p>The keys can then be applied using the Settings in the admin panel. The reCAPTCHA settings can be found on the <strong>Advanced</strong> tab.</p> <h3 id="disabling-recaptcha"><a href="#disabling-recaptcha" class="header-anchor">#</a> Disabling reCAPTCHA</h3> <div class="custom-block warning"><p class="custom-block-title">SECURITY WARNING</p> <p>We do not recommend disabling reCAPTCHA. It is a security mechanism that makes it harder to perform brute-force attacks on user accounts.</p></div> <p>If users have trouble logging in, or your Panel isn't exposed to the internet, it can make sense to disable reCAPTCHA.</p> <p>reCAPTCHA can easily be disabled using the admin panel. In the Settings, select the <strong>Advanced</strong> tab and set the <strong>Status</strong> of reCAPTCHA to <strong>disabled</strong>.</p> <h4 id="editing-your-database"><a href="#editing-your-database" class="header-anchor">#</a> Editing your database</h4> <p>If you cannot access your panel, you can modify the database directly using the following commands.</p> <div class="language-sql extra-class"><pre class="language-sql"><code>mysql <span class="token operator">-</span>u root <span class="token operator">-</span>p
<span class="token keyword">UPDATE</span> panel<span class="token punctuation">.</span>settings <span class="token keyword">SET</span> <span class="token keyword">value</span> <span class="token operator">=</span> <span class="token string">'false'</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span><span class="token keyword">key</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'settings::recaptcha:enabled'</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="_2fa"><a href="#_2fa" class="header-anchor">#</a> 2FA</h2> <p>If possible you should use the panel to update your 2FA settings. If you can't access your panel for what ever reason you can use the following steps.</p> <h3 id="disable-2fa-requirement"><a href="#disable-2fa-requirement" class="header-anchor">#</a> Disable 2FA requirement</h3> <div class="language-sql extra-class"><pre class="language-sql"><code>mysql <span class="token operator">-</span>u root <span class="token operator">-</span>p
<span class="token keyword">UPDATE</span> panel<span class="token punctuation">.</span>settings <span class="token keyword">SET</span> <span class="token keyword">value</span> <span class="token operator">=</span> <span class="token number">0</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span><span class="token keyword">key</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'settings::pterodactyl:auth:2fa_required'</span><span class="token punctuation">;</span>
</code></pre></div><h3 id="disable-2fa-for-a-specific-user"><a href="#disable-2fa-for-a-specific-user" class="header-anchor">#</a> Disable 2FA for a specific user</h3> <p>Run the following command in your <code>/var/www/pterodactyl</code> directory.</p> <div class="language-bash extra-class"><pre class="language-bash"><code>php artisan p:user:disable2fa
</code></pre></div></div> <div class="page-edit"><div class="edit-link"><a href="https://github.com/pterodactyl/documentation/edit/master/panel/1.0/additional_configuration.md" target="_blank" rel="noopener noreferrer">Help us improve this page.</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----></div> <!----> </div></div></div><div class="global-ui"></div></div>
<script src="/assets/js/app.560ab58d.js" defer></script><script src="/assets/js/4.babf7215.js" defer></script><script src="/assets/js/1.79a56ae5.js" defer></script><script src="/assets/js/66.2ff8637d.js" defer></script>
</body>
</html>