How To Install Shadowsocks on Fedora 43

Install Shadowsocks on Fedora 43

Shadowsocks has become an essential tool for users seeking secure and reliable proxy solutions. This secure SOCKS5-based proxy protocol offers lightweight performance and effective traffic obfuscation, making it particularly valuable for circumventing internet censorship and securing network connections. Unlike traditional VPN services that can be easily detected and blocked, Shadowsocks operates at the application level and encrypts traffic in a way that’s harder to identify. Fedora 43 users looking to implement this powerful proxy solution will find multiple installation methods available, each with distinct advantages.

This comprehensive guide walks through everything needed to successfully install and configure Shadowsocks on Fedora 43. You’ll learn two primary installation methods—using the COPR repository and Snap packages—along with complete server configuration, client setup, and performance optimization techniques. By the end, you’ll have a fully functional Shadowsocks deployment ready for secure proxy operations.

What is Shadowsocks?

Shadowsocks represents a sophisticated approach to secure proxy connections. Developed as a SOCKS5-based protocol, it encrypts internet traffic and makes it significantly more difficult for network administrators or censorship systems to detect and block connections. The protocol splits traffic into encrypted packets that appear as normal HTTPS traffic, providing an effective layer of obfuscation.

The key distinction between Shadowsocks and traditional VPN services lies in their implementation approach. While VPNs create system-wide encrypted tunnels that route all traffic, Shadowsocks operates at the application level, allowing selective routing of specific applications through the proxy. This granular control reduces overhead and improves performance.

Several compelling advantages make Shadowsocks attractive. The protocol maintains a lightweight footprint with minimal resource consumption. Its flexible architecture supports various encryption methods, from AES-256-GCM to ChaCha20-Poly1305. Most importantly, the traffic obfuscation techniques make detection considerably more challenging compared to standard VPN protocols.

Prerequisites and System Requirements

Before beginning the installation process, ensure your Fedora 43 system meets the necessary requirements. You’ll need a fresh or existing Fedora 43 installation, whether on a server or desktop environment. Root access or sudo privileges are mandatory for installing packages and modifying system configurations.

A stable internet connection is essential for downloading packages and repositories. The system should have at least 512MB of RAM available, though 1GB or more is recommended for optimal performance. Storage requirements remain minimal, with approximately 50-100MB needed for the Shadowsocks installation and configuration files.

Port availability presents another critical consideration. Shadowsocks typically uses port 8388 by default, though you can customize this during configuration. Verify that your chosen port isn’t already occupied by another service. Basic familiarity with Linux terminal commands and text editors will make the installation process smoother.

Updating Your Fedora 43 System

System updates should always precede new software installations. Updating ensures you have the latest security patches, bug fixes, and package compatibility improvements. Open your terminal and execute the following command:

sudo dnf update -y

This command refreshes the package repository cache and upgrades all installed packages to their latest versions. The -y flag automatically confirms any prompts, streamlining the update process.

After the update completes, verify your Fedora version by running:

cat /etc/fedora-release

If kernel updates were installed, reboot your system to ensure all changes take effect properly. A fresh start eliminates potential conflicts and ensures kernel modules load correctly.

Method 1: Installing Shadowsocks via COPR Repository

What is COPR Repository?

COPR (Cool Other Package Repo) serves as Fedora’s community-driven repository system. It allows developers and maintainers to build and distribute packages that aren’t available in official Fedora repositories. COPR provides a reliable distribution channel for Shadowsocks packages specifically built for Fedora systems.

Using COPR offers several advantages. Packages receive regular updates from maintainers who ensure compatibility with current Fedora releases. The installation process remains straightforward, leveraging Fedora’s native DNF package manager. You benefit from automatic dependency resolution and seamless integration with your system’s package management.

Step 1: Enable the Shadowsocks COPR Repository

Begin by adding the Shadowsocks COPR repository to your system. Execute this command in your terminal:

