Skip to content

Configure Shadowsocks with Supervisor

clowwindy edited this page Feb 4, 2014 · 15 revisions

Here is an example of running shadowsocks with supervisor on Debian 6.0:

Edit /etc/shadowsocks.json

{
    "server":"my ip",
    "server_port":8388,
    "local_port":1080,
    "password":"my password",
    "timeout":600,
    "method":"aes-256-cfb"
}

Run

apt-get update
apt-get install python-pip python-m2crypto python-gevent supervisor
pip install shadowsocks superlance

Edit /etc/supervisor/conf.d/shadowsocks.conf

[program:shadowsocks]
command=ssserver -c /etc/shadowsocks.json
autorestart=true
user=nobody

[eventlistener:crashmail]
command=/usr/local/bin/crashmail -a -m [email protected]
events=PROCESS_STATE

Run

supervisorctl reload

Now it's up.

Control the shadowsocks process:

supervisorctl stop shadowsocks
supervisorctl start shadowsocks
supervisorctl restart shadowsocks

You can check shadowsocks status:

supervisorctl status
supervisorctl tail shadowsocks