This repo provides an ansible playbook to setup a shadowsocks server with docker.
Galaxy roles:
- For docker installation the docker role from geerlingguy has been used.
- For updating packages the update role from robertdebock has been used.
Note
Since some VPS(s) are created using old images and contains old packages (i.e ca-certifications) there is a task for updating all system packages if you don't need/want this comment out the update tasks
git clone git@github.com:AlirezaDastyar/shadowsocks-ansible.git
Install roles from ansible galaxy [Link]
ansible-galaxy install geerlingguy.docker robertdebock.update
Replace the 127.0.0.1
with you'r server ip or domain name.
Set the username
and password
to appropriate and safe values for shadowsocks user.
[ss_server]
127.0.0.1 username=ShadowSocksUser password=VerySecurePassword
I recommend to leave server
and server_port
in config.json
as is.
{
"server": "0.0.0.0",
"server_port": 8388,
"password": "MySecurePassword",
"method": "aes-256-gcm"
}
Also note that the port here is not published port for shadowsocks, to change the port you have to change it in docker compose.yml
Run the following command and provide the root password for ssh
ansible-playbook setup.yml -i inventory.ini -k