sudo dnf copr enable librehat/shadowsocks -y

The system will display information about the repository and request confirmation to add it. The -y flag automatically accepts the GPG key and enables the repository. Alternative COPR repositories exist, including rayson/shadowsocks and spyophobia/shadowsocks-rust, which offer different implementation versions if needed.

Step 2: Update Package Index

After enabling the COPR repository, refresh your system’s package cache:

sudo dnf update

This step ensures DNF recognizes the newly added repository and can locate Shadowsocks packages. Skipping this refresh may result in package-not-found errors during installation.

Step 3: Install Shadowsocks-libev

Now install the Shadowsocks-libev package, which includes both server and client components:

sudo dnf install shadowsocks-libev -y

The installation process downloads the required packages and automatically resolves dependencies. Shadowsocks-libev represents the lightweight C implementation, offering excellent performance and minimal resource consumption. The installation typically completes within 1-2 minutes, depending on your internet connection speed.

Step 4: Verify Installation

Confirm successful installation by checking the Shadowsocks version:

ss-server --version

This command should display version information, confirming that Shadowsocks installed correctly. You can also verify installed components by listing the package contents:

rpm -ql shadowsocks-libev

Troubleshooting COPR Installation

Installation issues occasionally arise. If you encounter repository connection problems, verify your internet connectivity and DNS resolution. Network firewall rules might block access to COPR servers, requiring temporary adjustments.

Repository conflicts can occur if multiple COPR repositories provide similar packages. Disable conflicting repositories temporarily during installation. Check installation logs for specific error messages:

journalctl -xeu dnf

Permission errors typically indicate insufficient sudo privileges or corrupted package cache. Clear the DNF cache with sudo dnf clean all and retry the installation.

Method 2: Installing Shadowsocks via Snap Package

Understanding Snap Packages

Snap packages provide containerized applications that include all dependencies bundled together. This self-contained approach ensures consistent behavior across different Linux distributions. Snaps run in isolation with restricted system access, offering enhanced security through sandboxing.

Choose the Snap installation method when you prefer isolated application environments or need quick deployment without repository configuration. However, note that Snap packaging may introduce slight performance overhead compared to native packages.

Step 1: Install Snap Core

Fedora doesn’t include Snap support by default. Install the snapd daemon first:

sudo dnf install snapd -y

Enable and start the snapd service:

sudo systemctl enable --now snapd.socket

Create the classic snap support symlink:

sudo ln -s /var/lib/snapd/snap /snap

Log out and back in, or restart your system to ensure the snap paths are properly configured. Verify snap installation:

snap version

Step 2: Install Shadowsocks via Snap

Install Shadowsocks using the snap command:

sudo snap install shadowsocks-libev

For the latest development version, specify the edge channel:

sudo snap install shadowsocks-libev --edge

The stable channel provides tested releases suitable for production use. Edge channels contain newer features but may include bugs.

Step 3: Verify Snap Installation

Confirm the installation by listing installed snaps:

snap list | grep shadowsocks

This displays the Shadowsocks snap version and installation details. Remember that Snap-installed applications run in confined environments with limited system access, which may affect configuration file locations and service management.

Configuring Shadowsocks Server

Creating Configuration Directory and File

Proper configuration is crucial for Shadowsocks functionality. Create the configuration directory:

sudo mkdir -p /etc/shadowsocks

Create and edit the configuration file using your preferred text editor:

sudo nano /etc/shadowsocks/config.json

Set appropriate permissions to protect your configuration:

sudo chmod 600 /etc/shadowsocks/config.json

Understanding Configuration Parameters

Shadowsocks uses JSON format for configuration. Each parameter controls specific aspects of server behavior:

server: Specifies the IP address the server binds to. Use 0.0.0.0 to listen on all network interfaces, allowing connections from any IP address. For security, bind to a specific interface IP when you want to restrict access.

