Free VPS 24/7 on GCP with Turbo VNC Viewer RDP access

Free VPS 24/7 on GCP with Turbo VNC Viewer RDP access

In this tutorial, you will learn to get free VPS that run 24 hours for lifetime. This is a Ubuntu server with RDP access via Turbo VNC viewer. You can use this VPS for forex and binary trading, 24 hours Live stream, Mining and other works that you ...

In this tutorial, you will learn to get free VPS that run 24 hours for lifetime. This is a Ubuntu server with RDP access via Turbo VNC viewer. You can use this VPS for forex and binary trading, 24 hours Live stream, Mining and other works that you prefer.

You’ll use TightVNC, a quick and light-weight remote package. This choice will make sure that our VNC connection are going to be smooth and stable even on slower internet connections.

If you want a Premium Cheap VPS with 24/7  uptime and better resources. Check the below link

Create VM Instance and Sign Up

First sing up, google cloud platform using your Gmail account. They ask to enter card details but it is only for verification. Don’t worry, it is totally free you wouldn’t charge any fees for this. We use GCP free tier for this. if you want, you able to choose powerful machine but it is not free, you have to pay.

gcp free tier

After the log in, click “menu” icon at the left upper conner. Under “compute engine”, select “VM instances” then wait for few moments. Click “create” button then a form popup then names the instance.

GPC free tier offer f1 micro virtual machine for some regions. These are the regions that are cover by free tier. Select a region and zone according to that. Select N1 series and machine type should be f1 micro. After that click change button under boot disk, in here we can select a OS and disk size.

f1micro gcp free vps

Select OS as “Ubuntu 18.04 LTS. GCP free tier gives 30GB disk space, above that, they will charge. Under firewall, tick mark both “allow HTTP and HTTPS traffic” then click “create” button. It will take some time.

f1 micro vm free vps
back to menu ↑

Set VPC Network Settings

In the menu, select “external IP address” under VPC network. Change the VM IP type to “Static”. Static IP doesn’t change during refresh the VPS.

Then click “firewall” at the left menu. You have to allow turbo VNC viewer port 5901 to connect VPS remotely. Click “create firewall rule” and name it whatever you want. Under target select “all instance in the network”. then put IP range as this and under protocols and ports select “allow all”. Now, click create button. this firewall rule allows all port and all IP ranges to connect the VM instance.

gcp firewall settings
back to menu ↑

Install Graphic Desktop Environment and VNC Server

Go back to your VM instance, then click on SSH button. A terminal will open, please wait for few moments until it finished. Carefully watch this step, don’t skip the video. you can find all the codes and guidelines below link in the description. Simply copy and paste codes from the article. 

Specifically, we will install packages for the latest Xfce desktop environment and the Tight VNC package available in the official Ubuntu repository. On VM instance, update your list of packages using the code.

sudo apt update

Now install the Xfce desktop environment on your server.

sudo apt install xfce4 xfce4-goodies

Once that installation completes, install the Tight VNC server

sudo apt install tightvncserver

To complete the VNC server’s initial configuration after installation, use this command to set up a secure password.

It is not visible on the terminal. Don’t worry, just type. The password must be between six and eight characters long. Passwords more than 8 characters will be truncated automatically. Enter a password then enter and enter it again.

vncserver

In this step, type N. Users who log in with the view-only password will not be able to control the VNC instance with their mouse or keyboard.

If you want a Premium Cheap VPS with 24/7  uptime and better resources. Check the below link
back to menu ↑

Configuring the VNC Server

Specifically, VNC needs to know which graphical desktop it should connect to. first stop the VNC server instance that is running on port 5901 with the following command.

vncserver -kill :1

Before you modify the “ startup” file, back up the original.

mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

Now create a new xstartup file and type following command. You will not see the command because it open quickly.

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

Add these commands to the file. Please check the description for all commands. After adding this press Control + X then type Y to save changes. After that press enter to exit to terminal.

To ensure that the VNC server will be able to use this new startup file properly, we’ll need to make it executable. Enter following command.

sudo chmod +x ~/.vnc/xstartup

Now, restart the VNC server Using this command.

vncserver

You’ll see output similar to this:

Output
New 'X' desktop is your_hostname:1

Starting applications specified in /home/sammy/.vnc/xstartup
Log file is /home/sammy/.vnc/your_hostname:1.log
back to menu ↑

Connecting the VNC Desktop

We’ll use an SSH tunnel to connect securely to our server. You can do this via the terminal on Linux with the following command. Remember to replace sammy and your server_ip with the username and external IP address of the server. In here type “yes” and hit enter.

ssh -L 5901:127.0.0.1:5901 -C -N -l sammy your_server_ip
back to menu ↑

Running VNC as a System Service

Next, we’ll set up the VNC server as a system service so we can start, stop, and restart it as needed, like any other service. This will also ensure that VNC starts up when your server reboots.

Enter the following command as the previous one, this will not visible in the process.

sudo nano /etc/systemd/system/[email protected]

Add the following lines to the file. Be sure to change the value of User, Group, Working Directory, and the username in the value of PID FILE to match your username. Please check the description for the command lines.

[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
User=sammy
Group=sammy
WorkingDirectory=/home/sammy

PIDFile=/home/sammy/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

Enter command. After adding this press Control + X then type Y to save changes. After that press enter to exit to terminal.

Next, make the system aware of the new unit file. Enter following command.

sudo systemctl daemon-reload

Enable the unit file, Using this line.

sudo systemctl enable [email protected]

Stop the current instance of the VNC server if it’s still running.

vncserver -kill :1

Then start it as any other system service, using following command.

sudo systemctl start [email protected]

You can verify that it started with this command. If it started correctly, the output should look like this. Now close the terminal window. Your VNC server will now be available when you reboot the machine.

 Reopen it again by clicking “SSH” button. After that, Start your SSH tunnel again using this command make sure to replace sammy and your server ip with the username and external IP address of the server.

ssh -L 5901:127.0.0.1:5901 -C -N -l sammy your_server_ip

Now your server is ready to RDP connection.

back to menu ↑

Connect VPS using Turbo VNC Viewer

Now close the terminal and open turbo VNC viewer. Type your VNC server address. It should be your Eternal IP and port 5901. Click “connect” button. Enter the password you created before.

VNC viewer

Now you can enjoy the new VPS. This is lifetime no expiration and no any payment. Only problem is, this server has 1 shared core processor and 614MB RAM. It may be slow but it is free for lifetime. If you want, you can upgrade the VPS with better resource.

Ubutuntu VPS RDP with VNC Viewer
If you want a Premium Cheap VPS with 24/7  uptime and better resources. Check the below link
We will be happy to hear your thoughts

      Leave a reply

      Register New Account
      Reset Password
      Compare items
      • Total (0)
      Compare