Using Configuration Profiles to Enable iOS Printing to CUPS Servers

Thanks to Configuration Profiles, it is now possible to print to any printer that’s shared using CUPS, including both Mac OS X and Linux servers, without help from third-party software.

Aside from the obvious benefit of being free, the great thing about this approach is that the print server does not have to broadcast its presence on the same network as the iOS device. It works across routable subnets or even VPN connections.

Before you begin, please make sure you have all of the following:

  • iPhone, iPad, or iPod touch running iOS 7 or higher.
  • Mac or Linux system running CUPS, with a static/reserved address.
  • Mac running Apple Configurator to create the profile.

Enable Printer Sharing

  • OS X:
    1. Open System Preferences.
    2. Click on Sharing.
    3. Enable Printer Sharing
    4. Verify that the desired printers are enabled for everyone.
  • Linux or other *NIX:
    1. Visit the CUPS web interface <http://localhost:631>
    2. Click on the Administration tab.
    3. Enable the option to Share printers connected to this system.
      Tip: You may also need to click on the Printers tab and modify individual printers to enable sharing for them individually.

Create Profile

  1. Open Apple Configurator on your Mac.
  2. Select the Supervise tab.
  3. Click the + (plus) button.
  4. Click Create New Profile…
  5. In the Name field, give your profile a title.
  6. Click on AirPrint.
  7. Click the Configure button.
  8. Click the + (plus) button.
  9. Select the Undiscoverable radio button.
  10. Enter the IP Address of your CUPS server.
  11. Enter the Resource path, which is the path to the print queue. It will be similar to /printers/queue-name
    Tip: Run lpstat -p in the Terminal on your CUPS server to get a list of available queue names. A printer titled My_Laser_Printer would have a path of /printers/My_Laser_Printer
  12. Click the Save button.
  13. Repeat steps 9 through 13 for any additional printers you wish to configure.
  14. Click Save to save your new profile.

Install Profile

There are many ways you can send the profile to your iOS device(s). Here are a few ideas:

  • Use the Prepare feature in Configurator.
  • Export the profile, email it to yourself, and open the attachment on your device.
  • Post it on a web server and visit the URL in Safari.
  • Push it to the device via an MDM service.

Conclusion

Once your profile has been installed, try printing from any app. Your printer should appear automatically. If it doesn’t, here are a few things you can try:

  • Double-check the queue name and the IP address of the CUPS server.
  • Verify that the cups server is reachable from the network your iOS device is on.
    Tip: Visit http://server.ip.here:631 in a browser. You may receive a message that the CUPS web interface is not enabled, but that’s OK as long as the page comes up.
  • Make sure print sharing is enabled in general, as well as for the specific printer(s) you added to your profile.