server_port: Defines the listening port. The default 8388 works well, but using non-standard ports (like 8443 or 9000) can help avoid automated scanning and blocking attempts.

password: Authenticates client connections. Generate strong, random passwords using tools like openssl rand -base64 32. Never use dictionary words or predictable patterns.

timeout: Sets the connection timeout in seconds. The default 300 seconds (5 minutes) suits most use cases. Reduce this for faster cleanup of idle connections or increase it for long-running operations.

method: Determines the encryption algorithm. Modern AEAD ciphers like aes-256-gcm and chacha20-ietf-poly1305 provide authenticated encryption with superior security. ChaCha20 often delivers better performance on systems without hardware AES acceleration.

fast_open: Enables TCP Fast Open to reduce connection latency. Set to true when kernel support is available.

workers: Specifies the number of worker processes. Set this to match your CPU core count for optimal performance.

mode: Controls protocol support. Use tcp_and_udp to support both TCP and UDP traffic.

Sample Configuration File

Here’s a complete, production-ready configuration example:

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

Customize these values based on your security requirements and performance needs. Always use strong passwords and modern encryption methods. Avoid deprecated ciphers like RC4 or DES.

Setting Up Firewall Rules

Understanding Firewalld on Fedora

Fedora 43 uses firewalld as its default firewall management system. Firewalld provides dynamic firewall configuration with support for network zones and services. Without proper firewall rules, external clients cannot connect to your Shadowsocks server, even with correct configuration.

Opening Required Ports

Allow traffic through your Shadowsocks port (replace 8388 with your configured port if different):

sudo firewall-cmd --permanent --add-port=8388/tcp
sudo firewall-cmd --permanent --add-port=8388/udp

These commands permanently add firewall rules for both TCP and UDP traffic. Apply the changes immediately:

sudo firewall-cmd --reload

For enhanced security on multi-zone systems, restrict access to specific source IPs or networks. This limits connections to known clients only.

Verifying Firewall Configuration

Confirm your firewall rules are active:

sudo firewall-cmd --list-all

The output displays all active rules, including your newly added ports. Verify that both TCP and UDP ports appear in the ports list. Test external connectivity using network scanning tools or by attempting client connections.

Creating and Managing Systemd Service

Creating Systemd Service File

Systemd manages services in Fedora, providing automatic startup, logging, and process monitoring. Create a service file for Shadowsocks:

sudo nano /etc/systemd/system/shadowsocks-libev.service

Add this service configuration:

[Unit]
Description=Shadowsocks-libev Server
Documentation=man:ss-server(1)
After=network-online.target

[Service]
Type=simple
User=nobody
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks/config.json
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

This configuration runs Shadowsocks under the nobody user for security isolation. The CapabilityBoundingSet allows binding to privileged ports without root access. Automatic restart ensures service resilience.

Enabling and Starting the Service

Reload systemd to recognize the new service file:

sudo systemctl daemon-reload

Enable automatic startup on boot:

sudo systemctl enable shadowsocks-libev

Start the service immediately:

sudo systemctl start shadowsocks-libev

Check service status:

sudo systemctl status shadowsocks-libev

A properly running service displays “active (running)” in green text with recent log entries.

Service Management Commands

Managing your Shadowsocks service requires these essential commands:

Stop the service: sudo systemctl stop shadowsocks-libev
Restart the service: sudo systemctl restart shadowsocks-libev
View detailed logs: journalctl -u shadowsocks-libev -f

The -f flag follows logs in real-time, useful for debugging connection issues. Check for errors in logs if clients cannot connect.

Installing and Configuring Shadowsocks Client

Installing Client on Fedora

Client installation enables your local machine to connect to Shadowsocks servers. For graphical interfaces, install shadowsocks-qt5:

sudo dnf install shadowsocks-qt5 -y

Command-line users can utilize the ss-local tool included with shadowsocks-libev. This lightweight client runs without GUI overhead, perfect for servers or minimal installations.

