How to access your Raspberry Pi remotely over the internet

how-to
Feb 17, 20173 mins

In this tutorial, we are using RealVNC service that has been made available for free of cost for Raspberry Pi users

I run a lot of Raspberry Pi devices at home. My fully open sourced 3D printer, Prusa i3 Mk2, is managed via Raspberry Pi, a couple of security cameras powered by Raspberry Pi, an irrigation system, and more.

However, it becomes tricky to access these devices when I’m not at home, or on the local network. Since 2016, Raspbian included a VNC server, which allowed for limited functionality to access Pi remotely through VNC.

The VNC server is powered by RealVNC, and yesterday RealVNC announced a free VNC solution for Raspberry Pi users. That means Pi users will get access to many features that are paid on other platforms, including the cloud service.

If you already have Raspbian installed on your Pi, you can install the latest version of RealVNC on your system. You do need access to the machine to configure cloud services on your Raspberry Pi, as far as I know. So log into your system and update the repositories:

sudo apt-get update



Then install the latest RealVNC packages:


sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer

While the packages are being installed, open the RealVNC site and create a user account. The free service allows you to connect up to five devices.

Once the RealVNC packages are installed on the Pi, reboot your system. Once booted, you will notice the VNC logo on the top bar of the PIXEL desktop. Click on the icon. In the messages window, you might see an error. Select the error message and click on the “resolve” button. It will open a window where you have to enter the username and password for RealVNC that you created earlier. Click “next,” and in the second window choose “Direct and Cloud Connectivity.” Click “next,” and it will show you the name of the machine.

Install the VNC Viewer on your desktop PC, smartphone or tablet (whichever device you are planning to use). Log into your account. Click on the 3 bars on the top left and you will see the name of your VNC team there. Click on it.

Eureka! Your Raspberry Pi device is listed. Open that device, provide it with the username and password for that device (the system username, and not the VNC username), and you will be logged into your system remotely. If you’re on a laptop, you can use the mouse and keyboard to manage your device, if you’re on a mobile device then use touch.

Enjoy your Raspberry Pi, remotely!

swapnilbhartiya

Swapnil Bhartiya is a journalist and writer who has been covering Linux & Open Source for 10 years. He is also a science fiction writer whose stories have been broadcasted on Indian radio and published in leading Indian magazines. He joined EFY Magazine group in 2005 as a special correspondent to cover IT and launch a new property. Later, he focused on Linux & Open Source and was promoted to Assistant Editor for Linux for You magazine. He then moved to Europe and started his own Open Source web magazine. He brags about having met in person and interviewed almost all the leading personalities of the GNU/Linux world - ranging from Richard M. Stallman to Linus Torvalds. He is currently also working on several science fiction novels. He currently resides in the capital of America.

The opinions expressed in this blog are those of Swapnil Bhartiya and do not necessarily represent those of IDG Communications, Inc., its parent, subsidiary or affiliated companies.

More from this author