How To Use Your iPhone As A Raspberry Pi Monitor

Imagine this — you're packing for a week-long trip to the mountains and realize that while there, you need to finish up some work you can only do on a desktop. Unfortunately, you can no longer squeeze a laptop in your bag, and you're also not too keen on bringing an expensive device in the rugged outdoors. In that case, the best alternative is to pack a Raspberry Pi instead.

It's compact but powerful and can pretty much handle most tasks normally done on a Windows or Mac computer. You just need to connect some Raspberry Pi accessories like a monitor, keyboard, and mouse to your board, and you're all set. However, you can't just lug around a standard desktop monitor to use with your Pi. You can go for other portable options like the official seven-inch touch display, but if you really want to pack as light as possible, there's an even smaller monitor you can use: your iPhone. Software-wise, this setup only requires three apps: the Raspberry Pi Imager, Termius, and RealVNC Viewer. We'll walk you through the step-by-step of how to use your iPhone as a monitor for your Raspberry Pi.

Step 1: Configure the Raspberry Pi for wireless connection

You'll be connecting the Raspberry Pi and your iPhone wirelessly, so it's important that your board is already set up for such a connection. Here's what you need to do:

  1. Install the Raspberry Pi Imager on your desktop.
  2. Flash the Raspberry Pi OS to your microSD card using the Raspberry Pi Imager.
    1. Insert the microSD card into your computer.
    2. Launch the app.
    3. Choose your Raspberry Pi Device and Operating System.
    4. Select your microSD card as the Storage.
    5. Press Next.
    6. In the Use OS customization dialog box, click Edit settings.
    7. Enable "Set username and password" using your preferred username and password.
    8. Turn on "Configure wireless LAN" with your Wi-Fi's name as the SSID, your Wi-Fi's password as the Password, and your country code as the Wireless LAN country.
    9. Enable "Set locale settings" with the correct Time zone.
    10. Go to the Services tab.
    11. Check the box to Enable SSH.
    12. Select Use password authentication.
    13. Click Save to exit the OS Customization window.
    14. Press Yes to apply your customized settings.
    15. Click Yes again to proceed with the flashing process.
  3. Once that's done, eject your microSD card.
  4. Insert it into your Pi.
  5. Power up the board.
  6. Connect your accessories like keyboard and mouse to make the Pi fully functional as a computer.

Step 2: Set up your iPhone

With the Raspberry Pi ready, it's time to configure your iPhone and subsequently connect it to the board. Follow these steps to do so:

  1. On your iPhone, install Termius to run terminal commands and RealVNC Viewer to display the Pi's screen on your mobile device and manage your Raspberry Pi board remotely.
  2. Launch Termius.
  3. Tap on New Host.
  4. Type raspberrypi in the Hostname field.
  5. Press Save in the top-right corner.
  6. On the Hosts page, select the raspberrypi host you just created.
  7. Log in with your username and password. You should now be able to access your Pi's command line interface.
  8. On the command line, type sudo apt-get install tightvncserver.
  9. Press Enter to install the tightvncserver software. You'll use this to connect to RealVNC Viewer on your phone.
  10. Set up the tightvncserver.
    1. Type in tightvncserver.
    2. Press Enter.
    3. Set your eight-character password.
    4. Type N to skip creating a view-only password.
    5. Take note of the new desktop value for your Pi (typically raspberrypi:1).
  11. Exit the Termius app.
  12. Launch RealVNC Viewer.
  13. Tap the plus icon in the top right.
  14. Type your new desktop value as the Address and your preferred name in the Name field.
  15. Hit Save.
  16. Tap Connect to connect with your Raspberry Pi.
  17. In the Encryption screen, press Connect.
  18. In the Authentication screen, enter your tightvncserver's password.
  19. (Optional) Enable Remember Password, so you won't have to type your password every time.
  20. Press Continue to proceed with the connection. Your Pi's desktop GUI should now be displayed on your iPhone screen.
  21. Use the Pi as usual.