Your submission was sent successfully! Close

Jump to main content
  1. Blog
  2. Article

Hugo Huang
on 1 March 2023

Why do we need a VPN server? A VPN (Virtual Private Network) server is a network server that allows users to create a secure and encrypted connection to another network over the internet. Here are some reasons why we need a VPN server:

  • Security: VPNs provide a secure way to access the internet, protecting sensitive data from being intercepted by hackers, snoopers, and other malicious actors. A VPN server encrypts all data transmitted between a user’s device and the internet, making it virtually impossible for anyone to intercept or access the data.
  • Privacy: VPNs allow users to protect their privacy by hiding their online activity from their Internet Service Provider (ISP) and other third parties. A VPN server can mask a user’s IP address, making it difficult for anyone to track their online activity and location.
  • Access to restricted content: Many websites and online services are geo-restricted, meaning they can only be accessed from certain locations. A VPN server allows users to bypass these restrictions and access content from anywhere in the world.
  • Remote access: VPNs can be used to provide secure remote access to corporate networks and resources, allowing employees to work from anywhere while maintaining a secure connection to company data.

Create a Ubuntu Virtual Machine on Google Cloud

First, we need a Virtual Machine to host the VPN server. For this demo, we will create a Virtual Machine instance on Google Cloud (follow this video to create a VM on Google Cloud step by step) and pick a region close to the location of your client machines. Here I chose us-west2:

Choose your OS for your server. For security and stability, I chose Ubuntu 20.04 Pro:

Setup Shadowsocks VPN server

In a few seconds, your Ubuntu VM will be running. Now, SSH into the server through the “SSH” button on the right:

A SSH-in-browser will pop out like this:

Now, login as root:

sudo su

Update your OS:

apt-get update

Install pip:

apt-get install python3-pip

Install Shadowsocks

pip install shadowsocks

Create a configuration file for your Shadowsocks to configure the Shadowsocks server

vi /etc/shadowsocks.json

Add the following content to your config JSON file:


Start the server

ssserver -c /etc/shadowsocks.json -d start

If you want to stop the server

ssserver -c /etc/shadowsocks.json -d stop

If you want to re-start the server

ssserver -c /etc/shadowsocks.json -d restart

Now you successfully created a running Shadowsocks server on Google Cloud, you can connect to it through a Shadowscocks Client. 

Connecting to your Shadowsocks server

Download the Shadowsocks Client to your local machine.

From, choose the version suitable for your personal computer. I downloaded the Mac version and then installed it.

After I successfully installed the client, I add the server in the Client UI:

The Server Address is the IP address of my server in Google Cloud. You can find the IP address in your GCP console. For more information about the Shadowsocks client, check out this github repo:

Click “SAVE” and you are all set. Enjoy your own VPN!

Related posts

Aaron Whitehouse
12 September 2023

Ubuntu updates, releases and repositories explained

Cloud and server Article

Since we launched Ubuntu Pro’s Expanded Security Maintenance for additional packages, and we now integrate more closely with public cloud update management tools, more people have been asking us about the Ubuntu archive and how this is divided and security patched. In this blog we will therefore explain Ubuntu releases, how the Ubuntu arc ...

Hugo Huang
21 July 2023

Start your SNP VMs on Google Cloud

Cloud and server Article

SEV-SNP is a new security feature that is available on AMD’s EPYC processors. It stands for Secure Encrypted Virtualization Secure Nested Pages. SEV-SNP provides a new level of protection for firmware by encrypting the memory pages that contain the firmware code. This makes it much more difficult for attackers to gain access to the firmwa ...

Hugo Huang
14 July 2023

Ubuntu Pro is now available on Arm VMs on Google Cloud

Cloud and server Article

We are happy to announce that Ubuntu Pro is now available on Arm series Virtual Machines on Google Cloud. You can now launch or upgrade Ubuntu Arm instances to Ubuntu Pro on Google Compute Engine. Arm series Virtual Machines on Google Cloud Renowned for their exceptional performance per watt efficiency, Arm-based chips have become ubiquit ...