Skip to main content

Easy! Compile and Install Shadowsocks-libev on Ubuntu 16.04 Server and Desktop

compile and install shadowsocks-libev on ubuntu 16.04

As you may know, Shadowsocks is a free and open-source Socks5 proxy that can be used to bypass Internet firewall or filtering system. We already covered how to install Shadowsocks python version on Debian, Ubuntu and CentOS server. That’s probably the easiest way to get started with this proxy software. But did you know that there’s also another software called Shadowsocks-libev?

Shadowsocks-libev, on the other hand, is written in C programming language and thus it consumes little RAM and is a very good fit for low-end device such as routers. The latest stable version is v2.4.8 which was released on July 20, 2016.

In order to use Shadowsock-libev to bypass firewall and filtering systems, you need to install the server software on your server and install the client software on your local machine. Then you tell your Firefox or Google Chrome browser to use the proxy. That’s all you need to do.

So let’s get started.

Compile and Install Shadowsocks-libev on Ubuntu 16.04 Server

Yes, we can install shadowsocks-libev from repository. However you are not likely to get the latest stable version. Here’s how to compile the latest version from source.

1.  SSH into your Ubuntu 16.04 server and install git version control tool.

sudo apt install git

2.  Clone the source repository from Github.

git clone

cd shadowsocks-libev

3.  Install build dependencies.

sudo apt install build-essential autoconf libtool libssl-dev asciidoc

4.  Configure build environment and compile it.

./configure && make

5.  Install shadowsocks-libev

sudo make install

Before we can start the shadowsock-libev service, we need to configure the socket, password, encryption method and thing like that. So execute the following command to create a configuration file.

sudo nano /etc/config.json

Put the following text into the file.

"local_address": "",

Explanation of each field:

  • server:  your hostname or server IP.
  • server_port:  server port number.
  • local_port:  local port number.
  • password:  a password used to encrypt transfer.
  • timeout:  connections timeout in seconds.
  • method:  Available encryption method are, “bf-cfb”, “aes-256-cfb”, “des-cfb”, “rc4”, etc. Default is table, which is not secure. “aes-256-cfb” is recommended.

Replace the red-colored text with your info. In nano text editor, press CTRL+O to save the file, CTRL+X to exit.  Then start shadowsocks server with the below command:

ss-server -c /etc/config.json

To let it automatically start when Ubuntu 16.04 server is booted, we can put this command into /etc/rc.local file.

sudo nano /etc/rc.local

Add the ss-server command above exit 0. Save and close the file.

shadowsocks-libev auto start on ubuntu 16.04

Install and Configure Shadowsocks-libev on Your Local Ubuntu PC

Follow the same steps to compile and install shadowsocks-libev on your local Ubuntu 16.04 machine. Next create the same configuration file.

The shadowsocks-libev client software is ss-local. So enter the following command to start it, provided that the configuration file is created.

ss-local -c /etc/config.json

And of course, we can also put this command in /etc/rc.local file so that the client will automatically start when Ubuntu 16.04 is booted. It’s interesting to see that ss-server and ss-local don’t require sudo privilege.

Configure Firefox/Google Chrome to Use the Proxy

Fire up Firefox. In the menu bar, choose Edit > Preferences. And then click the Advanced tab. choose network and then settings.


In the connection settings window, select manual proxy configuration and on the socks host field enter, enter 1080 in the port field. That’s because in the shadowsocks-libev configuration file, we set as the local host and 1080 as the local port.

Be sure to choose socks v5 as the socks type and check Remote DNS. Finally click the OK button.


Now your firefox can visit google, YouTube and other blocked sites!

For Google Chrome users, there’s a plugin called SwitchyOmega that you can install on Chrome. Once installed the plugin, open its options page, add a profile. Then edit your profile as follows. Save the profile and you are done. Now you can visit those blocked sites!

SwitchyOmegaSome programs don’t support Sock5 proxy. Fortunately you can use proxychains to redirect any program to go through your proxy server.

As always, if you found this post useful,  subscribe to our free newsletter or follow us on Google+Twitter or like our Facebook page.

Rate this tutorial
[Total: 0 Average: 0]