How to Install SFTPGo on Fedora CoreOS Latest

SFTPGo is a high-performance SFTP server that allows you to securely transfer files over a network. In this tutorial, you will learn how to install SFTPGo on Fedora CoreOS Latest.

Prerequisites

To follow this tutorial, you will need:

Step 1 - Install Dependencies

Before installing SFTPGo, you need to install some dependencies. Open a terminal and run the following command:

sudo dnf install -y unzip systemd-devel gcc

This will install unzip, systemd-devel, and gcc, which are required for installing SFTPGo.

Step 2 - Download SFTPGo

To download SFTPGo, go to the SFTPGo GitHub page at https://github.com/drakkan/sftpgo/releases, and download the latest release.

For example, if the latest release is v1.2.0, you can download it with the following command:

curl -LJO https://github.com/drakkan/sftpgo/releases/download/v1.2.0/sftpgo_1.2.0_linux_amd64.zip

This will download the SFTPGo binary to your current directory.

Step 3 - Extract SFTPGo

Once the SFTPGo binary is downloaded, extract it with the following command:

unzip sftpgo_1.2.0_linux_amd64.zip

This will create a directory named "sftpgo" that contains the SFTPGo binary and other files.

Step 4 - Create a Systemd Service

To run SFTPGo as a service, you need to create a systemd service file.

Create the file /etc/systemd/system/sftpgo.service with the following content:

[Unit]
Description=SFTPGo
After=network.target

[Service]
User=sftpgo
Group=sftpgo
Type=simple
ExecStart=/usr/bin/sftpgo -config-dir /etc/sftpgo -log-dir /var/log/sftpgo -data-dir /var/lib/sftpgo

[Install]
WantedBy=multi-user.target

This systemd service file will run SFTPGo as the "sftpgo" user and group, and will create log and data directories at /var/log/sftpgo and /var/lib/sftpgo respectively.

Step 5 - Create a Systemd Drop-In Configuration

To configure the SFTPGo service, create a systemd drop-in configuration file at /etc/systemd/system/sftpgo.service.d/override.conf with the following content:

[Service]
LimitNOFILE=10240

This will increase the maximum number of open files (file descriptors) that the SFTPGo service can use.

Step 6 - Create SFTPGo Configuration File

To configure SFTPGo, create a configuration file at /etc/sftpgo/sftpgo.yml with the following content:

address: 0.0.0.0
port: 22
anonymous_enable: false
password_auth: true

users:
- home_folder: /home/sftpgo
  username: sftpgo
  password: sftpgo
  public_keys: []

This configuration file will allow the "sftpgo" user to connect to the SFTPGo server using a password authentication.

Step 7 - Create the SFTPGo User and Folder

Create the sftpgo user with the following command:

sudo useradd -r -s /usr/sbin/nologin sftpgo

Create the home directory for the sftpgo user with the following command:

sudo mkdir /home/sftpgo
sudo chown sftpgo:sftpgo /home/sftpgo

Step 8 - Start and Enable the SFTPGo Service

Finally, start the SFTPGo service with the following command:

sudo systemctl start sftpgo

Enable the SFTPGo service to start at boot with the following command:

sudo systemctl enable sftpgo

Conclusion

In this tutorial, you have learned how to install SFTPGo on Fedora CoreOS Latest. With SFTPGo, you can securely transfer files over a network using the SFTP protocol.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!