How to Install SFTPGo on OpenSUSE Latest
SFTPGo is an open-source FTP server powered by Go programming language. It is a lightweight and highly configurable FTP server designed for secure file transfers. In this tutorial, we will explain the steps to install SFTPGo on OpenSUSE latest.
Prerequisites
Before proceeding with the installation process, make sure that you have the following prerequisites:
- A server running OpenSUSE latest with root or sudo privileges
- A non-root user with sudo privileges
Step 1: Install Dependencies
Before installing SFTPGo on OpenSUSE, make sure to install the required dependencies. Use the following command to install them:
sudo zypper install gcc git curl
Step 2: Install Go Language
SFTPGo is powered by the Go programming language. Therefore, you need to install the Go language on your system. Run the following commands to download and install the Go language version 1.16.7:
curl -O https://dl.google.com/go/go1.16.7.linux-amd64.tar.gz
sudo tar -xvf go1.16.7.linux-amd64.tar.gz
sudo mv go /usr/local
Step 3: Configure Go Environment Variables
After installing the Go language, set the environment variables for Go by running the following command:
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
source ~/.bashrc
Step 4: Clone SFTPGo Repository
Next, clone the SFTPGo repository from Github using the following command:
git clone https://github.com/drakkan/sftpgo.git
Step 5: Build and Install SFTPGo
After cloning the repository, move to the cloned directory and run the following commands to build and install SFTPGo:
cd sftpgo
sudo make install
Step 6: Configure SFTPGo
By default, SFTPGo configuration files are stored at /etc/sftpgo. Copy the example configuration file and create a new configuration file using the following commands:
sudo cp example_configs/sftpgo.toml.example /etc/sftpgo/sftpgo.toml
sudo mkdir -p /etc/ssl/sftpgo
sudo openssl dhparam -out /etc/ssl/sftpgo/dhparams.pem 2048
Create a new user and configure its access by running the following command:
sudo sftpgoctl user add --config /etc/sftpgo/sftpgo.toml --username sammy --password passw0rd1234!
sudo sftpgoctl scope add --config /etc/sftpgo/sftpgo.toml --scope / --permissions rw --username sammy
Step 7: Start SFTPGo Service
Finally, start the SFTPGo service and enable it to start at boot time using the following commands:
sudo systemctl start sftpgo
sudo systemctl enable sftpgo
Conclusion
In this tutorial, we have explained how to install SFTPGo on OpenSUSE latest. You can now log in to your SFTP server using your preferred SFTP client and start transferring files securely.