
- by x32x01 ||
Setting up an FTP (File Transfer Protocol) server on your Raspberry Pi is one of the easiest and coolest ways to transfer files between devices in your network
. It’s perfect for creating a mini home server or even your own private cloud storage
.
However, keep in mind
- FTP is not encrypted, which means your data can be exposed. So, if you’re dealing with sensitive files, it’s much safer to use SFTP (Secure File Transfer Protocol) instead
.
What You’ll Need
Before you start setting up your Raspberry Pi FTP server, make sure you have the following ready:
Step 1: Update Your Raspberry Pi
First things first - always update your system packages to make sure everything runs smoothly.
Open your terminal and type the following commands:
Press Y when prompted, and let the update finish. This ensures your Pi has the latest patches and dependencies
.
Step 2: Install the FTP Server Utility
Next, install the vsftpd package (Very Secure FTP Daemon). It’s lightweight, stable, and one of the most popular choices for Raspberry Pi servers.
Run this command:
Once it’s installed, we’ll tweak the configuration file to make it work the way we want
Step 3: Configure the FTP Server
Open the vsftpd configuration file using the nano text editor:
Find and uncomment (remove the # symbol) the following lines:
Then, locate this line:
Change it to:
Finally, scroll to the end of the file and add these lines:
These settings ensure each user is restricted (jailed) to their FTP folder for better security.
When you’re done, press CTRL + X, then Y, and hit Enter to save and exit.
Step 4: Create the FTP Directory
Now let’s create a folder that will act as your FTP directory. You can customize the name as you wish.
Here’s what this does:
Step 5: Set Permissions
To keep your server secure, remove the write permission from the main FTP directory so users can’t mess with it directly.
This ensures only the correct folders can be written to, improving your overall security posture
.
Step 6: Restart the FTP Service
After editing the configuration file, restart the vsftpd service so all changes take effect:
That’s it!
Your FTP server is now live and running on your Raspberry Pi.
Step 7: Test the FTP Server Using FileZilla
The best way to test your new FTP setup is with FileZilla, a free and cross-platform FTP client.
On Ubuntu or Raspberry Pi OS, install it using:
Run this command on your Raspberry Pi to get its IP:
On your computer, open FileZilla and enter:

Now try dragging and dropping a file into your FTP folder to test the transfer. If the status shows “Transfer successful”, congrats - your FTP server works perfectly!
Step 8: Use SFTP for a More Secure Connection
Although FTP is easy to use, it’s not safe for sensitive data since it sends information in plain text.
For maximum security, switch to SFTP (Secure File Transfer Protocol). It uses SSH encryption and works almost the same way as FTP but keeps your files protected.
Use this command to connect securely:
Now your transfers are encrypted and secure
.
Common Issues & Fixes
1. Can’t connect to the server?
Make sure vsftpd is running:
2. Permission denied error?
Double-check your folder permissions with:
3. Slow transfer speed?
Try connecting via Ethernet instead of Wi-Fi for a faster connection
Final Thoughts
Setting up an FTP server on Raspberry Pi is a great way to create a personal file-sharing system at home. It’s lightweight, reliable, and gives you complete control over your data
.
While FTP is handy for quick file transfers, remember that SFTP is the better choice for secure environments. So go ahead, try both, and find what works best for your setup
Enjoy your new Raspberry Pi file server - your own mini cloud!



However, keep in mind


What You’ll Need
Before you start setting up your Raspberry Pi FTP server, make sure you have the following ready:Raspberry Pi OS installed
MicroSD card with enough space
Stable network connection
User with root or sudo privileges
Step 1: Update Your Raspberry Pi
First things first - always update your system packages to make sure everything runs smoothly.Open your terminal and type the following commands:
Code:
sudo apt update
sudo apt full-upgrade

Step 2: Install the FTP Server Utility
Next, install the vsftpd package (Very Secure FTP Daemon). It’s lightweight, stable, and one of the most popular choices for Raspberry Pi servers.Run this command:
Code:
sudo apt install vsftpd
Once it’s installed, we’ll tweak the configuration file to make it work the way we want

Step 3: Configure the FTP Server
Open the vsftpd configuration file using the nano text editor: Code:
sudo nano /etc/vsftpd.conf
Find and uncomment (remove the # symbol) the following lines:
Code:
write_enable=YES
local_umask=022
chroot_local_user=YES
Then, locate this line:
Code:
anonymous_enable=YES
Code:
anonymous_enable=NO
Finally, scroll to the end of the file and add these lines:
Code:
user_sub_token=$USER
local_root=/home/$USER/FTP

When you’re done, press CTRL + X, then Y, and hit Enter to save and exit.
Step 4: Create the FTP Directory
Now let’s create a folder that will act as your FTP directory. You can customize the name as you wish. Code:
mkdir -p /home/pi/FTP/files
Here’s what this does:
- Creates a new folder named FTP in your home directory.
- Inside it, adds a subfolder called files.
Step 5: Set Permissions
To keep your server secure, remove the write permission from the main FTP directory so users can’t mess with it directly. Code:
chmod a-w /home/pi/FTP

Step 6: Restart the FTP Service
After editing the configuration file, restart the vsftpd service so all changes take effect: Code:
sudo service vsftpd restart
That’s it!

Your FTP server is now live and running on your Raspberry Pi.
Step 7: Test the FTP Server Using FileZilla
The best way to test your new FTP setup is with FileZilla, a free and cross-platform FTP client.
Install FileZilla
On Ubuntu or Raspberry Pi OS, install it using: Code:
sudo apt install filezilla
Find Your Pi’s IP Address
Run this command on your Raspberry Pi to get its IP: Code:
ifconfig
Connect via FileZilla
On your computer, open FileZilla and enter:- Host: Raspberry Pi IP address
- Username: pi
- Password: raspberry
- Port: 21

Now try dragging and dropping a file into your FTP folder to test the transfer. If the status shows “Transfer successful”, congrats - your FTP server works perfectly!

Step 8: Use SFTP for a More Secure Connection
Although FTP is easy to use, it’s not safe for sensitive data since it sends information in plain text.For maximum security, switch to SFTP (Secure File Transfer Protocol). It uses SSH encryption and works almost the same way as FTP but keeps your files protected.
Use this command to connect securely:
Code:
sftp pi@your-pi-ip

Common Issues & Fixes
1. Can’t connect to the server?
Make sure vsftpd is running:
Code:
sudo systemctl status vsftpd
2. Permission denied error?
Double-check your folder permissions with:
Code:
ls -l /home/pi/FTP
3. Slow transfer speed?
Try connecting via Ethernet instead of Wi-Fi for a faster connection

Final Thoughts
Setting up an FTP server on Raspberry Pi is a great way to create a personal file-sharing system at home. It’s lightweight, reliable, and gives you complete control over your data 
While FTP is handy for quick file transfers, remember that SFTP is the better choice for secure environments. So go ahead, try both, and find what works best for your setup

Enjoy your new Raspberry Pi file server - your own mini cloud!


Last edited: