File Transfer Protocol (FTP) is one of the oldest and most reliable ways to transfer files between computers over a network. Although newer methods like SFTP and cloud-based solutions are popular today, FTP remains widely used for sharing files, hosting websites, and providing remote access to directories in controlled environments.
In this tutorial, we will show you how to set up FTP server with VSFTPD on Debian 12 server.
Step 1 – Install VSFTPD
Debian 12 includes VSFTPD in its default package repository, so installation is straightforward. Start by updating the package index and installing the vsftpd package.
1. Install the VSFTPD package.
apt install vsftpd -y
2. Once installed, verify the version to confirm a successful setup.
vsftpd -version
Output.
vsftpd: version 3.0.3
This confirms that VSFTPD is installed correctly on your Debian 12 system.
Step 2 – Manage VSFTPD Service
After installation, VSFTPD runs as a systemd service. You need to start it, enable it to run at boot, and check its status to make sure everything is working correctly.
1. Start the VSFTPD server.
systemctl start vsftpd
2. Enable VSFTPD to start automatically when the system boots.
systemctl enable vsftpd
3. Check the status of VSFTPD service.
systemctl status vsftpd
If everything is set up properly, you should see output similar to this:
● vsftpd.service - vsftpd FTP server Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; preset: enabled) Active: active (running) since Sun 2025-09-07 06:30:32 CAT; 20s ago Process: 19885 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS) Main PID: 19886 (vsftpd) Tasks: 1 (limit: 4620) Memory: 884.0K CPU: 6ms CGroup: /system.slice/vsftpd.service └─19886 /usr/sbin/vsftpd /etc/vsftpd.conf Sep 07 06:30:32 debian12 systemd[1]: Starting vsftpd.service - vsftpd FTP server... Sep 07 06:30:32 debian12 systemd[1]: Started vsftpd.service - vsftpd FTP server.
Step 3 – Configure VSFTPD
The main configuration file for VSFTPD is stored at /etc/vsftpd.conf. Before making any changes, it’s a good practice to create a backup copy of the original file.
1. Backup the configuration file.
cp /etc/vsftpd.conf /etc/vsftpd.conf.orig
2. Now, open the configuration file in a text editor.
nano /etc/vsftpd.conf
Replace or adjust the contents with the following lines.
listen=YES listen_ipv6=NO connect_from_port_20=YES anonymous_enable=NO local_enable=YES write_enable=YES allow_writeable_chroot=YES chroot_local_user=YES secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd pasv_enable=YES pasv_min_port=40000 pasv_max_port=45000 userlist_enable=YES userlist_file=/etc/vsftpd.userlist userlist_deny=NO
3. After saving the file, restart VSFTPD to apply the changes.
systemctl restart vsftpd
Step 4 – Create FTP User
Now that the server is configured, you need to create a dedicated FTP user who will have access to the server.
1. Run the following command to create a new user account.
adduser ftpuser
You will be asked to set a password and provide optional details (full name, phone, etc.). You can press Enter to skip the optional fields.
2. Since you enabled userlist_enable=YES in the configuration, only users listed in /etc/vsftpd.userlist will be allowed to log in. Add the new user to that list.
echo "ftpuser" | tee -a /etc/vsftpd.userlist
3. Restart the VSFTPD service so the changes take effect.
systemctl restart vsftpd
Step 5 – Install FTP Client (FileZilla) and Test the Connection
To verify that your FTP server is working correctly, you can use an FTP client. One of the most user-friendly tools available on Linux is FileZilla.
1. Install FileZilla on the client machine.
apt install filezilla -y
2. Launch FileZilla.
3. In the FileZilla interface: Enter the following details.
Host: your server’s IP address (e.g., 192.168.1.100)
Username: ftpuser
Password: the password you set when creating the FTP user
Port: 21
Click Quickconnect.
4. If the setup is correct, FileZilla will connect to your FTP server. You should see the ftpuser home directory (/home/ftpuser) in the remote site panel.
Conclusion
In this tutorial, you set up an FTP server on Debian 12 using VSFTPD (Very Secure FTP Daemon). Although the server works, keep in mind that FTP by default transmits data, including usernames and passwords, in plain text. For production use, you should enable FTPS (FTP over SSL/TLS) to encrypt your connections, configure a firewall to allow only the necessary ports such as 21 and the passive port range, use strong user passwords to defend against brute-force attacks, and regularly monitor logs located in /var/log/vsftpd.log for suspicious activity./