bx
Français — Langue

Cette page n’a pas encore été traduite en français ; elle est affichée dans une autre langue.

Installing bx: from server to computer

Getting from nothing to a fully protected machine takes four steps: install bx server on a VPS and get a bx:// link; install bx on your computer; paste the link into the computer side; turn protection on and verify the exit.

No VPS yet? For what specs to pick, which provider to buy from, and what to do after buying, see Buying a VPS.

On a Mac and don't want to touch the terminal? You only need to do two things: buy a VPS from a provider (note down the address, login name, and password it gives you), then install Bx.app (see "Step 2 → macOS" below). During Bx.app setup, click I Need a Server… and fill in those three items; bx will install the server, test it, and use it directly to finish setup — you can skip steps 1 and 3 entirely. The password is used only once, for this installation, and is not saved. You still have to allow TCP and UDP on port 443 in your cloud provider's security group yourself, in its web console (if the connection fails, bx will point to this specifically).

What you need

You need two machines: an overseas VPS as the exit, and the computer you want to protect. Both run the same bx program.

Requirements
VPS Linux (amd64 or arm64; tested on Ubuntu 24.04); ssh login as root or as a user with sudo; a public IP
VPS ports 443 by default; both TCP and UDP must be reachable inbound (TCP for REALITY, UDP for hysteria2)
Computer macOS (Apple silicon or Intel), Windows 10/11, or Linux (amd64 / arm64)
Phone The iPhone app is not on the App Store yet; see iphone.md
Download https://dl.getbx.net: the version number is in releases/latest.txt; installers are at https://dl.getbx.net/releases/<version>/

You have to allow TCP and UDP on port 443 yourself in your cloud provider's security group / firewall panel in its web console. ufw inside the VPS operating system is opened by bx (method A with --open-ufw, method B automatically).

Step 1: Install the server

When the server install finishes, you get a complete client command you can copy directly, of the form sudo bx setup --udp 'bx://…' 'bx://…'. Save it exactly as is; you need it in step 3. Pick either of the two install methods.

Method A: ssh into the VPS and install there (most direct)

  1. Log in to the VPS: ssh root@<VPS-IP>
  2. Download and install (detects amd64 / arm64 automatically, verifies the SHA256, and installs to /usr/local/bin/bx):
curl -fsSL https://dl.getbx.net/install.sh | sh
  1. Install and start with one command:
sudo bx server up --open-ufw

It generates keys, detects the public IP, installs the system service, and opens ufw (if the system has no ufw, drop --open-ufw, otherwise it errors out). By default it installs REALITY (TCP, resistant to active probing) + hysteria2 (UDP, for speed). At the end it prints the client command.

  1. Confirm it is running: bx server status

Method B: install onto the VPS with one command from your own computer

Suitable if bx is already installed on your computer (do step 2 first). bx uses your own ssh and never handles your password or keys:

bx server deploy root@<VPS-IP> --name myvps

The VPS downloads bx from the download site (dl.getbx.net) itself, and your computer verifies the signature (much faster than uploading it from your computer). When done, it prints the client command; with --name, it also adds this server to the local server list (it does not switch your current exit). Logging in as a non-root user works too; bx uses sudo automatically.

Common options

Option Effect
--port 8443 Change the listening port (when 443 is being interfered with)
--sni <domain> The real site REALITY borrows; default www.cloudflare.com; do not use microsoft (its certificate is too large and the handshake fails)
--protocol hysteria2 / brook Speed tier only / simple fallback

To get the link again later: on the VPS, sudo bx server link. If the VPS's IP changed or got blocked, see What to do when your server's IP is blocked.

Step 2: Install the computer side

This step only installs the program; it does not turn protection on and does not change network settings.

macOS

  1. From https://dl.getbx.net/releases/<version>/ download bx-macos-arm64.dmg (Apple silicon) or bx-macos-amd64.dmg (Intel); the version number is in latest.txt.
  2. Open the dmg, drag Bx.app into Applications, and double-click to open it.
  3. Official release packages are notarized by Apple, so macOS only asks once "this was downloaded from the internet, are you sure you want to open it"; click Open.
  4. It asks Install bx?; confirm and enter your computer password once. Once installed, the bx icon appears in the menu bar, and the bx command is available in the terminal.

