How to Install SFTPGo on Manjaro

SFTPGo is a high-performance SFTP server with flexible configuration options and the ability to create and manage user accounts easily. It is written in Go and can be run on different platforms such as Linux, macOS, and Windows.

This tutorial will guide you through the steps to install SFTPGo on Manjaro.

Prerequisites

Before we begin, ensure that you meet the following prerequisites:

Installation Steps

Follow the steps below to install SFTPGo on Manjaro:

Step 1: Install Dependencies

SFTPGo requires the following dependencies to run:

To install these dependencies, run the following command in your terminal:

sudo pacman -S sqlite openssh libcap

Step 2: Download SFTPGo

Next, download the SFTPGo binary for Manjaro. You can download the latest release by running the following command:

wget https://github.com/drakkan/sftpgo/releases/download/v2.1.0/sftpgo_2.1.0_linux_amd64.tar.gz

This will download the SFTPGo binary to your current working directory.

Step 3: Extract SFTPGo

After downloading SFTPGo, extract the binary using the following command:

tar -xzvf sftpgo_2.1.0_linux_amd64.tar.gz

This will extract the contents of the tarball into a new directory named sftpgo.

Step 4: Install SFTPGo Service

To install SFTPGo as a service in Manjaro, create a new systemd unit file by running the following command:

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

Paste the following configuration into the file:

[Unit]
Description=SFTPGo FTP Daemon
After=network.target

[Service]
User=root
Group=root
ExecStart=/path/to/sftpgo/sftpgo serve

[Install]
WantedBy=multi-user.target

Replace /path/to/sftpgo with the absolute path to the extracted sftpgo directory. Save and close the file.

Reload the systemd daemon:

sudo systemctl daemon-reload

Then start and enable the SFTPGo service:

sudo systemctl start sftpgo
sudo systemctl enable sftpgo

Step 5: Configure SFTPGo

By default, SFTPGo creates a configuration file (sftpgo.json) in the same directory as the binary file. You can use this file to configure SFTPGo according to your needs.

After the initial startup of the SFTPGo service, stop it by running:

sudo systemctl stop sftpgo

Then edit the sftpgo.json configuration file. For example, to add a new user, add the following JSON code:

"users": [
  {
    "username": "newuser",
    "password": "password",
    "homedir": "/home/newuser"
  }
]

This will create a new user with the username newuser, a password of password, and a home directory at /home/newuser.

Save and close the sftpgo.json file.

Step 6: Start SFTPGo

Finally, start the SFTPGo service:

sudo systemctl start sftpgo

Conclusion

You have successfully installed SFTPGo on Manjaro and configured it to create and manage user accounts. You can now use SFTPGo to securely transfer files over the network.

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!