sudo apt update
sudo apt install xfce4 xfce4-goodies
sudo apt install tightvncserver
vncserver
vncpasswd
vncserver -kill :1
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
vi ~/.vnc/xstartup
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
chmod +x ~/.vnc/xstartup
vncserver -localhost
ssh -L 59000:localhost:5901 -C -N -l sammy your_server_ip
vnc://localhost:59000
If the connection cannot be established then it's probably the firewall causing it
ufw allow from any to any port 5901 proto tcp
Creds to digitalocean
sudo pkg install tightvnc
You will be prompted to set a password
vncserver
vncserver -kill :DISPLAY