How to Install SFTPGo on Fedora Server Latest

SFTPGo is an open-source SFTP server that aims to provide a simple, secure, and easy-to-use file transfer service. In this tutorial, we will guide you through the process of installing and configuring SFTPGo on Fedora Server Latest.

Prerequisites

Before starting this tutorial, please ensure the following prerequisites are met:

Step 1: Install Dependencies

SFTPGo requires several dependencies to be installed. You can install all the required dependencies using the following command:

sudo dnf install -y curl git gcc golang

Step 2: Clone SFTPGo Repository

Next, you need to clone the SFTPGo repository from GitHub using git. Use the following command to clone it:

git clone https://github.com/drakkan/sftpgo.git

Step 3: Build SFTPGo

Once the repository is cloned, navigate to the sftpgo directory using the command:

cd sftpgo

Now you can build SFTPGo with the following command:

make build

Step 4: Create Configuration File

After building SFTPGo, you need to create a configuration file. You can create a sample configuration file using the following command:

./sftpgo sample

This will create a sftpgo.yaml configuration file in the current directory.

Step 5: Configure SFTPGo

Open the sftpgo.yaml configuration file using your preferred text editor.

nano sftpgo.yaml

Edit the listen_address and http_address attributes with your server IP address, and the domain name or subdomain pointing to your server IP address respectively.

listen_address: "your_server_ip"
http_address: "your_domain_name_or_subdomain:8080"

Next, you need to specify a username and password for the administrative user on SFTPGo.

admins:
  - username: "admin"
    password: "your_admin_password"
    role: "superadmin"

You can also specify any additional storage locations for your user accounts. By default, home_folder specifies the home folder of the user.

storage:
  - name: "home_folder"
    type: "localfs"
    path: "~/{username}"
    read_only: false
    allow_links: false
    delete_files: true
    delete_folders: true

Step 6: Create Systemd Service

Create a systemd unit to manage the sftpgo service.

sudo nano /etc/systemd/system/sftpgo.service

Paste the following configuration into the file and save it:

[Unit]
Description=SFTPGo service
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/sftpgo
ExecStart=/opt/sftpgo/sftpgo run
Restart=on-abort

[Install]
WantedBy=multi-user.target

Step 7: Start and Enable SFTPGo

Now, start and enable the sftpgo service using the following commands:

sudo systemctl start sftpgo
sudo systemctl enable sftpgo

Step 8: Open Firewall Ports

Finally, you need to open the firewall ports to allow incoming traffic on ports 22 and 80.

sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --add-port=8080/tcp --permanent
sudo firewall-cmd --reload

Conclusion

You have successfully installed and configured SFTPGo on your Fedora Server Latest. You can now upload and download files securely using SFTPGo.

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!