Creating Client Connection Profile

Launch your client application and create a new connection profile. Input these essential details:

  • Server Address: Your Shadowsocks server’s IP or hostname
  • Server Port: The port configured in your server (e.g., 8388)
  • Password: The authentication password from your server configuration
  • Encryption Method: Must match your server’s method exactly (e.g., aes-256-gcm)
  • Local Port: Usually 1080 for SOCKS5 proxy

Save the profile with a descriptive name. Test the connection by clicking Connect or enabling the profile.

Testing Client Connection

Verify successful connection by checking the client’s connection status indicator. Most clients display connection state and data transfer statistics.

Test proxy functionality using curl:

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

This should return your Shadowsocks server’s public IP address, confirming traffic routes through the proxy correctly. Connection failures may indicate firewall issues, incorrect credentials, or network connectivity problems.

Browser Configuration for Shadowsocks

Configuring Firefox

Firefox offers native SOCKS5 proxy support. Access proxy settings through Preferences → General → Network Settings. Select “Manual proxy configuration” and enter:

  • SOCKS Host: 127.0.0.1
  • Port: 1080
  • Select SOCKS v5
  • Enable Proxy DNS when using SOCKS v5

This DNS proxy setting prevents DNS leaks by routing DNS queries through the encrypted tunnel. Click OK to save settings. Visit whatismyip.com to verify your IP changed to your server’s location.

Configuring Chrome/Chromium

Chrome uses system proxy settings by default. On Fedora, access Settings → Network → Network Proxy and configure SOCKS proxy manually. Alternatively, launch Chrome with proxy parameters:

google-chrome --proxy-server="socks5://127.0.0.1:1080"

Browser extensions like SwitchyOmega provide convenient proxy switching for multiple profiles. These extensions support automatic proxy selection based on domain patterns.

Performance Optimization

Server-Side Optimizations

Maximize Shadowsocks performance through kernel parameter tuning. Edit /etc/sysctl.conf and add these optimizations:

net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 65536 33554432
net.ipv4.tcp_congestion_control = bbr
fs.file-max = 51200

Apply changes immediately:

sudo sysctl -p

These settings increase buffer sizes and enable BBR congestion control for improved throughput. Increase file descriptor limits by editing /etc/security/limits.conf:

* soft nofile 51200
* hard nofile 51200

Adjust worker processes in your Shadowsocks configuration to match CPU cores. More workers distribute load across cores, improving concurrent connection handling.

Resource Usage Expectations

Shadowsocks maintains minimal resource consumption. Typical installations use 20-50MB of RAM with moderate traffic. CPU usage remains negligible during idle periods, increasing proportionally with active connections and encryption operations.

Monitor resource usage with htop or systemd-cgtop. Establish baseline metrics to identify performance degradation. High CPU usage may indicate insufficient worker processes or aggressive encryption algorithms. Memory spikes suggest connection leaks or configuration issues.

Security Best Practices

Security considerations extend beyond basic setup. Always use strong, randomly-generated passwords with at least 20 characters. Password reuse across multiple services creates vulnerability chains.

Modern encryption methods like aes-256-gcm provide authenticated encryption, preventing tampering attacks. Avoid deprecated ciphers including RC4, DES, and non-AEAD algorithms. AEAD (Authenticated Encryption with Associated Data) ciphers protect against manipulation attacks.

Non-standard ports reduce exposure to automated scanning. Most censorship systems target common proxy ports. Choosing ports that blend with normal traffic (like 443 or 8443) improves obfuscation.

Implement IP whitelisting when you have static client IPs. Restrict server access to known addresses using firewall rules. This prevents unauthorized access even if credentials leak.

Regular updates are critical. Monitor security advisories for Shadowsocks and Fedora. Enable automatic security updates or schedule weekly manual updates. Outdated software contains known vulnerabilities that attackers actively exploit.

