Skip to content

How to install and Configure VNC (TigerVNC) server in CentOS / RHEL 7

Updated 1 min read

Updated: 28 September 2026 · Applies to: AlmaLinux 9 / Rocky Linux 9 (TigerVNC)

CentOS/RHEL 7 are end of life. On AlmaLinux 9 / Rocky Linux 9 TigerVNC runs as a systemd service per user. The server needs a desktop environment.

Install

dnf groupinstall "Server with GUI"      # if no desktop is installed yet
dnf install tigervnc-server

Configure

  1. As the user, set a VNC password: vncpasswd.
  2. Map a display number to the user in /etc/tigervnc/vncserver.users: :1=alice.
  3. Optionally set the desktop and size in ~/.config/tigervnc/config: session=gnome and geometry=1920x1080.
  4. Start it: systemctl enable --now vncserver@:1.

Connect securely

Display :1 listens on port 5901. Do not open it to the internet: connect through an SSH tunnel (ssh -L 5901:localhost:5901 alice@SERVER-IP, then localhost:5901 in your VNC viewer).

On Ubuntu 24.04, install tigervnc-standalone-server and a desktop; or use xrdp (see "How To Install xrdp on Red Hat Enterprise Linux 8?").

Manage the service

systemctl status vncserver@:1
systemctl restart vncserver@:1
journalctl -u vncserver@:1          # errors when the desktop does not start

A black or grey screen usually means the same user is also logged in on the local desktop, or the session name in the config does not match an installed desktop (see ls /usr/share/xsessions).

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket