Question

RealVNC Not Connecting

I have been having some problems connecting to my Droplet with RealVNC, I used the guide below to set it up. My Droplet is a (2GB) Ubuntu 16.0.4.1 x64. I have added an exception in my Windows 10 Firewall as well and the TP-Link Ports were forwarded as well.

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-14-04

Below are the errors I’m getting if I try either of these ways

46.101.13.241:5901 -> Timed out waiting for a response from the computer localhost:5901 -> The connection was refused by the computer

Xtightvnc 1860 root 3u IPv4 18916 0t0 TCP *:5901 (LISTEN)


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Ryan Quinn
DigitalOcean Employee
DigitalOcean Employee badge
January 11, 2017
Accepted Answer

You can try restarting the VNC service with the command:

sudo service vncserver restart

As the messages you are seeing do indicate that it may not be running.

An alternative that might make things easier would be to set up xfce and x2go instead of VNC. x2go runs over SSH by default making it secure and easier to configure. To create a droplet with an xfce desktop and x2go you can

1.) Go the the droplet creation page and select Ubuntu 14.04 or Ubuntu 16.04 2.) Choose a size for your droplet (This may work on 512MB but I would strongly recommend at least a 1GB) 3.) Select a region for your droplet 4.) Check the “user-data” box. A text field will be displayed. Paste the following into that text field:

#!/bin/sh
export DEBIAN_FRONTEND=noninteractive;
apt-get update;
apt-get -y install software-properties-common xubuntu-desktop;
add-apt-repository -y ppa:x2go/stable;
apt-get update;
apt-get -y install x2goserver x2goserver-xsession;

5.) Give your droplet a name and select any other options you want and then click Create.

When your droplet has finished creating it will kick off running the script we pasted into the create page. This may take up to 10-12 minutes to complete it’s process of downloading and installing additional software. After that time, you can connect to your desktop with the free x2go client for Windows, Mac or Linux.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel