Set up Clash Client on Your Raspberry Pi 4

What You Need

  • Raspberry Pi 4 Model B
  • Raspberry Pi OS (or any OS based on it, like TwisterOS)
  • Internet connection (through Ethernet or WiFi)

Download Clash

Configure Clash

$HOME/.config/clash/config.yaml

Configure System Proxy

  1. Edit environment variables
$ sudo nano /etc/environment
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
export no_proxy="localhost, 127.0.0.1"
$ sudo visudo
Defaults    env_keep+="http_proxy https_proxy no_proxy"

Run Clash!

  1. Give Clash execution permission
sudo chmod +x clash
sudo clash

Manage Clash

Run Clash at Startup

sudo ~/clash

Congrats!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kevin Li

Kevin Li

❤️ Open Source, Web Dev, programming languages, and Hanzi 漢字