How to Set Up SFTP Server on Ubuntu 26.04

To set up an SFTP server on Ubuntu 26.04, use OpenSSH and chroot user sftpuser.

Step 1 : Update.

Step 2 : Install OpenSSH.

Step 3 : Set a password. Press Enter to skip extra fields.

Step 4 : Chroot /home/sftpuser (owned by root). Uploads go in files.

Step 5 : Write the match block.

Step 6 : Restart SSH.

Step 7 : Allow SSH in UFW.

Step 8 : From the client. Change the IP. Password is sftpuser. put hello.txt into files.

You can also connect with an SFTP client such as FileZilla or WinSCP (host 192.168.1.50, user sftpuser, protocol SFTP).

You have set up an SFTP server on Ubuntu 26.04.