Home | Miscellaneous | Raspberry Pi | VNC Server
Sonora Computer Repair Logo
Sonora Computer Repair
A subsidiary of Charles Varvayanis
Since 1990
(209) 586-3782
charles@varvayanis.com
Sonora Computer Repair Logo

Raspberry Pi VNC Server Setup

Step-by-step instructions for setting up a VNC Server on a Raspberry Pi.

These procedures apply to Raspberry Pi 5, 4 or 3 with Raspberry Pi OS (64-Bit), (32-Bit), (Legacy 64-Bit) or (Legacy 32-Bit).


General Notes


1. General:  The procedures below are optimized for setting up a VNC Server on a Raspberry Pi 5, 4 or 3 with Raspberry Pi OS (64-Bit), (32-Bit), (Legacy 64-Bit) or (Legacy 32-Bit).

2. Internet access during setup:  Many of the steps below assume and require the Raspberry Pi is connected to a network with access to the Internet.



Notice about updates, upgrades and installations failing due to repository or network congestion or outages


Occasionally updates, upgrades and installations fail due to repository or network congestion or outages.  Sometimes there is an appropriate message saying as such, sometimes a missing file is reported, and sometimes there is just a failure message without an explanation.  When this occurs, simply run the command again.  If that does not solve the issues immediately, try again later.



Contents:

  Raspberry Pi OS Documentation
  Connect to the Raspberry Pi
  Enable VNC
  Remove packages that automatically installed and are no longer required







Raspberry Pi OS Documentation

https://www.raspberrypi.com/documentation/computers/os.html






Connect to the Raspberry Pi


Via Raspberry Pi Connect Remote shell or Raspberry Pi Connect Screen share

  https://www.raspberrypi.com/software/connect

  - or -

Via a Display, Keyboard and Mouse


  - or -

Via SSH

  Connect using the IP address or URL of the Raspberry Pi.

Determine the Raspberry Pi IP Address:

Use the SSH command in your OS to connect to the Raspberry Pi or on Windows systems use a third party tool such as PuTTY

  OS SSH command documentation:  https://www.raspberrypi.com/documentation/computers/remote-access.html#connect-to-an-ssh-server
  https://putty.software/
  https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
  https://www.putty.org
  Note:  The first time a connection is made, a security warning may be displayed | Yes






Enable VNC


Notes:


VNC is preinstalled in Raspberry Pi OS, but is disabled by default.

Wayland uses the WayVNC server and X11 uses the RealVNC server.

The "VNC Resolution" or "Headless Resolution" can only be set when in X11 mode. To set the Resolution for Wayland mode, temporarily switch to X11 mode, set the Resolution, then switch back to Wayland mode.

Enable VNC documentation:  https://www.raspberrypi.com/documentation/computers/remote-access.html#enable-the-vnc-server

Port used by VNC:  5900, Types TCP and UDP


Update Raspberry Pi OS and Components


Download the latest package lists

sudo apt update -y

Download and install the updated packages listed in the package lists

sudo apt full-upgrade -y


Enable VNC



Via Raspberry Pi Config

sudo raspi-config

Interface Options | VNC | Yes | OK | Finish

  - or -

Via the Raspberry Pi GUI (Desktop)


Click on "Start" (Raspberry) On the left side of the Task Bar at the top of the Raspberry Pi desktop
Click on "Preferences"
Click on "Control Centre"
Click on the "Interfaces"
Click on the "VNC:" | On
Click on the "Close" Button



Connect to the Raspberry Pi via VNC (Optional)

  Connect using the IP address or URL of the Raspberry Pi.

Determine the Raspberry Pi IP Address:

Use a third party tool such as RealNVC Viewer, TigerVNC or TightVNC to connect to the Raspberry Pi

  Connect to VNC documentation:  https://www.raspberrypi.com/documentation/computers/remote-access.html#connect-to-a-vnc-server
  https://www.realvnc.com/en/connect/download/viewer  (Free / Recommended)
  https://www.realvnc.com/en/connect/plan/lite  (Free)
  https://www.realvnc.com/en/connect/download/combined  (Paid)
  https://www.realvnc.com
  https://www.tightvnc.com  (Free / Open Source)
  https://tigervnc.org  (Free / Open Source)
  Note:  The first time a connection is made, a security warning may be displayed | Continue






Remove packages that automatically installed and are no longer required


Occasionally excess update, upgrade and installation packages install automatically, but are no longer required.  These can be removed automatically.

Automatically detect and remove packages no longer required

sudo apt autoremove -y



Sonora Computer Repair
Sonora, CA  95370
e-mail:  charles@varvayanis.com
Phone:  (209) 586-3782
Business Card (PDF 153 KB) PDF
www.sonoracomputer.com
www.sonoracomputer.com

© 2026 Charles Varvayanis.  All rights reserved.