Unable to Launch TightVNC Function on Ubuntu Server 22.04 Despite Setting up Auto-Startup Service

After following the tutorial (, I reached Step 4, ‘Running VNC as a System Service’. However, I encountered an issue while trying to start the VNC function. Using the command ‘ps -x’, I noticed that the TightVNC service was already running. Despite this, I received an error message when attempting to VNC, stating ‘target machine actively refused it’. To resolve this, I manually terminated the TightVNC service using the command ‘vncserver -kill :1’, and then restarted it with ‘vncserver’. This allowed me to successfully use the VNC function.

However, I find it inconvenient that I have to repeat this step after rebooting the PC every time. Could someone please assist with this issue? It’s proven to be quite troublesome.

I’m using Ubuntu Server 22.04."

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.

Site Moderator
Site Moderator badge
October 23, 2023


When you enable the service it will start on boot and when you try to start it again it will fail to do so since the service is already running.

By setting up the VNC server to run as a systemd service you can start, stop, and restart it as needed, like any other service.

When the the VNC is configured as systemd service it will be ready to use whenever your server boots up, and you can manage it with systemctl commands like any other systemd service.

Hope that this helps!

Try DigitalOcean for free

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

Sign up

Featured on Community

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