View on GitHub

Zhiliang Xu

Tech Blog

Run Shadowsocks in Azure Container Instances (ACI)

VPN is very useful in mainland China, and Shadowsocks is a popular proxy server. Now that Shadowsocks has docker support, and we can host docker containers on Azure, it becomes very easy to deploy Shadowsocks on Azure. In this post, I’ll show you how to deploy a Shadowsocks server on Azure Container Instances in just one command.

I assume that you already have an Azure subscription at hand and there is at least one resource group in it. Create a free one if you haven’t yet.

To run the command to create a running Shadowsocks server, go to Azure Portal, click the Cloud Shell icon in the top bar.

Cloud Shell Icon

In the Cloud Shell that pops up at the bottom, make sure Bash is selected since the command is in Azure CLI. Type the below command.

az container create -g shadowsocks --name shadowsocks1 --image oddrationale/docker-shadowsocks --ip-address public --ports 8388 --command-line "/usr/local/bin/ssserver -k password1"

Cloud Shell Command

In the above command,

Running the above script in Cloud Shell will return a JSON object, which means the creation is successful.

To verify that the Shadowsocks server is running well, navigate to the container group that you created and check its STATE. It should be Running if everything went smooth. Remember the IP address, which you will use when you connect to the server.

Container Running

With just one command, we’ve got a Shadowsocks server running in Azure Container Instance.

Just for completeness, I’ll show you how to connect to the server from iOS.

Add Server

Connect

Google