View on GitHub

Install ShadowsocksR Using Teddysun Script

Why This Script?

This script simplifies the installation and configuration of a ShadowsocksR server. It can be run on a VPS running CentOS, Debian, or Ubuntu, and with as little as 128 MB of RAM.

Before You Begin

Before you download and run the script, you will need to:


Create VPS

Digital Ocean calls each VPS a “droplet.” This script can run on CentOS, Debian, or Ubuntu. The smallest size of droplet (1 GB of RAM) is more than enough. In this post, we will use a CentOS 7 droplet and the Singapore location.

Login to VPS for First Time

Digital Ocean emails you the root password to use for your initial login.

Open XSHELL 6. Add a new session, with protocol SSH, the host being your server IP address, and port 22.

XSHELL add new session

Click Connect to SSH into your VPS. The first time you connect to a new server, you must Accept and Save its host key. The user name on Digital Ocean is root.

Enter user name into XSHELL

The initial password was in your email from Digital Ocean.

Enter initial password into XSHELL

You must change the initial password the first time you login. You can use one of your strong passwords from above, e.g.:


Update System and Install Prerequisites

As well as updating the system, we also need to install wget if it is not already installed.

For Debian or Ubuntu users:

apt update
apt upgrade
apt install wget

For CentOS users:

yum update
yum install wget

Download and Run Script

Downloading and invoking the script is just three commands.

Get the script from Github:

wget --no-check-certificate

Make the script executable:

chmod +x

Execute the script:

./ 2>&1 | tee shadowsocksR.log

Download and run Teddysun ShadowsocksR script

Details of Script

The script prompts you to enter a password for ShadowsocksR. You can use one of your strong passwords from above, e.g.:


The script generates a random port number. You can either press Enter to leave the generated port number as it is, or enter a port number of your own choice.

You are asked to choose a stream cipher for ShadowsocksR:

1) none
2) aes-256-cfb
3) aes-192-cfb
4) aes-128-cfb
5) aes-256-cfb8
6) aes-192-cfb8
7) aes-128-cfb8
8) aes-256-ctr
9) aes-192-ctr
10) aes-128-ctr
11) chacha20-ietf
12) chacha20
13) salsa20
14) xchacha20
15) xsalsa20
16) rc4-md5

You can either press Enter to leave the cipher at the default of aes-256-cfb, or enter a cipher of your own choice.

You are asked to choose a protocol for ShadowsocksR:

1) origin
2) verify_deflate
3) auth_sha1_v4
4) auth_sha1_v4_compatible
5) auth_aes128_md5
6) auth_aes128_sha1
7) auth_chain_a
8) auth_chain_b
9) auth_chain_c
10) auth_chain_d
11) auth_chain_e
12) auth_chain_f

You can either press Enter to leave the protocol as the default of origin, or enter a protocol of your own choice.

You are asked to choose an obfuscation technique for ShadowsocksR:

1) plain
2) http_simple
3) http_simple_compatible
4) http_post
5) http_post_compatible
6) tls1.2_ticket_auth
7) tls1.2_ticket_auth_compatible
8) tls1.2_ticket_fastauth
9) tls1.2_ticket_fastauth_compatible

You can either press Enter to leave obfuscation at the default of plain, or enter an obfuscation technique of your own choice.

A message then appears:

Press any key to start...or Press Ctrl+C to cancel

When the script finishes running, it displays a summary. For example:

Your Server IP        : 
Your Server Port      :  10596
Your Password         :  m754aJkf8vE2W3H 
Your Protocol         :  origin 
Your obfs             :  plain 
Your Encryption Method:  aes-256-cfb 

Make a note of these values. You will need them on the client.

Results of running Teddysun ShadowsocksR script

Technical note: Behind the scenes, the script has placed these values in a file named /etc/shadowsocks.json. Its contents will look something like this:



We will use shadowsocksr-csharp, release ShadowsocksR-win-4.9.0, as our client.

After you launch ShadowsocksR-win-4.9.0, the icon to open the ShadowsocksR control panel is in the system tray, which is at the bottom right of your Windows desktop. Right-click on it, then select Servers > Edit Servers. Enter the values that match your server configuration.

ShadowsocksR edit servers

Click OK.

Now open your browser. We will use Firefox as an example. Since ShadowsocksR defaults to Global mode, there is no need to change the proxy settings in Firefox itself.

Check your IP address on a site such as


ShadowsocksR is no longer supported.