Create ShadowSocks on VPS

This is a log to establish & install ShadowSock on VPS (Centos).

If you do not have zlib-devel and openssl-devel, then you need to install it.

sudo yum install -y zlib-devel openssl-devel

Detailed steps:

git clone
cd shadowsocks-libev
./configure --prefix=/usr && make
sudo make install
sudo cp ./rpm/SOURCES/etc/init.d/shadowsocks-libev /etc/init.d/
sudo chmod +x /etc/init.d/shadowsocks-libev
sudo mkdir /etc/shadowsocks-libev
sudo cp ./debian/config.json /etc/shadowsocks-libev/
sudo nano /etc/shadowsocks-libev/config.json

Then change the configuration file accordingly.

 "local_address": "",
 "fast_open": false,
 "workers": 1

For CentOS 6.*, just do

sudo service shadowsocks-libev start

And we are good. For CentOS 7, you need to do the followings.

sudo -i
nano /etc/systemd/system/shadowsocks-server.service

And then input the following: (assuming ss-server is at /usr/bin/)

Description=Shadowsocks service

ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/config.json
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true


For previously server-port setting as a different one less than 1024, you need to set here User to root ([1]). Then save the file.

Now just do: (change 8388 to your port)

systemctl start shadowsocks-server.service
systemctl enable shadowsocks-server.service
firewall-cmd --permanent --add-port=8388/tcp
firewall-cmd --reload

Leave a Reply

Your email address will not be published. Required fields are marked *