Connect with us

How To

How to Set up an FTP Server on the Raspberry Pi?



Raspberry Pi FTP Server

Raspberry Pi FTP Server: Many of the Raspberry Pi users want to transfer the files quickly and easily between the Raspberry Pi and the computer. You may install the Raspbian OS and just want a few of your key files. It is a very useful thing to learn how to set up the FTP server on the Raspberry Pi.  With the File Transfer Protocol or SFTP (SSH File Transfer Protocol, also known as the Secure File Transfer Protocol). You can transfer files from the Raspberry Pi to your other computers and vice versa. It only takes some little set-up, but once running, it is a really efficient way to move the files back and forth.

Raspberry Pi FTP Server
Raspberry Pi FTP Server

For this setup, it is recommended to use the Raspbian OS on your Raspberry Pi, which makes the accessing of FTP much easy. It also means that you don’t necessarily have to install any external software. It comes with a program called SFTP-server from the OpenSSH suite. SFTP-Server is SFTP, rather than FTP, and that is a good thing. The old File Transfer Protocol leaves both the command and data channels unencrypted, which leaves the data vulnerable to exploits.

Related: How to Use Raspberry Pi as a Chromecast Alternative?

How to Set up an FTP Server on the Raspberry Pi? | Raspberry Pi FTP Server

Step 1: Enable SSH, at first, you have to make sure that the SSH (Secure Shell) is enabled. There are two different ways you can do this, and it doesn’t matter which one you can use.

Go to Preferences > Raspberry Pi Configuration and then click on the “Interfaces” tab. There, select “SSH: Enabled.”

Raspberry Pi FTP Server
Raspberry Pi FTP Server

Using Terminal

Open the Terminal and enter the following command:

sudo raspi-config

Then go to the Advanced Options and select SSH. The config shows you, “Would you like the SSH server to be enabled?” Now select “Yes.”

Raspberry Pi FTP Server
Raspberry Pi FTP Server

Now the SSH server is enabled and you can quit the config by selecting the “Finish.”

Raspberry Pi FTP Server
Raspberry Pi FTP Server

That’s all you needed to do to set up the server. Now you have completed half of the process.

Step 2: You now have the FTP server running on the Raspberry Pi, but to connect to that FTP server, you require an FTP client no

matter whatever device you are using to connect.

If you are using Windows PC, just go to FileZilla’s download page and install their software.

Now open the FileZilla. Enter the following information:

Raspberry Pi FTP Server
Raspberry Pi FTP Server

Host: Your public/private IP address. If you don’t know the public IP address, you can go to Google – or DuckDuckGo, (the default search engine on Raspbian) and type “what is my IP address.” If you are only going to use FTP connection from inside your home network, you can use the private IP address, which you can discover with this command:

hostname –I

Username: Your Raspberry Pi’s Default Username: pi

Password: Your Raspberry Pi’s Default Password: raspberry

Port: 22

After clicking the Quickconnect button, you can see the contents of the Raspberry Pi home directory (default home directory is /home/pi) on the right side of the FileZilla window.

That’s it! You are now ready to access and move files to and from your Raspberry Pi remotely.

Related: How to Set up a Raspberry Pi AirPlay Receiver?


If you cannot connect to the FTP server and are greeted with something like:

Error: Connection timed out after 20 seconds of inactivity

Error: Could not connect to a server

Now you need to ensure that you have set up the port forwarding on your router, which means that you need your router to translate for you. One of the ports on the router has to correspond to that port 22 we set up, or else your server will be close to outside access. Using the SFTP-Server to set up your FTP Server provides access to the users with sufficient privileges. If you wish to give limited users the power to transfer the files and directories, then you have to do a lot more work. The Raspberry Pi Foundation has a perfect guide to that project.

Thank you for reading this post.