Repository navigation
Script Install and Management
sh -c "$(curl -fsSL https://install.jinqians.com)"bash <(curl -fsSL https://menu.jinqians.com)After installation, type menu to reopen it:
=== Install === === Uninstall === === System ===
1. Snell 5. Remove Snell 8. Update script
2. SS-2022 6. Remove SS-2022 9. Traffic mgmt (→ PSM)
3. VLESS Reality 7. Remove ShadowTLS 10. Mainland-China blocking
4. ShadowTLS
Options 3 (VLESS Reality) and 9 (traffic management) are handled by PSM; selecting them guides you through installing PSM.
| System | Command |
|---|---|
| Debian / Ubuntu | bash <(curl -fsSL https://snell.jinqians.com) |
| CentOS / RHEL / Rocky / AlmaLinux |
bash <(curl -fsSL https://snell.jinqians.com) (the same script as Debian; the old snell-centos.jinqians.com still works) |
| Alpine (local Docker build) | sh -c "$(curl -fsSL https://snell-docker.jinqians.com)" |
| Alpine 3.18 and older (native install) | sh -c "$(curl -fsSL https://snell-alpine.jinqians.com)" |
The official Snell binaries need glibc, while Alpine ships musl, so a compatibility layer (sgerrand/alpine-pkg-glibc) is required. That approach stopped working on Alpine 3.19, therefore:
| Alpine version | Native install (snell-alpine.jinqians.com) |
Docker |
|---|---|---|
| ≤ 3.18 | ✅ works | ✅ works |
| ≥ 3.19 | ❌ the script refuses and exits | ✅ works (recommended) |
When install.jinqians.com detects Alpine it automatically uses the Docker path
(snell-docker.jinqians.com), so Alpine 3.19+ still works — Snell just runs in a
container instead of directly on the host. If you need a host-level install on Alpine,
you have to stay on 3.18.
If you install Docker on Alpine yourself and use docker run / docker compose directly,
the docker service must be in the default runlevel:
apk add docker docker-cli-compose
rc-update add docker default # not boot
rc-service docker startAlpine's docker service declares need net, and on cloud Alpine images the networking service
lives in the default runlevel. With docker in the boot runlevel that dependency is not met,
so dockerd does not come back after a reboot — every container is offline, clients can't
connect, and docker compose ps reports Cannot connect to the Docker daemon.
To fix a machine that was set up this way (containers with restart: unless-stopped come back on their own):
rc-update del docker boot
rc-update add docker default
rc-service docker startThe snell-docker.jinqians.com script (v1.4+) applies this fix automatically.
After installing, snell opens it:
____ _ _ _____ _ _
/ ___| | \ | | | ____| | | | |
\___ \ | \| | | _| | | | |
___) | | |\ | | |___ | |___ | |___
|____/ |_| \_| |_____| |_____| |_____|
Snell Manager v6.2 ····· ◆ https://jinqians.com
──────────────────────────────────────────────
IP ▶ 203.0.113.10 Snell ▶ running 1/1
Version ▶ v5×1 Memory ▶ 6.8 MB
ShadowTLS ▶ not installed BBR ▶ off
Routing ▶ off
──────────────────────────────────────────────
══════════════════════════════════════════════════════════════
JQ's Snell Manager
══════════════════════════════════════════════════════════════
1. Install Snell 8. Service status
2. Uninstall Snell 9. ShadowTLS
3. Show config 10. BBR
4. Change port / PSK / DNS 11. Rule-based routing (sing-box)
5. Multi-user 12. Egress control (v5/v6)
6. Version management (v4/v5/v6) 13. Update script
7. Restart service
──────────────────────────────────────────────────────────────
0. Exit
══════════════════════════════════════════════════════════════
(The menu itself is in Chinese; it is translated here. The status block on top shows the
server's IP; how many Snell services run, on which versions, their memory; whether ShadowTLS, BBR
and rule-based routing are on, green when running or enabled. 8 shows the full status.)
Main menu 4: with several users, pick one first (the main user or a user's port), then the port,
the PSK or the DNS; the change applies at once with a restart.
- Port: not one another Snell user has, nor one another program listens on. The firewall (ufw / firewalld / iptables / nftables) closes the old port and opens the new one. With ShadowTLS in front, its backend follows (clients keep the ShadowTLS port); with egress control, the socket unit follows. A user's config file and service are renamed after the new port.
-
PSK: Enter for 20 random characters, or your own: 8–128 letters, digits and
. _ ~ + / = -. - DNS: IPv4 / IPv6 addresses or hostnames, comma separated; Enter for the system's DNS.
If any step fails, the config and services are put back as they were and restarted. The new client
config is under 3. Show config.
Main menu 10:
-
1 Enable BBR (the kernel's own): kernel 4.9 or later. Writes
/etc/sysctl.d/99-snell-bbr.conf(fq + bbr, and socket buffers for long fat pipes) and loadstcp_bbrat boot, kept across reboots; nothing else such as forwarding is touched. The IP forwarding androute_localnetthat older versions of the script turned on (in/etc/sysctl.confor the old99-snell-bbr.conf; the first costs a machine that gets IPv6 from router advertisements its IPv6, the second is a security risk) are cleaned up: in/etc/sysctl.confthose lines are commented out after asking. Both files are backed up. -
2 XanMod kernel (BBR v3): x86_64 Debian 12 / 13, Ubuntu 24.04 and the other systems XanMod has
a repository for. The package follows the CPU's instruction set:
linux-xanmod-x64v3from x86-64-v3 up,linux-xanmod-x64v2for v2, the LTSlinux-xanmod-lts-x64v1for older ones; where the repository has no mainline kernels (Debian 12, for one) the LTS of the same level. It asks first and takes effect after a reboot; the old kernel stays in the boot menu. Refused on containers and OpenVZ (they run the host's kernel) and with Secure Boot on (XanMod kernels are unsigned and would not boot; turn Secure Boot off in the provider's panel first). The XanMod repository older versions of the script added (releases, which no longer exists and makesapt-get updatefail) is repaired when the BBR menu opens. - 3 Reset: removes the settings above; congestion control, the default qdisc and the buffers go back to their values from before BBR was enabled, at once.
Pick 3. Show config after installing and the script prints a Surge config with a country tag, ready to copy:
=== Config ===
Installed channels: v4 v5 v6
Main user:
port: 57891
version: Snell v5
HK = snell, 1.2.3.4, 57891, psk = xxxxxxxxxxxx, version = 4, reuse = true, tfo = true
HK = snell, 1.2.3.4, 57891, psk = xxxxxxxxxxxx, version = 5, reuse = true, tfo = true
User (port 7000):
version: Snell v6
HK = snell, 1.2.3.4, 7000, psk = yyyyyyyyyyyy, version = 6, mode = default, reuse = true, tfo = true
The Debian / Ubuntu script keeps one binary per channel, and each systemd unit points at its own version, so ports never interfere with each other:
/usr/local/bin/snell-server-v4 # v4 channel
/usr/local/bin/snell-server-v5 # v5 channel
/usr/local/bin/snell-server-v6 # v6 channel
/usr/local/bin/snell-server # symlink to whatever the main user runs
Each user config records its channel on the first line:
#version-choice = v6
[snell-server]
listen = ::0:7000
psk = ...
mode = defaultPick a version for a new port: 5. Multi-user → 2. Add user. After entering the
port you choose v4 / v5 / v6; a channel that is not installed yet is downloaded on the
spot, and no other port is touched.
Change an existing port's version: 5. Multi-user → 4. Modify user →
4. Change Snell version. Config keys are converted automatically (ipv6 for v4/v5,
mode + dns-ip-preference for v6), and a failed switch rolls back by itself.
Main menu 6. Version management offers three actions:
| Action | Notes |
|---|---|
| Update installed channels | Compares each channel against upstream, restarts only the services on that channel |
| Install another channel | Downloads the binary only; no existing user is modified |
| Switch a user's channel | Includes the main user; same as "Change Snell version" in the multi-user menu |
Upgrading an existing install: just run the new script. It migrates the single
snell-serverbinary into the per-channel layout and stamps every config with its version, without interrupting the running services. The migration is idempotent.
Update the client too: v4 uses
version = 4, v5 accepts4or5, and v6 needsversion = 6plus amodematching the server.
Alpine / CentOS scripts and the Docker path do not support side-by-side versions on one host — for containers, run one container per version instead.