How to Create FTP Server on Ubuntu 22

Setting up an FTP (File Transfer Protocol) server on Ubuntu 22 can greatly enhance your ability to manage and transfer files between computers on a network. Whether you’re a system administrator or a home user looking to share files between your devices, creating an FTP server on Ubuntu 22 is a straightforward process. In this comprehensive guide, we’ll walk you through the steps to set up your FTP server on Ubuntu 22, ensuring smooth and secure file transfers.


Before we begin the installation process, there are a few prerequisites you need to have:

1. Ubuntu 22 Installation

Make sure you have a working installation of Ubuntu 22 on your system. If not, you can download the latest version from the official Ubuntu website and follow the installation instructions.

2. Access to Terminal

You’ll need access to the Terminal to execute commands. You can open the Terminal by pressing Ctrl + Alt + T or by searching for it in the Applications menu.

3. Sudo Privileges

Ensure that you have sudo privileges on your Ubuntu system. You can check this by running the following command in the Terminal:

sudo -v

Step 1: Update System Packages

Before installing any new software, it’s essential to update the system packages to their latest versions. This ensures that you have the most up-to-date versions of all software installed on your system. Open the Terminal and run the following commands:

sudo apt update
sudo apt upgrade

Step 2: Install vsftpd

vsftpd (Very Secure FTP Daemon) is a lightweight and secure FTP server software for Unix-like systems. To install vsftpd, run the following command in the Terminal:

sudo apt install vsftpd

Once the installation is complete, vsftpd will be automatically started. You can verify the status of vsftpd by running:

sudo systemctl status vsftpd

Step 3: Configure vsftpd

3.1 Backup the Configuration File

Before making any changes to the vsftpd configuration file, it’s a good idea to create a backup. Run the following command to create a backup of the original configuration file:

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.original

3.2 Open the Configuration File

Next, open the vsftpd configuration file in a text editor. You can use any text editor of your choice. In this example, we’ll use nano:

sudo nano /etc/vsftpd.conf

3.3 Configure vsftpd

Inside the vsftpd configuration file, you’ll find various options that you can configure according to your requirements. Here are some essential configurations:

Allow anonymous FTP access

To allow anonymous FTP access, uncomment the following line:


Allow local users to log in

To allow local users to log in, ensure that the following line is uncommented:


Set the FTP root directory

You can specify the directory that will serve as the root for your FTP server. For example, to set the root directory to /srv/ftp, add the following line:


3.4 Save and Close the File

After making the necessary changes, save and close the vsftpd configuration file.

Step 4: Restart vsftpd Service

To apply the changes you’ve made to the vsftpd configuration, you need to restart the vsftpd service. Run the following command to restart the vsftpd service:

sudo systemctl restart vsftpd

Step 5: Allow FTP Traffic Through the Firewall

If you have a firewall enabled on your system, you’ll need to allow FTP traffic through it. Run the following command to open the FTP port (port 21) in the firewall:

sudo ufw allow 21/tcp

Step 6: Test the FTP Server

To test whether your FTP server is working correctly, you can use an FTP client. You can use FileZilla, a free and open-source FTP client, to connect to your FTP server.

6.1 Install FileZilla

If you don’t have FileZilla installed, you can install it using the following command:

sudo apt install filezilla

6.2 Connect to FTP Server on Ubuntu

Open FileZilla and enter your Ubuntu server’s IP address, username, and password. Use port 21 for the connection.

Connect to FTP Server on Ubuntu


Congratulations! You have successfully set up an FTP server on your Ubuntu 22 system. You can now easily transfer files between your Ubuntu system and other devices on your network using the File Transfer Protocol.

To sum up, setting up an FTP server on Ubuntu 22 is a simple and straightforward process. By following the steps outlined in this guide, you can quickly establish an FTP server and streamline your file transfer processes. Whether you’re a system administrator managing a network of computers or a home user looking to share files between devices, an FTP server on Ubuntu 22 can greatly simplify the process of file sharing and management.

Was this helpful ?

Adnen Hamouda

Software and web developer, network engineer, and tech blogger passionate about exploring the latest technologies and sharing insights with the community.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

Back to top button