Monitor connection logs for suspicious patterns. Unusual connection attempts, especially from unexpected geographic regions, may indicate compromise attempts. Configure log retention policies to balance security monitoring with privacy considerations.

Common Troubleshooting Issues

Service Won’t Start

Service startup failures typically stem from configuration errors. Validate your JSON configuration syntax using online validators or jq:

cat /etc/shadowsocks/config.json | jq .

Syntax errors display line numbers and error descriptions. Check file permissions—the service user must read the configuration file. Permission denied errors require adjusting ownership:

sudo chown nobody:nobody /etc/shadowsocks/config.json

Invalid configuration paths in the service file prevent startup. Verify the ExecStart path matches your actual ss-server binary location. DynamicUser configurations sometimes conflict with file permissions. Use a static user like nobody instead.

Connection Issues

Failed client connections have multiple potential causes. Verify the server process is running:

sudo systemctl status shadowsocks-libev

Check that the server binds to the correct port:

sudo ss -tulpn | grep 8388

This should show ss-server listening on your configured port. Firewall rules blocking traffic are common culprits. Re-verify firewall configuration and test port accessibility from external networks using tools like telnet or nc.

Client configuration mismatches prevent successful authentication. Ensure encryption methods, ports, and passwords match exactly between client and server. Case sensitivity matters—aes-256-GCM differs from aes-256-gcm.

Network connectivity problems between client and server require troubleshooting. Ping the server to verify basic connectivity. Traceroute identifies routing issues or network blocks along the path.

Performance Problems

High CPU usage indicates bottlenecks in encryption processing. Increase worker processes to utilize multiple cores. Consider switching to ChaCha20-Poly1305 on systems without hardware AES acceleration.

Memory consumption problems suggest connection leaks. Monitor active connections over time. Restart services periodically if memory grows unbounded. Investigate timeout settings—too high values maintain zombie connections.

Network bottlenecks limit throughput. Test bandwidth without Shadowsocks to establish baseline speeds. If raw bandwidth is adequate but proxy speeds are poor, adjust kernel parameters as described in the optimization section.

Testing Your Shadowsocks Installation

Comprehensive testing ensures proper functionality. Verify server listening state:

sudo ss -tulpn | grep 8388

The output confirms the server binds to the correct port and interface. Test local connections using the client configuration you created. Successful authentication and data transfer indicate proper basic functionality.

Check IP address changes by visiting IP detection websites before and after enabling the proxy. Your displayed IP should change to your server’s public IP address. This confirms traffic routes through your Shadowsocks tunnel.

DNS leak testing is critical for privacy. Visit dnsleaktest.com while connected through Shadowsocks. DNS queries should show your server’s location, not your actual ISP. Leaks compromise privacy and location obfuscation.

Speed testing reveals performance characteristics. Use speedtest.net or similar services to measure throughput through the proxy. Compare results with direct connection speeds to understand overhead. Some performance reduction is normal due to encryption and routing distance.

Congratulations! You have successfully installed Shadowsocks. Thanks for using this tutorial for installing Shadowsocks open-source encryption protocol project on Fedora 43 Linux system. For additional help or useful information, we recommend you check the official Shadowsocks website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!
r00t is a dedicated and highly skilled Linux Systems Administrator with over a decade of progressive experience in designing, deploying, and maintaining enterprise-grade Linux infrastructure. His professional journey began in the telecommunications industry, where early exposure to Unix-based operating systems ignited a deep and enduring passion for open-source technologies and server administration.​ Throughout his career, r00t has demonstrated exceptional proficiency in managing large-scale Linux environments, overseeing more than 300 servers across development, staging, and production platforms while consistently achieving 99.9% system uptime. He holds advanced competencies in Red Hat Enterprise Linux (RHEL), Debian, and Ubuntu distributions, complemented by hands-on expertise in automation tools such as Ansible, Terraform, Bash scripting, and Python.

Related Posts