Install Shadowsocks Proxy Server on Ubuntu 24.04

By Raman Kumar

Updated on Dec 03, 2025

In this tutorial, we'll learn how to install Shadowsocks Proxy Server on Ubuntu 24.04.

What is Shadowsocks Proxy?

Shadowsocks is a secure, high-performance proxy protocol that encrypts and tunnels internet traffic through a remote server. It was built to bypass censorship, avoid traffic filtering, and protect online privacy. Because it uses modern encryption and minimal overhead, it delivers fast, stable, and reliable connections across both desktop and mobile devices.

On Ubuntu 24.04, the setup is straightforward and works well for both personal and production environments. In this guide, we walk through installation, configuration, firewall rules, service management, and essential security practices using the latest recommended approach.

Prerequisites

Before we begin, ensure we have the following:

How to Install Shadowsocks Proxy Server on Ubuntu 24.04

Step 1: Update the Server

Keeping Ubuntu packages updated ensures proper dependency handling.

sudo apt update && sudo apt upgrade -y

Step 2: Install Shadowsocks-libev

Shadowsocks-libev is the modern, high-performance implementation. It’s actively maintained and recommended for Ubuntu 24.04.

sudo apt install shadowsocks-libev -y

This installs the core binaries, systemd service files, and required libraries.

Step 3: Create the Configuration File

We store the configuration inside /etc/shadowsocks-libev/config.json. This keeps everything organized and compatible with systemd service units.

sudo nano /etc/shadowsocks-libev/config.json

Add the following:

{
    "server": "0.0.0.0",
    "server_port": 8388,
    "password": "StrongPasswordHere",
    "timeout": 300,
    "method": "aes-256-gcm",
    "fast_open": true,
    "mode": "tcp_and_udp"
}

Important details:

  • server_port: Keep it high (e.g., 60000+) for better security.
  • method: aes-256-gcm provides strong encryption with good performance.
  • fast_open: Improves speed; ensure it’s supported on our kernel.

Save and exit.

Step 4: Enable and Start the Shadowsocks Service

Activate the service and ensure it runs after reboot.

sudo systemctl enable shadowsocks-libev
sudo systemctl restart shadowsocks-libev
sudo systemctl status shadowsocks-libev

If the service is active and running, the proxy is live.

Step 5: Open Firewall Ports

If UFW is enabled, allow the server port (replace with our chosen port).

sudo ufw allow 8388/tcp
sudo ufw allow 8388/udp
sudo ufw reload

A good practice is using uncommon port numbers to reduce random scans.

Step 6: Improve Performance (Recommended Tweaks)

Enable TCP Fast Open

Check if supported:

sudo sysctl net.ipv4.tcp_fastopen

If output is 1, continue. If not, enable it:

echo "net.ipv4.tcp_fastopen = 3" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Optimize File Limits

echo "* soft nofile 51200" | sudo tee -a /etc/security/limits.conf
echo "* hard nofile 51200" | sudo tee -a /etc/security/limits.conf

Step 7: Connect Using a Shadowsocks Client

Install the client:

sudo apt install shadowsocks-libev -y

Create a client config:

nano ~/client.json

Add:

{
    "server": "SERVER_IP",
    "server_port": 8388,
    "local_address": "127.0.0.1",
    "local_port": 1080,
    "password": "StrongPasswordHere",
    "timeout": 300,
    "method": "aes-256-gcm"
}

Start client:

ss-local -c ~/client.json

This creates a local SOCKS5 proxy at 127.0.0.1:1080.

To test, open another terminal ssh to server and execute following command:

curl --socks5 127.0.0.1:1080 https://ifconfig.me

If it shows the server’s IP, everything works.

Step 8: Secure the Server (Highly Recommended)

These practices keep our Shadowsocks instance safe and stable:

Use a strong password

Avoid dictionary words. Use long, random keys.

Use fail2ban (optional)

sudo apt install fail2ban -y

Monitor logs

sudo journalctl -u shadowsocks-libev -f

This helps identify misuse or connection failures.

Step 9: Restart Server After Any Configuration Change

sudo systemctl restart shadowsocks-libev

This ensures updates take effect immediately.

Conclusion

Shadowsocks provides a fast, secure, and efficient proxy solution for modern network environments. With Ubuntu 24.04 and shadowsocks-libev, we can deploy a stable service that delivers strong privacy and reliable performance.

Following this guide, our server now runs with optimal settings, proper encryption, firewall protection, and best-practice tuning. It’s ready for real-world use, whether for private browsing, secure remote access, or bypassing regional restrictions.