Setting up an AirPrint Server on your Raspberry Pi

In this project, we will be showing you how to set up your Raspberry Pi as an AirPrint server.

Raspberry Pi AirPrint

AirPrint is a printing protocol designed by Apple so that their devices would not need to download or install drivers.

By following this guide, you will be able to add AirPrint functionality to any printer that is connected to your Raspberry Pi.

This project is an excellent way of adding extra functionality to both cheap and old printers. Implementing AirPrint support will allow you to print from your Apple device to your connected printer easily.

Before following this project, you will need to have first set up the CUPS software on your device.

Cups is what will act as the brains of your AirPrint server on your Raspberry Pi. It will handle the communication between your Raspberry Pi and the connected printer.

Equipment List

Below are the pieces of equipment that you will need for this tutorial on installing AirPrint on your Raspberry Pi.

Recommended

Optional

This project on setting up your Raspberry Pi as an AirPrint server was tested on a Raspberry Pi 4 running the latest version of Raspbian Buster.

Setting up AirPrint on your Raspberry Pi

Before you can set up AirPrint on your Raspberry Pi, make sure you have followed our print server tutorial.

That tutorial will walk you through all of the steps you need to get the CUPS software up and running on your device.

Cups is a powerful software that allows communication between your Raspberry Pi and a printer.

The AirPrint software will work on top of the Cups software, allowing communication between your Apple device and your Raspberry Pi.

1. Before you can complete this tutorial, you must have completed our Raspberry Pi print server tutorial.

Without completing these steps, you will be unable to connect to a printer using AirPrint.

2. Before we install the AirPrint software, we need to ensure everything is up to date

Updating packages on your device is a straightforward process and can be done with the following two commands.

sudo apt update
sudo apt full-upgrade

3. To be able to get AirPrint on your device, you will need to install the “Avahi daemon

You can install this package to your Raspberry Pi by running the following command.

sudo apt install avahi-daemon

This package is an implementation of Apple’s Zeroconf architecture. This architecture typically goes by the name Bonjour.

Bonjour is what AirPrint uses to connect two separate devices such as an iPhone and your Raspberry Pi.

The files you want to print will be sent through the Bonjour daemon and then sent to the connected printer.

4. To make sure everything is now working correctly and the AirPrint server has started properly, let us restart the device.

To restart the Raspberry Pi, run the following command on your device.

sudo reboot

5. Once your Raspberry Pi has finished rebooting, you can now test that everything is working.

At this stage, you should now be able to send stuff from your AirPrint devices to your connected printer.

Conclusion

At this point, you should now have successfully set up your Raspberry Pi to operate as an AirPrint server.

We achieved this by installing the Avahi daemon. This daemon is what implements the bonjour protocol that AirPrint communicates over.

If you have had any troubles with this quick guide, feel free to leave a comment below.

Be sure to check out some of our other Raspberry Pi projects, such as our torrent box guides.

Leave a Reply

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

3 Comments

  1. Avatar for Brandi
    Brandi on

    Thanks very much!

  2. Avatar for Brandi
    Brandi on

    Just to be sure– the printer itself has to support AirPrint for this to work, yes? I have a Brother HL-L2320D (yes, not wireless) and it does not natively support AirPrint.

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi Brandi,

      With this guide the Raspberry Pi will act as your AirPrint server and should send the print requests through to a connected printer. The printer itself does not need to natively support AirPrint.

      Your printer will, however, need to be supported by CUPS.

      Please let me know if you need anymore assistance.

      Kind regards,
      Emmet