Installing SFTPGo on Debian Latest
In this tutorial, we will teach you how to install SFTPGo on Debian latest. SFTPGo is an open source SFTP server that enables users to securely transfer data between two systems. Although the official documentation of SFTPGo installation is available on their GitHub page, we have summarized the process for easy use.
Prerequisites
To install SFTPGo, you should have the following prerequisites:
- A server running Debian Latest
- Root access to the server
- A non-root user with sudo privileges
Step 1 - Update and Upgrade
Before installing SFTPGo, it is recommended to update the system to the latest version. Run the following command to update and upgrade the system:
sudo apt-get update && sudo apt-get upgrade
Step 2 - Install Dependencies
SFTPGo requires the following dependencies:
- Golang
- SQLite
Run the following command to install these dependencies on your Debian system:
sudo apt install golang sqlite3
Step 3 - Download SFTPGo Source Code
Run the following command to download the latest version of SFTPGo from GitHub:
go get github.com/drakkan/sftpgo
Step 4 - Build and Install SFTPGo
After downloading the source code, run the following commands to build and install SFTPGo:
cd ~/go/src/github.com/drakkan/sftpgo
make release
sudo make install
Step 5 - Create Configuration File
Run the following command to create a configuration file for SFTPGo:
sudo nano /etc/sftpgo.toml
Add the following content in the file:
[server]
listen_address = "0.0.0.0:2222"
auth_mode = "password"
data_dir = "/var/lib/sftpgo"
[database]
dialect = "sqlite3"
dsn = "/var/lib/sftpgo/sftpgo.db"
[[users]]
username = "username"
password = "password"
home_dir = "/home/username"
Make sure to replace the username and password fields with your desired values.
Step 6 - Create Directories
SFTPGo requires the following directories to be created:
- /var/lib/sftpgo/
- /var/log/sftpgo/
- /var/run/sftpgo/
Run the following commands to create these directories:
sudo mkdir -p /var/lib/sftpgo/
sudo mkdir -p /var/log/sftpgo/
sudo mkdir -p /var/run/sftpgo/
Step 7 - Start SFTPGo
Run the following command to start SFTPGo:
sudo sftpgo -config /etc/sftpgo.toml
Conclusion
Congratulations! You have successfully installed SFTPGo on Debian latest. You can now securely transfer data between two systems using SFTPGo.