mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-11 05:44:45 -06:00
Add docs for SFTP standalone
This commit is contained in:
parent
84f074f7d8
commit
d02237d293
@ -71,6 +71,7 @@ module.exports = {
|
|||||||
'/daemon/configuration',
|
'/daemon/configuration',
|
||||||
'/daemon/kernel_modifications',
|
'/daemon/kernel_modifications',
|
||||||
'/daemon/debian_8_docker',
|
'/daemon/debian_8_docker',
|
||||||
|
'/daemon/standalone_sftp',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
83
daemon/standalone_sftp.md
Normal file
83
daemon/standalone_sftp.md
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
# Standalone SFTP Server
|
||||||
|
|
||||||
|
::: warning
|
||||||
|
Standalone SFTP support was introduced in `Panel@v0.7.11` and `Daemon@v0.6.8` and will not work with prior versions.
|
||||||
|
:::
|
||||||
|
|
||||||
|
Pterodactyl now ships with the option to use a [standlone SFTP server](https://github.com/pterodactyl/sftp-server)
|
||||||
|
rather than using the one that was built into the Daemon. This provides better compatability with SFTP clients, improved
|
||||||
|
transfer speeds, and a more native approach to file handling and server operation.
|
||||||
|
|
||||||
|
Because this functionality is new, we've decided to make it an opt-in process, rather than an opt-out process. This page
|
||||||
|
will cover how to setup your standalone SFTP server.
|
||||||
|
|
||||||
|
## Disable Daemon's Server
|
||||||
|
To disable the Daemon SFTP server, you only need to add `sftp.enabled=false` to your Daemon's `core.json` file.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
...
|
||||||
|
"sftp": {
|
||||||
|
"port": 2022,
|
||||||
|
...
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Once you've done that, restarting the Daemon will apply the change and not boot the built-in server.
|
||||||
|
|
||||||
|
## Run the Standalone Server
|
||||||
|
To download the standalone server, execute the command below in your Daemon's base directory (generally `/srv/daemon`).
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
curl -Lo sftp-server https://github.com/pterodactyl/sftp-server/releases/download/v1.0.1/sftp-server
|
||||||
|
chmod +x sftp-server
|
||||||
|
```
|
||||||
|
|
||||||
|
Excellent, now you've got the server binary. Because we've written this server using [`Golang`](https://golang.org) there
|
||||||
|
are no additional dependencies you need to install.
|
||||||
|
|
||||||
|
### Start the Server
|
||||||
|
Finally, start the SFTP server so that you can then use it to access your files.
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
./sftp-server
|
||||||
|
```
|
||||||
|
|
||||||
|
By default this will start the SFTP server on the old port of `2022`. If you want to use a different port it can be
|
||||||
|
specified by passing the `--port` flag. For more advanced usage, please refer to the [Github README](https://github.com/pterodactyl/sftp-server#running)
|
||||||
|
which includes all of the flags and their default values.
|
||||||
|
|
||||||
|
## Daemonize Server
|
||||||
|
Chances are you'll want to daemonize the SFTP server using something like `systemd` so that it will run in the
|
||||||
|
background. Place the contents below in a file called `pterosftp.service` in the `/etc/systemd/system` directory.
|
||||||
|
|
||||||
|
``` text
|
||||||
|
[Unit]
|
||||||
|
Description=Pterodactyl Standalone SFTP Server
|
||||||
|
After=wings.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/srv/daemon
|
||||||
|
LimitNOFILE=4096
|
||||||
|
PIDFile=/var/run/wings/sftp.pid
|
||||||
|
ExecStart=/srv/daemon/sftp-server
|
||||||
|
Restart=on-failure
|
||||||
|
StartLimitInterval=600
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, run the commands below to reload systemd and start the SFTP server.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
systemctl enable --now pterosftp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizing Startup
|
||||||
|
If you're trying to pass additional arguments to the server when starting it using SystemD you'll want to modify
|
||||||
|
the `ExecStart` line. Something like `ExecStart=/srv/daemon/sftp-server --port 2022` for example.
|
||||||
Loading…
x
Reference in New Issue
Block a user