How To Set Up a TFTP Server

What is TFTP?

Trivial File Transfer Protocol (TFTP) is a very simple file transfer protocol that works over UDP port 69. It has no authentication, no encryption, and minimal features, making it extremely lightweight. Linux enthusiasts often use TFTP for network booting, firmware updates, and embedded systems because of its speed and simplicity.

Why Use TFTP?

TFTP is ideal when you need to transfer files quickly with minimal setup. It’s often used in PXE boot servers, router firmware flashing, or transferring configs to network devices. The lack of overhead makes it faster and easier to set up than FTP or SCP in controlled networks.

Where to Use TFTP?

TFTP is common in labs, embedded development, network device maintenance, and cluster or PXE boot environments. It’s best suited for secure, isolated networks where simplicity and speed matter more than security. Public networks should avoid TFTP unless secured by other means.


Follow these steps to set up a tftp server on Linux.

1. Install tftp-hpa

sudo pacman -S tftp-hpa

2. Create the TFTP Directory

Create a directory to store your files:

sudo mkdir -p /srv/tftp

Then put the files in that folder that you want to share with your tftp server.

Set Permissions

Change ownership and permissions:

sudo chown -R nobody:nobody /srv/tftp
sudo chmod -R 755 /srv/tftp

3. Configure TFTP

Edit the configuration file:

sudo vim /etc/conf.d/tftpd

Write there

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

4. Start the TFTP Service

Enable and start TFTP:

sudo systemctl enable tftpd
sudo systemctl start tftpd

5. Test the TFTP Server

On the client machine, you can test with the IP address of your server. If you don't have another machine, you can test on your own:

tftp localhost

This will open the TFTP CLI.

Congratulations! You have successfully created and entered into the TFTP server. Type quit to exit from the TFTP terminal.