Skip to content

Package Manager

🏭 Repository Installation

bash
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

🛠️ Manual Installation

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

📦 Managed Installation

TypePlatformCommandLink
AURArch Linux? -S sing-boxAUR package
nixpkgsNixOSnix-env -iA nixos.sing-boxnixpkgs unstable package
HomebrewmacOS / Linuxbrew install sing-boxHomebrew package
APKAlpineapk add sing-boxAlpine Linux Edge package
DEBAOSCapt install sing-boxAOSC package

⚠️ Problematic Sources

TypePlatformLinkPromblem(s)
DEBAOSCaosc-os-abbsProblematic build tag list modification
Homebrew/homebrew-coreProblematic build tag list modification
TermuxAndroidtermux-packagesProblematic build tag list modification
FreshPortsFreeBSDFreeBSD portsOld Go (go1.20)

If you are a user of them, please report issues to them:

  1. Please do not modify release build tags without full understanding of the related functionality: enabling non-default labels may result in decreased performance; the lack of default labels may cause user confusion.
  2. sing-box supports compiling with some older Go versions, but it is not recommended (especially versions that are no longer supported by Go).

🔖 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:

OperationCommand
Enablesudo systemctl enable sing-box
Disablesudo systemctl disable sing-box
Startsudo systemctl start sing-box
Stopsudo systemctl stop sing-box
Killsudo systemctl kill sing-box
Restartsudo systemctl restart sing-box
Logssudo journalctl -u sing-box --output cat -e
New Logssudo journalctl -u sing-box --output cat -f