Time needed: 10 minutes.
In this tutorial you will learn how easy it is to setup a remote desktop connection to your Raspberry Pi. You will be able to remotely access your Raspberry Pi from another device. By working this way, you won’t need a monitor, keyboard nor mouse connected to your Pi. Often this is also a much more convenient way to work as you can use your usual desktop PC, laptop or even smartphone.
- Prepare your Pi
For this tutorial, you need to have your Raspberry Pi running on the latest version of Raspberry Pi OS. If necessary, take a quick look at our tutorial ‘How to update your Raspberry Pi to the latest version‘. This latest version includes VNC®. VNC® is a graphical desktop sharing system that allows you to remotely control the desktop interface of your Raspberry Pi from another computer or mobile device.To setup the remote connection, your Raspberry Pi has to be connected to a monitor, keyboard and mouse. Once the connection has been established, you won’t need these peripherals any more. It’s just the time to make everything ready. There is a way to setup the remote connection even without peripherals on the Pi. But as it is more complicated, we won’t cover it in this tutorial.
- Prepare your remote PC
While your Raspberry Pi will run the VNC server, you’ll also need the VNC viewer running on your desktop PC, laptop,… . Depending which operating system you are using you will have to download the VNC viewer from following webpage:
The RealVNC application is free for private use.
To be able to connect both devices, we will use a local network or WiFi. Make sure your Raspberry Pi is connected to your LAN or WiFi network. It is also possible to make a remote connection over the internet using VNC® . But this won’t be covered it this tutorial.
- Open the Raspberry Pi Configuration window
Let’s come back to the Pi now. As already mentioned, Raspberry Pi OS comes with the VNC server pre-installed. So we just have to enable this function. For this we open: applications menu > Preferences > Raspberry Pi Configuration as shown in the picture below.
- Enable the VNC server on the Raspberry Pi
Once the Raspberry Pi Configuration window opened, click on the tab “Interfaces”. Select here “Enabled” in front of VNC.
- Find out your Raspberry Pi’s IP address
We can find the IP address by hoovering (do not click!) over the network icon (right upper corner of your screen).
You can find the IP address after ‘eth0’ for a wired connection (as our example) or after ‘wlan0’ for a wireless connection.
A static IP address makes it easier to access your Raspberry Pi from another computer. So, before setting up a VNC-connection, it is advisable to give your Raspberry Pi a static IP address. This will avoid updating the IP address of your VNC viewer at the other computer when a new IP address has ben assigned by your router. In our tutorial ‘How to give your Raspberry Pi a Static IP Address‘ you can find out how to do it.
That’s it for the Raspberry Pi. Now we can go on with the remote computer.
- Install the VNC viewer on your remote desktop PC or laptop
Once you’ve selected and downloaded the VNC viewer file for the OS on your remote computer, you have to run the installation file.
Follow the installation wizard until the Finish button.
- Establish a connection to your Raspberry Pi in VNC viewer
To make a connection with our Pi now, we have to open the VNC viewer application. There, we have two possibilities to make a connection. One is by signing in to the RealVNC server (in the cloud). Here we have to create an account first and need internet access. This connection type has the advantage of giving remote access to your Pi over the internet, but it’s slightly more complicated than the “direct connection”.
As most of the time your Raspberry Pi will be part of the same local network as your desktop PC or laptop, a direct connection is an easy and straight forward way to establish a connection. To do this, just insert the IP address of your Raspberry Pi in the navigation bar.
- Enter Username and Password
After having entered the IP address of your Raspberry Pi, an authentication window should open.
Enter the username and password of your Pi. If you didn’t change these, it’s “pi” and “raspberry” as shown in the picture above. For obvious security reasons, if not already done, consider to change your username and password on your Pi.
Congratulations! You can access your Raspberry Pi from a remote computer! From now on you can take full advantage of this much more convenient way of working on your Pi.
Once having a remote access to our Pi, most of us want to use the Pi without having to connect a monitor to the Raspberry Pi. To avoid to have a monitor connected to our Pi continously and being able to access our Pi with the VNC viewer, we need to change a display setting on our Pi.
If you don’t do this, you’ll have a black screen with an error message on your next Raspberry Pi boot. Find out what to do in our tutorial ‘How to fix ‘Cannot currently show the desktop’ on Raspberry Pi‘.