If instead you see "is damaged and should be moved to the Trash", that is a different matter: the package was altered in transit. Do not allow it, and do not run xattr as some online guides suggest; download it again.

Windows

Download from https://dl.getbx.net/releases/<version>/. Windows installs from before v0.5.4 do not receive new versions through auto-update; reinstall manually once as below, after which bx update works normally.

  1. Download bx-setup.exe and double-click to install (installs to C:\Program Files\bx; the tray icon starts automatically after install).
  2. If SmartScreen says "Windows protected your PC": click More info → Run anyway (the Windows build is not code-signed yet; you can verify the download against SHA256SUMS in the same directory).

If you'd rather not install, there is a portable build, bx_windows_amd64.zip, which unzips to a single bx.exe.

Linux

Same as on the VPS, one command installs to /usr/local/bin/bx:

curl -fsSL https://dl.getbx.net/install.sh | sh

Step 3: Connect to the server and turn protection on

Paste the whole command you saved in step 1 into your computer's terminal exactly as is. It contains two links: the one after --udp is for UDP acceleration, and the last one is the main link; don't split them up. setup only writes the configuration and tests connectivity once, without changing the network; up is what actually takes over all of the machine's traffic.

Computer Write configuration Turn protection on
macOS Open Terminal and paste sudo bx setup --udp '…' '…' (or use the menu, see below) Flip Protection on in the bx menu-bar icon, or bx up
Linux Paste as is: sudo bx setup --udp '…' '…' bx up
Windows In an Administrator PowerShell, drop sudo and run from the directory containing bx.exe (for the installed version, C:\Program Files\bx): .\bx.exe setup --udp '…' '…' .\bx.exe up, or click "Connect" in the tray

After it is turned on, the network pauses for a second or two, then all of the machine's traffic goes through the tunnel. From then on it turns on automatically at boot until you turn it off.

On a Mac you can also skip the terminal: in the bx menu-bar icon choose "Set Up bx…" and paste the whole command in as is (v0.4.9 and later; earlier versions accept only one link, in which case paste the last one, the main link, and you lose UDP acceleration). The Windows tray's "Set Up from Clipboard…" accepts only one link; paste the last one.

About modes: the default is global mode: all traffic (including mainland Chinese websites) goes through the tunnel. If you want Chinese websites to connect directly, see the last section.

Step 4: Confirm it is really protecting you

The install is only done when all three check out (on Windows, replace bx with .\bx.exe).

  1. Status: bx status should show Status Protected, Tunnel ● healthy.
  2. Exit IP: curl https://icanhazip.com should print your VPS's IP, not your broadband IP. Don't verify the exit with sites like ifconfig.me or ipify that are on the China direct-connection list: in split-routing mode they connect directly and report your real IP.
  3. Leak check: bx leakcheck (without sudo) opens a local-only page; click once to start, and it compares the browser half (WebRTC, IPv6, DNS) with the local half (routing table) to see whether anything leaks.

After installing, fully quit always-open apps such as browsers and chat apps and reopen them once (Cmd+Q on a Mac). Connections established before protection was turned on are not moved into the tunnel by the system; they keep using your real IP until they close on their own. Newer versions of bx name such apps in red in bx status.

Everyday use

What you want to do How
Turn protection off / on The switch in the Mac menu bar; or bx down / bx up
Check status, troubleshoot bx status; bx doctor runs a check-by-check health check and gives fixes
Upgrade sudo bx update, or Update bx… in the Mac menu; works with protection on, and rolls back automatically on failure. Linux / Windows update themselves by default (one day after a new version is released); turn that off with sudo bx update --auto off
Make a site connect directly bx direct add '*.example.com'; takes effect immediately
See which path a site takes bx explain example.com
All Chinese sites direct (split-routing mode) Change global: true to false in /etc/bx/config.yaml, then bx down && bx up
Multiple servers bx server list shows the list, bx server use <name> switches; the Servers… window in the Mac menu can also add, switch, and test
Use this VPS on your phone too On the VPS, sudo bx user invite phone --qr, and scan the code with sing-box / Hiddify / Shadowrocket
Uninstall the computer side bx down, then sudo bx uninstall (keeps the configuration in /etc/bx for easy reinstall)
Uninstall the server On the VPS, sudo bx server uninstall

A few things to know: