mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-10 00:09:39 -06:00
1 line
7.8 KiB
JavaScript
1 line
7.8 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{305:function(e,t,s){"use strict";s.r(t);var a=s(15),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"standalone-sftp-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#standalone-sftp-server"}},[e._v("#")]),e._v(" Standalone SFTP Server")]),e._v(" "),t("div",{staticClass:"custom-block danger"},[t("p",{staticClass:"custom-block-title"},[e._v("This Software is Abandoned")]),e._v(" "),t("p",[e._v("This documentation is for "),t("strong",[e._v("abandoned software")]),e._v(" which does not recieve any security updates or support\nfrom the community. This documentation has been left accessible for historial reasons.")]),e._v(" "),t("p",[e._v("You should be installing and using "),t("RouterLink",{attrs:{to:"/wings/1.0/installing.html"}},[e._v("Wings")]),e._v(" in production environments with\n"),t("RouterLink",{attrs:{to:"/panel/1.0/getting_started.html"}},[e._v("Pterodactyl Panel 1.0")]),e._v(".")],1)]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Standalone SFTP support was introduced in "),t("code",[e._v("Panel@v0.7.11")]),e._v(" and "),t("code",[e._v("Daemon@v0.6.8")]),e._v(" and will not work with prior versions.")])]),e._v(" "),t("p",[e._v("Pterodactyl now ships with the option to use a "),t("a",{attrs:{href:"https://github.com/pterodactyl/sftp-server",target:"_blank",rel:"noopener noreferrer"}},[e._v("standalone SFTP server"),t("OutboundLink")],1),e._v("\nrather than using the one that was built into the Daemon. This provides better compatibility with SFTP clients, improved\ntransfer speeds, and a more native approach to file handling and server operation.")]),e._v(" "),t("p",[e._v("Because this functionality is new, we've decided to make it an opt-in process, rather than an opt-out process. This page\nwill cover how to setup your standalone SFTP server.")]),e._v(" "),t("h2",{attrs:{id:"disable-daemon-s-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#disable-daemon-s-server"}},[e._v("#")]),e._v(" Disable Daemon's Server")]),e._v(" "),t("p",[e._v("To disable the Daemon SFTP server, you only need to add "),t("code",[e._v("sftp.enabled=false")]),e._v(" to your Daemon's "),t("code",[e._v("core.json")]),e._v(" file.")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sftp"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"ip"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"0.0.0.0"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"enabled"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[e._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"port"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("2022")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("\n ...\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("Once you've done that, restarting the Daemon will apply the change and not boot the built-in server.")]),e._v(" "),t("h2",{attrs:{id:"run-the-standalone-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#run-the-standalone-server"}},[e._v("#")]),e._v(" Run the Standalone Server")]),e._v(" "),t("p",[e._v("To download the standalone server, execute the command below in your Daemon's base directory (generally "),t("code",[e._v("/srv/daemon")]),e._v(").")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("curl")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-Lo")]),e._v(" sftp-server https://github.com/pterodactyl/sftp-server/releases/download/v1.0.5/sftp-server\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("chmod")]),e._v(" +x sftp-server\n")])])]),t("p",[e._v("Excellent, now you've got the server binary. Because we've written this server using "),t("a",{attrs:{href:"https://golang.org",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("go")]),t("OutboundLink")],1),e._v(" there\nare no additional dependencies you need to install.")]),e._v(" "),t("h3",{attrs:{id:"start-the-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#start-the-server"}},[e._v("#")]),e._v(" Start the Server")]),e._v(" "),t("p",[e._v("Finally, start the SFTP server so that you can then use it to access your files.")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./sftp-server\n")])])]),t("p",[e._v("By default, this will start the SFTP server on the old port of "),t("code",[e._v("2022")]),e._v(". If you want to use a different port it can be\nspecified by passing the "),t("code",[e._v("--port")]),e._v(" flag. For more advanced usage, please refer to the "),t("a",{attrs:{href:"https://github.com/pterodactyl/sftp-server/tree/release/v1.0.4#running",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub README"),t("OutboundLink")],1),e._v("\nwhich includes all of the flags and their default values.")]),e._v(" "),t("h2",{attrs:{id:"daemonize-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#daemonize-server"}},[e._v("#")]),e._v(" Daemonize Server")]),e._v(" "),t("p",[e._v("Chances are you'll want to daemonize the SFTP server using something like "),t("code",[e._v("systemd")]),e._v(" so that it will run in the\nbackground. Place the contents below in a file called "),t("code",[e._v("pterosftp.service")]),e._v(" in the "),t("code",[e._v("/etc/systemd/system")]),e._v(" directory.")]),e._v(" "),t("div",{staticClass:"language-text extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("[Unit]\nDescription=Pterodactyl Standalone SFTP Server\nAfter=wings.service\n\n[Service]\nUser=root\nWorkingDirectory=/srv/daemon\nLimitNOFILE=4096\nPIDFile=/var/run/wings/sftp.pid\nExecStart=/srv/daemon/sftp-server\nRestart=on-failure\nStartLimitInterval=600\n\n[Install]\nWantedBy=multi-user.target\n")])])]),t("p",[e._v("Then, run the command below to enable it in systemd and start the SFTP server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("systemctl "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("enable")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--now")]),e._v(" pterosftp\n")])])]),t("h3",{attrs:{id:"customizing-startup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-startup"}},[e._v("#")]),e._v(" Customizing Startup")]),e._v(" "),t("p",[e._v("If you're trying to pass additional arguments to the server when starting it using SystemD you'll want to modify\nthe "),t("code",[e._v("ExecStart")]),e._v(" line. Something like "),t("code",[e._v("ExecStart=/srv/daemon/sftp-server --port 2022")]),e._v(" for example.")])])}),[],!1,null,null,null);t.default=r.exports}}]); |