---
title: Securely Connect to your Rocky Linux Cloud Server over VNC
url: https://docs.vultr.com/securely-connect-to-your-rocky-linux-cloud-server-over-vnc
description: Learn how to establish a secure VNC connection to your Rocky Linux cloud server with step-by-step instructions for setup, configuration, and troubleshooting.
publish_date: 2022-03-01T00:00:00Z
last_updated: 2025-04-01T00:00:00Z
author: Nabeel Ahmed
header_image: https://docs.vultr.com/public/doc-assets/1268/433661a51a32b68a.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Overview

VNC (Virtual Networking Computing) is a system to access computing systems remotely by sharing graphical desktop environments.

## Prerequisites

* Deploy a new [Rocky Linux 8 Vultr cloud server](https://www.vultr.com/servers/rocky-linux).
* Set up a non-root user with sudo privileges.
* Verify that your [server is up to date](https://docs.vultr.com/how-to-update-a-vultr-cloud-server#how-to-update-almalinux-centos-rocky-linux-and-vzlinux).

## Install Dependencies

1. Install Gnome.

        $ sudo yum groupinstall "Gnome"

1. Install TigerVNC.

        $ sudo yum install tigervnc-server

## Setup VNC Server

> If you want to set up a restricted session for a user, type "y" during the _view-only password_ option. Clients who authenticate with the view-only password will have restricted mouse and keyboard access.

1. Setup VNC user password.

        $ vncpasswd

1. Edit  `vncserver.users`.

        $ sudo nano /etc/tigervnc/vncserver.users

1. At the bottom of the file, add a new VNC user. Replace `user` with your VNC user.

        :1=user

1. Copy VNC server service boilerplate.

        $ sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

1. Allow the server to run at startup.

        $ sudo systemctl enable vncserver@:1

1. Start the VNC server.

        $ sudo systemctl start vncserver@:1

1. Verify VNC server is running.

        $ sudo systemctl status vncserver@:1
        Active: active (running)

## Server Connection

1. Initiate SSH tunneled connection on the client machine.

        $ ssh -L 5901:localhost:5901 10.32.31.128 -4

    > Use the flag `-4` if your server only has an ipv4 address.

1. Using a VNC viewer of your choice, enter the following server address:

        localhost:5901

1. After entering VNC authentication credentials, you should be presented with a Gnome desktop environment.

## Additional Configuration

VNC server configurations can be set through the `$HOME/.vnc/config` file.

1. If it doesn't already exist, create and edit the `config` file.

        $ nano ~/.vnc/config

1. Arguments are line-separated and use an equal sign for values. Here's a sample config file:

        geometry=800x600
        depth=24

1. Restart the VNC server to apply changes.

        $ sudo systemctl restart vncserver@:1

## Conclusion

You should have a working secure VNC connection to your Rocky Linux Cloud Server. For more info, refer to the official [TigerVNC](https://tigervnc.org/) website for documentation.
