Install Shadowsocks on Linux

  1. Install shadowsocks-libev

Ubuntu

sudo apt update
sudo apt install shadowsocks-libev

Centos

# shadowsocks-libev needs some dependencies from epel
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# download shadowsocks-livev repo
sudo wget -P /etc/yum.repos.d/ https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
# install
sudo yum install -y shadowsocks-libev
  1. Create config file
sudo vim /opt/shadowsocks.json
{
    "server": ["[::0]", "0.0.0.0"],
    "server_port": "8088",
    "password": "password",
    "method": "aes-256-cfb"
}
  1. Create systemctl service
sudo vim /etc/systemd/system/shadowsocks.service
[Unit]
Description=Shadowsocks

[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ss-server -c /opt/shadowsocks.json

[Install]
WantedBy=multi-user.target
  1. Start and enable the service
sudo systemctl restart shadowsocks && sudo systemctl enable shadowsocks
  1. Now you can test it with your client. If it is not accessible, please make sure the firewall and VPS provider allow corresponding port passing.