Why Headless Is the Right Way to Run a Pi 5
A Raspberry Pi 5 sitting on your desk connected to a monitor, keyboard, and mouse is a fine way to experiment – but it is not how most developers actually want to work. The real appeal of the Pi 5 is running it headless: no display, no peripherals, just a compact Linux machine on your network that you connect to from your main workstation. You get a dedicated development environment that does not eat into your laptop’s resources, stays on around the clock, and costs almost nothing to run.
The process is less complicated than it sounds. With the right image, a correctly configured SD card, and a few minutes of SSH setup, you can have a fully remote development box running in under an hour. This guide covers everything from flashing the OS to forwarding VS Code over SSH, with a focus on making the setup stable and repeatable.

Flashing the OS and Enabling SSH Before First Boot
Start with the official Raspberry Pi Imager, available for Windows, macOS, and Linux at raspberrypi.com. Select Raspberry Pi OS Lite (64-bit) as your image – the desktop version adds nothing useful to a headless setup and consumes storage you will want for project files. Choose your SD card or, if you plan to boot from USB, your SSD enclosure. Before writing, click the gear icon or press Ctrl+Shift+X to open the advanced options panel.
Inside that panel, do three things: set a hostname (something like pidev.local), create a user account with a strong password, and enable SSH with password authentication. If you have an existing SSH public key, paste it into the authorized keys field now – it will save you the trouble of copying it over later. Also fill in your Wi-Fi credentials if you are not running an ethernet cable, though ethernet is strongly recommended for remote development work because it eliminates the one variable most likely to cause dropped connections. Write the image, eject the card, insert it into the Pi 5, and power on.
Finding the Pi and Making the Connection Permanent
Once the Pi boots – give it about 90 seconds the first time – you can reach it with ssh yourusername@pidev.local from any machine on the same network. mDNS handles the name resolution on most home networks without any extra configuration. If that fails, log into your router and find the Pi’s assigned IP address from the DHCP client list.
A dynamic IP address is workable day to day, but it will break your SSH config entries and any remote tunnels the moment the router reassigns it. The cleanest fix is a DHCP reservation: find the Pi’s MAC address with ip link show, then add a static lease in your router’s admin panel. Every router handles this differently, but the field is typically labeled “Address Reservation” or “Static DHCP” under the LAN settings. This way the Pi always gets the same address without needing to configure a static IP on the device itself, which can cause problems if you move the Pi to a different network.
With a fixed address in hand, edit ~/.ssh/config on your development machine and add a host block. Set Host to a short alias like pidev, HostName to the reserved IP, User to your Pi username, and IdentityFile to your private key path. After that, ssh pidev is all you need to type. Add ServerAliveInterval 60 and ServerAliveCountMax 3 to the block to keep idle connections from dropping.
Key-based authentication should be your default from this point. If you enabled password auth during flashing and skipped the key setup, run ssh-copy-id pidev now. Once your key is working, open /etc/ssh/sshd_config on the Pi and set PasswordAuthentication no, then restart the SSH service with sudo systemctl restart ssh. Password auth over a local network is low risk, but disabling it costs nothing and removes an entire class of potential problems.

Updating the System and Installing Dev Tools
Before installing anything, bring the system fully up to date. Run sudo apt update && sudo apt full-upgrade -y and let it finish. On a fresh Pi OS Lite image this can take a few minutes. Follow it with sudo apt autoremove -y to clear any obsolete packages. The Pi 5 ships with a notably faster processor than its predecessors, so compilation and package installation times are considerably shorter than you might expect from earlier models.
From here, the specific tools you install depend entirely on your stack. For Python work, python3-venv and python3-pip cover the basics. Node.js is best installed through nvm rather than the apt package, since the apt version is often several major versions behind. For compiled languages, build-essential and git are the starting point. If your workflow involves containers, Docker installs cleanly on Pi OS 64-bit via the official convenience script at get.docker.com – the Pi 5’s ARM64 architecture is fully supported by most mainstream Docker images.
Connecting VS Code for a Full Remote IDE Experience
Visual Studio Code’s Remote – SSH extension turns the Pi into a proper remote development machine with full IDE features. Install the extension from the VS Code marketplace, open the command palette with Ctrl+Shift+P, and select Remote-SSH: Connect to Host. Choose the pidev alias you set up earlier. VS Code will install its server-side component on the Pi automatically on the first connection – this takes a minute or two and only happens once.
After connecting, you can open any folder on the Pi’s filesystem through VS Code as if it were local. Extensions install and run on the Pi side, so linters, language servers, and debuggers all operate against the Pi’s actual environment. The Pi 5’s 4GB or 8GB RAM handles most language server processes without issue. If you find the language server for a large project consuming too much memory, setting editor.semanticHighlighting.enabled to false and limiting the number of open files in your workspace configuration helps noticeably.
One detail worth getting right early: set up a tmux or screen session for any long-running processes on the Pi. When VS Code’s SSH connection drops – and it will, at some point – any terminal process running outside a multiplexer is killed. With tmux, those processes keep running and you reattach to them on reconnect. Run sudo apt install tmux, add a basic ~/.tmux.conf to set your prefix key and enable mouse mode, and make it a habit to start long builds or servers inside a named session from the start.





