How to Set Up a Headless Raspberry Pi, Without Ever Attaching a Monitor

Raspberry Pi 5 remote controlled from a Windows PC
(Image credit: Tom's Hardware)

Raspberry Pis are so convenient because they're inexpensive and small, but connecting one to its own monitor, keyboard and mouse requires a lot more space and money. If you're just trying to program on the Pi or use it to control electronics such as lights, motors and sensors, there's no need to connect it to a display or input devices. You can just control the system remotely, using a VNC or SSH client on your main computer. We call this screenless install a  headless Raspberry Pi setup and it works with any model of Pi that has a network connection, even a Raspberry Pi 5.

By default, the Raspberry Pi's official operating system, Raspberry Pi OS (formerly known as Raspbian), installs with all forms of remote access disabled. But the good news is that you don't need to connect to a monitor and keyboard in order to turn them on. 

Latest Videos FromTom's Hardware
Avram Piltch
Managing Editor: Special Projects

Avram Piltch is Managing Editor: Special Projects. When he's not playing with the latest gadgets at work or putting on VR helmets at trade shows, you'll find him rooting his phone, taking apart his PC, or coding plugins. With his technical knowledge and passion for testing, Avram developed many real-world benchmarks, including our laptop battery test.

  • HerbCSO
    This is all great, and I was able to set up my Pi headless using these instructions, so thanks for providing this. However I can't seem to be able to set the resolution on the VNC desktop any higher than what appears to be about 640x480 - any idea how I can crank that up a little? That's so 1990's... ;]
    Reply
  • janseta
    Hello,
    I think there is a little oversight in the "Headless Install" instructions on the Raspberry. Specifically in the "Direct Ethernet Connection" section.

    It describes that the Raspberry and the PC must be connected by a network cable. But you FORGET to say that it must be a crossover cable... (or do it with 2 network cables and an intermediate switch).

    It took me a couple of days and several reinstallations of the Raspian, so I leave this advice here for those who can take advantage of it.

    Greetings

    Translated with www.DeepL.com/Translator (free version)
    Reply
  • fsebbah
    Hello,
    I followed your tutorial and its great. I use a PI 4 8Go
    I installed this PI OS : 2020-08-20-raspios-buster-armhf.img
    Two remarks:
    One : In the Wifi properties, afetr i shared it, I activated the ssh port 22. I clicked on the parameter's button and I create a service and the name box, i give the name of my Latpo
    Second: The password is pi et not raspberry.
    Thanks for your tutorial,
    Franck
    Reply
  • Senile Otaku
    Apparently in the interim the Ubuntu rPi image no longer has a "pi" user. I looked in the /home directory and saw a "ubuntu" dir there, and confirmed the login name in /etc/passwd. Password of "ubuntu" (good guess) worked, as it immediately wanted to change the default password (I had already copied in my ssh key).
    Reply
  • fearless_fool
    My stumbling point:
    7. Write an empty text file named "ssh" (no file extension) to the root of the directory of the card.
    My Windows10 system doesn't know how to mount the SD card, presumably since it's EXT4 format (for Linux). How do the cool kids handle this step?
    Reply
  • fauxhausen
    A Windows 10 PC should see two drives, a boot drive and the SDHC which it can't mount. The boot drive will have the bootup files and that's where you drop the SSH file. My problem with the article is that I plan to have the Pi on the network to my router via ethernet, not direct ethernet to my pc.
    Reply
  • burtonrodman
    on Windows 10, the device may show up as a COM Port instead of RNDIS Gadget. If so, see this YouTube video for instructions to update the driver from official Microsoft source: (60) Installing Ethernet/RNDIS driver on Windows 10 to connect Raspberry PI via USB - YouTube
    Reply
  • galoAguirre
    hi, this worked like a charm! thanks so much!!

    although the raspberry pi imager program configured the ssh and wifi automatically,

    it did not properly download the OS image for me here in Ecuador, for some reason,

    everything else worked great, so simple!

    have agood one,

    Galo
    Reply
  • KruseLudington
    fauxhausen said:
    A Windows 10 PC should see two drives, a boot drive and the SDHC which it can't mount. The boot drive will have the bootup files and that's where you drop the SSH file. My problem with the article is that I plan to have the Pi on the network to my router via ethernet, not direct ethernet to my pc.
    Thanks for this - so did you just follow the directions as given and then connected the PI afterward to your network ()instead of the PC directly)? And as per the other comment - did you have to use a crossover cable? Thx in advance for your answers!
    Reply
  • Mnfzzz
    I just wanted to add for anyone following this guide - the pi/raspberry user is not part of Raspberry Pi by default and the Imager does not by default set up a username/password for headless setup. You will not be able to SSH using pi/raspberry if you follow the guide exactly. In the new imager, ideally, you have to click the settings gear, go to advanced options, and specify a username/password.

    I've had quite a bit of trouble with headless setup beyond that, but I'm fairly sure that's more to do with me than the imager or pi. Will be troubleshooting as soon as I can get a screen and then might update if I find anything useful.
    Reply