Hello guys, In this tutorial we will see how to access raspberry pi 4 remotely via VNC viewer. We will also see how to connect raspberry pi with direct connection and cloud connection. So that you can access it whenever and wherever you want. So lets get started.
For this you will need,
Update the VNC server and VNC viewer
First we need to check whether it is a latest version or not.
By following command we can install latest version of realVNC viewer and realVNC server.
sudo apt-get update sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
we will enable VNC in interfaces.
Go to preferences –> raspberry pi configuration –> interfaces and enable VNC.
Find Raspberry Pi IP address:
Type this command to find the IP address of raspberry pi.
Why setting static IP address for Raspberry Pi?
Now we will assign static IP address for raspberry pi. Because whenever you turn ON/OFF router. There is chance it will assign different IP address for raspberry pi. And you have to find raspberry pi IP address again with the same procedure we have done yet. OR you can find it on your router admin page.
That’s the reason we are assigning static IP address. So that we don’t have to find IP address every time when we turn ON raspberry pi.
How to set static IP address for Raspberry Pi?
Open your browser and type IP address of your of router. That is by default 192.168.0.1. it may be different depends on your router company. You will see login page of your router. If you haven’t changed the username and password. It must be admin and admin.
After login go to DHCP client list. Find raspberry pi. Copy MAC address.
Go to address reservation. Click add new. Paste the MAC address of raspberry pi and assign IP address. And enable the status. Click save.
Now reboot it.
Login again to see IP address is changed or not. Yes, we can see it is changed.
Download the VNC viewer to your computer. Install it. Now we don’t need display, keyboard, mouse. We can access raspberry pi 4 with VNC graphically.
Method 1: Direct Connection (On same network)
Open the VNC viewer. Enter IP address of the raspberry pi. It will ask username and password. Username by default is “pi” and password is “raspberry”. Enter the user and password.
You can see raspberry pi display on your computer.
You can change this password from here.
Similarly you can download the VNC viewer app for android. And enter the IP address of raspberry pi
and username and password.
This method is good if you are planning to access it on local network. But you can’t access the raspberry pi with other network. You can use second method cloud connection. You can access raspberry pi graphically anywhere from the world.
Method 2: Cloud Connection (access anywhere from the world)
For cloud connection, you will need to sign up on RealVNC. Enter your email ID and fill the details.
go to raspberry pi. And click on VNC icon then click on menu and licensing.
Enter your same mail id and password which we used to signup for realvnc.
go to your computer. Open VNC viewer. Click on sign in button. Enter email ID and password. It will ask username and password for raspberry pi. It will ask you to verify its you in your email box.
Now you see you are connected to raspberry pi via cloud.
Similarly, you can do this for mobile app.
Till then keep learning keep making.