Skip to content

Package Manager

Repository Installation

sudo curl -fsSL https://sing-box.app/gpg.key -o /etc/apt/keyrings/sagernet.asc
sudo chmod a+r /etc/apt/keyrings/sagernet.asc
echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/sagernet.asc] https://deb.sagernet.org/ * *" | \
  sudo tee /etc/apt/sources.list.d/sagernet.list > /dev/null
sudo apt-get update
sudo apt-get install sing-box # or sing-box-beta
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo
sudo dnf install sing-box # or sing-box-beta
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://sing-box.app/sing-box.repo
sudo yum install sing-box # or sing-box-beta

Manual Installation

bash <(curl -fsSL https://sing-box.app/deb-install.sh)
bash <(curl -fsSL https://sing-box.app/rpm-install.sh)
bash <(curl -fsSL https://sing-box.app/arch-install.sh)

Managed Installation

Type Platform Link Command Actively maintained
APK Alpine sing-box apk add sing-box
AUR Arch Linux sing-box ᴬᵁᴿ ? -S sing-box
nixpkgs NixOS sing-box nix-env -iA nixos.sing-box
Homebrew macOS / Linux sing-box brew install sing-box
Type Platform Link Command Actively maintained
Homebrew macOS sing-box brew install sing-box
Type Platform Link Command Actively maintained
Scoop Windows sing-box scoop install sing-box
Chocolatey Windows sing-box choco install sing-box
winget Windows sing-box winget install sing-box
Type Platform Link Command Actively maintained
Termux Android sing-box pkg add sing-box
Type Platform Link Command Actively maintained
FreshPorts FreeBSD sing-box pkg install sing-box

Service Management

For Linux systems with systemd, usually the installation already includes a sing-box service, you can manage the service using the following command:

Operation Command
Enable sudo systemctl enable sing-box
Disable sudo systemctl disable sing-box
Start sudo systemctl start sing-box
Stop sudo systemctl stop sing-box
Kill sudo systemctl kill sing-box
Restart sudo systemctl restart sing-box
Logs sudo journalctl -u sing-box --output cat -e
New Logs sudo journalctl -u sing-box --output cat -f