# Shadowsocks server setup help needed

**URL:** <https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224>\
**Category:** Installing and Using OpenWrt\
**Created:** [February 17, 2024, 8:33am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224 "2024-02-17T08:33:17Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 17, 2024, 8:33am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/1 "2024-02-17T08:33:17Z")

</div>

Hi all,

I'm new to OpenWRT, so be prepared for the fact I have likely made beginner mistakes here...

I have a Redmi AX6000 router on which I managed to install Open WRT and Luci on it. The version ID at the bottom of the screen reads: Powered by [LuCI Master (git-23.266.27574-7744ad0)](https://github.com/openwrt/luci) / [OpenWrt SNAPSHOT (r24124-518923178c)](https://openwrt.org/)

I have successfully installed DDNS using noip, and can log in remotely using it, as well as access my raspberry pi for which I opened 2 ports.

So far, so good.

Now I'm trying to set the router up as a shadowsocks server, and have installed shadowsocks-libev, as well as the files for Luci to configure it. What I've done so far can be seen in the attached image:

 ![OpenWRT](https://forum.openwrt.org/uploads/default/original/3X/4/9/499bc23f71f6a054a75fb8cb5f4eb5aa28ae3c0a.png)

After rebooting the router it still shows as not running. I'm not very knowledgeable about this part, so would appreciate any help or suggestions for how to proceed with finding out what is wrong.

edit: The packages I installed are shown below:

 ![OpenWRT2](https://forum.openwrt.org/uploads/default/original/3X/f/3/f34a52ede02a5fe2b7d8bd86980041285eff47db.png)

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [February 17, 2024, 9:36am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/2 "2024-02-17T09:36:45Z")

</div>

Did you configure the shadowsocks service to auto start ?

---

<div class="post-metadata">

**Author:** ![kukulo](https://forum.openwrt.org/user_avatar/forum.openwrt.org/kukulo/32/6994_2.png) [@kukulo](https://forum.openwrt.org/u/kukulo)\
**Post date:** [February 17, 2024, 2:59pm UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/3 "2024-02-17T14:59:38Z")

</div>

The configuration is pretty self explanatory in luci-app-shadowsock, set ip adress to run on, e.g. lan address of the router, choose port and password. Enable port forward from wan to the shadowsocks port and ip address and you can test it. I would recommend to install all shadowsock packages, just in case.

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 18, 2024, 6:20am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/4 "2024-02-18T06:20:15Z")

</div>

Hi thanks for your replies.

I did try the suggestion to set the server IP to the correct IP for the router, but this was not enough to get it to run. The software was also set to start automatically, but something is stopping it from running correctly.

Currently I have flashed the firmware to version 23.05, the latest available for the router, and am attempting to reload the DDNS and shadowsocks software to it, although this is being hindered by not being at home, and having a very poor internet connection currently. However, once done I will attempt to see if the server will run after changing the firmware.

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 18, 2024, 7:20am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/5 "2024-02-18T07:20:29Z")

</div>

I have now managed to reload the software for DDNS and shadowsocks to the router. All shadowsocks packages are installed:

 ![OpenWRT6](https://forum.openwrt.org/uploads/default/original/3X/b/7/b789ed3fbbb86f5150c7bcaa87a1ab4788c24b5a.png)

However the server still will not run. I have tried to start it manually from the 'startup' page, and by rebooting the router, but no luck.

 ![OpenWRT7](https://forum.openwrt.org/uploads/default/original/3X/5/e/5ed01ef5dcc7a4d7f7ecc5685f183116237d0e1c.png)

Does anyone have any more suggestions that might help?

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 18, 2024, 8:18am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/6 "2024-02-18T08:18:58Z")

</div>

I managed to get it to run. I had the port set to 443, and there is a log message as such:

```plaintext
Sun Feb 18 08:11:26 2024 daemon.info /usr/bin/ss-server[4128]: tcp server listening at 192.168.0.1:443

Sun Feb 18 08:11:26 2024 daemon.err /usr/bin/ss-server[4128]: bind: Address in use

Sun Feb 18 08:11:26 2024 daemon.err /usr/bin/ss-server[4128]: failed to bind address

```

I changed to a random port, and now the server is running. I then opened that port in the firewall, so I can move on to trying a client now. Thanks all.

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [February 18, 2024, 8:28am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/7 "2024-02-18T08:28:52Z")

</div>

443 is usually claimed by uhttpd on Openwrt.

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 19, 2024, 5:58am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/8 "2024-02-19T05:58:51Z")

</div>

I think I just copied 443 after seeing it on another thread about a shadowsocks server. Anyway it was good to get that part sorted out, thanks.

Now I am having further difficulties, hopefully (and likely) something simple. I have installed a shadowsocks client on my android phone and set it up with address, port, and password for my now running server. It can connect, but there is a facility to test the connection. When I try that it reports no internet connection, in fact no data is returned from the shadowsock server at all (according to the byte counter).

My server config file (data obscured) at /etc/config/shadowsocks-libev reads:

```plaintext
config ss_server '(server_name)'
        option mode 'tcp_and_udp'
        option server '192.168.0.1'
        option server_port '522'
        option method 'aes-128-gcm'
        option password '(password)'
        option key '(key)'
        option ipv6_first '1'
        option local_address '(wan_address)'
        option local_ipv4_address '(IP4_wan_address)'
        option local_ipv6_address '(IP6_wan_address)'

```

I'm not 100% sure what I've entered is correct, but I've been unable to unearth much information about exactly what my config file should look like, or what further steps are needed to get internet access using this server. Any further help would be much appreciated.

edit: I tried the following:

```plaintext
option local_address '192.168.0.1'

```

But still no internet connection.

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [February 19, 2024, 6:08am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/9 "2024-02-19T06:08:32Z")

</div>

Check out [Guide: Shadowsocks setup on OpenWrt for beginners](https://forum.openwrt.org/t/guide-shadowsocks-setup-on-openwrt-for-beginners/77026) ?

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 19, 2024, 6:15am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/10 "2024-02-19T06:15:30Z")

</div>

Hi, that guide is for using a remote server, and most information I can find seems to be geared toward that scenario. However I'm trying to run a server on my router, not a client, so I can pipe all my traffic through my home connection when away from home.

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 19, 2024, 6:35am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/11 "2024-02-19T06:35:15Z")

</div>

Looking in the System Log I'm getting:

```plaintext
Mon Feb 19 06:32:59 2024 daemon.err /usr/bin/ss-server[26769]: failed to handshake with xxx.xx.xx.x: authentication error

```

That's odd, I have double checked the password is correct. I have set up a key for the server to use, but there is nowhere to use one in the android client.

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [February 19, 2024, 8:24am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/12 "2024-02-19T08:24:54Z")

</div>

I've never used Shadowsocks, but it would seem you _need_ two instances ?

> **[What is Shadowsocks? | Shadowsocks](https://shadowsocks.org/doc/what-is-shadowsocks.html)**
>
> A fast tunnel proxy that helps you bypass firewalls.

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 19, 2024, 11:43pm UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/13 "2024-02-19T23:43:59Z")

</div>

Yes, there's a server and client instance. In the shadowsocks information from your link, the server is known as ss-remote, but in OpenWRT that instance is called ss-server. The client instance is called ss-local, that is what I'm running on my android phone.

The phone is saying it's connected, but the log file from OpenWRT is saying the connection was rejected. It's hopefully something simple but I haven't found the answer yet. When I do I'll report back in case it helps anyone in future.

---

<div class="post-metadata">

**Author:** ![tspoon](https://forum.openwrt.org/letter_avatar/tspoon/32/5_5575768a8748004e209b776fc1b2916d.png) [@tspoon](https://forum.openwrt.org/u/tspoon)\
**Post date:** [February 20, 2024, 6:24am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/14 "2024-02-20T06:24:46Z")

</div>

Success at last! I had not matched the encryption method between the server and client. There are several methods that start with 'aes-128-' but are not the same, and I did not check carefully. This thread can be used to demonstrate every wrong move you can make 🙂 thanks for the help.

---

<div class="post-metadata">

**Author:** ![borekon](https://forum.openwrt.org/user_avatar/forum.openwrt.org/borekon/32/96808_2.png) [@borekon](https://forum.openwrt.org/u/borekon)\
**Post date:** [May 20, 2024, 6:48am UTC](https://forum.openwrt.org/t/shadowsocks-server-setup-help-needed/188224/15 "2024-05-20T06:48:28Z")

</div>

Hi,  
Sorry for late answering, but you only installed ss-server, don't you?
