The Wild

How to Deploy TigerVNC: Step-by-Step Guide

· 6 min read · Mammals

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

TigerVNC is a high-performance, cross-platform virtual network computing (VNC) server that lets you access a remote desktop graphically. Deploying it means installing the server on a machine you want to control, setting a password, starting the service, and connecting from a client. This guide walks through the standard deployment on a Linux host (the most common scenario), with notes for Windows and macOS where relevant. You will need administrative access to the target machine and a network path between client and server—typically TCP port 5900 or the next available port for additional displays.

What You'll Need

  • A Linux distribution with a package manager (apt, dnf, yum, pacman, or zypper) or a Windows/macOS machine for the server side.
  • Root or sudo privileges on the server.
  • A desktop environment installed on the server (GNOME, XFCE, KDE, etc.) if you want a full graphical session; a bare window manager also works.
  • A TigerVNC client on the machine you will connect from (TigerVNC Viewer, RealVNC Viewer, or any compatible VNC client).
  • Network access: the client must reach the server's IP address and the VNC port (5900 + display number). Firewall rules may need adjustment.
  • Optional: an SSH tunnel for encrypted connections, since VNC itself does not encrypt traffic by default.

Step-by-Step

  1. Install the TigerVNC server package. On Debian/Ubuntu: sudo apt update && sudo apt install tigervnc-standalone-server tigervnc-common. On Fedora/RHEL: sudo dnf install tigervnc-server. On Arch: sudo pacman -S tigervnc. On Windows, download the TigerVNC installer from the official site and run it, selecting the server component. On macOS, install via Homebrew: brew install tigervnc (server support is limited; most users run the viewer only).
  2. Set a VNC password for your user. Run vncpasswd as the user who will own the session. You will be prompted for a password (up to 8 characters) and an optional view-only password. This stores an obfuscated password file in ~/.vnc/passwd. The password is not the same as your system login password.
  3. Create a session startup script. The file ~/.vnc/xstartup controls what runs when the VNC server starts. Make it executable (chmod +x ~/.vnc/xstartup). A minimal example for XFCE:
    #!/bin/sh
    unset SESSION_MANAGER
    unset DBUS_SESSION_BUS_ADDRESS
    exec startxfce4
    For GNOME, use exec gnome-session; for KDE, exec startplasma-x11. If you omit this file, you may get a blank grey screen.
  4. Start the VNC server on a display number. Run vncserver :1 (display :1 uses port 5901). The first run may prompt you to set a password if you skipped step 2. You can specify geometry and depth: vncserver :1 -geometry 1920x1080 -depth 24. The server prints the desktop name and port. To stop it later, use vncserver -kill :1.
  5. Configure the firewall to allow the port. For display :1, open TCP 5901. On firewalld: sudo firewall-cmd --add-port=5901/tcp --permanent && sudo firewall-cmd --reload. On ufw: sudo ufw allow 5901/tcp. If you plan to use an SSH tunnel (recommended), you can skip opening the port publicly and forward it locally instead.
  6. Connect from the client. Open TigerVNC Viewer or any VNC client. Enter the server address as hostname:1 or IP:5901. When prompted, enter the VNC password you set. You should see the desktop environment. If the connection is refused, verify the server is running (ps aux | grep vnc) and the firewall allows the port.
  7. Set up a systemd service for automatic start (optional but recommended). Create /etc/systemd/system/vncserver@.service with a unit that runs /usr/bin/vncserver %i as your user. Enable and start it: sudo systemctl enable vncserver@:1.service && sudo systemctl start vncserver@:1.service. This ensures the VNC server starts on boot. Adjust the unit file for your distribution's path to vncserver.
  8. Secure the connection with an SSH tunnel (strongly advised). On the client, run ssh -L 5901:localhost:5901 user@server. Then connect your VNC viewer to localhost:5901. This encrypts the VNC traffic and avoids exposing the VNC port to the network. Alternatively, use a VPN.

Common Mistakes

  • Forgetting to create or make executable the xstartup file. Without it, you get a blank screen or a session that immediately exits.
  • Using the system password instead of the VNC password. The VNC password is separate and set with vncpasswd.
  • Not opening the correct port. Display :1 is 5901, :2 is 5902, and so on. A mismatch between the display number and the port causes connection failures.
  • Running the VNC server as root. This is a security risk. Always run it as the user who will use the desktop.
  • Exposing VNC directly to the internet. VNC traffic is unencrypted by default. Use an SSH tunnel or VPN.
  • Ignoring desktop environment dependencies. If the desktop environment is not installed, the session will fail to start. Install it first.

Tips

  • Use a display resolution that matches your client screen to avoid scrolling; you can change it with the -geometry flag.
  • Set a view-only password if you want to allow monitoring without control.
  • For multiple users, each can run their own VNC server on a different display number.
  • Keep TigerVNC updated to benefit from security fixes and performance improvements.
  • Test the connection locally first (from the server to itself) to isolate network issues.

Troubleshooting

  • Connection refused: Check that the VNC server is running (vncserver -list), the port is open, and no firewall is blocking it. Also verify you are connecting to the correct IP and display number.
  • Blank or grey screen: The xstartup file is missing, not executable, or points to a desktop environment that is not installed. Check ~/.vnc/*.log for errors.
  • Authentication failed: Re-run vncpasswd to reset the password. Ensure you are using the VNC password, not the system one.
  • Session crashes immediately: Look at the log file in ~/.vnc/. Common causes include missing DBus, incorrect paths, or a desktop environment that requires a display manager.
  • Slow performance: Reduce color depth (e.g., -depth 16) or use a lighter desktop environment like XFCE. Network latency also matters; a wired connection helps.
  • Cannot start multiple displays: Each display needs a unique number and port. Ensure no other VNC server is using the same display.

Frequently Asked Questions

What port does TigerVNC use?

TigerVNC uses TCP port 5900 plus the display number. Display :1 is 5901, :2 is 5902, and so on.

Can I use TigerVNC on Windows?

Yes, TigerVNC provides a Windows server and viewer. Install the package and run the server, then connect with a viewer. The configuration differs from Linux; use the TigerVNC menu or documentation for Windows-specific steps.

Is TigerVNC secure?

VNC protocol itself does not encrypt traffic. Use an SSH tunnel or VPN to secure the connection. TigerVNC supports TLS encryption in some configurations, but SSH tunneling is the simplest robust approach.

How do I stop the VNC server?

Run vncserver -kill :1 (replace :1 with your display number). If using systemd, stop the service instead.

Why do I get a blank screen when connecting?

Most often the ~/.vnc/xstartup file is missing or not executable. Create it with the command to start your desktop environment and make it executable.

Can multiple users connect to the same VNC session?

Yes, multiple viewers can connect to the same display simultaneously, but they will share control unless you set a view-only password for some. Each user typically runs their own VNC server on a separate display for isolation.